pub struct MysqlWarning {
pub level: &'static str,
pub code: u16,
pub message: String,
}Expand description
CoW-1 (v7.34) — frozen view of the persisted committed engine
state. Carries every field the snapshot() envelope serializes;
v7.39 (round 279) — the per-CONNECTION state, parked while another
connection holds the engine.
The server runs ONE shared Engine behind a RwLock
(ServerState.engine, built once at startup), so everything the
engine called “session state” was in fact process-wide and leaked
between clients: two connections saw each other’s prepared
statements, and one client’s SET sql_mode re-dialected another’s
string literals. PG scopes all of this per session.
Rather than thread a session handle through every call site, the
engine keeps the ACTIVE session’s state in its own fields — so the
~40 existing self.session_params / self.backslash_escapes uses
are untouched — and swaps the whole bag when the caller announces a
different session. Embedded hosts never announce one and stay on
session 0 forever, exactly as before.
v7.38.18 (C12) — one row of MySQL’s diagnostics area.
The three columns SHOW WARNINGS returns, and the numbers are
MySQL’s own: 1265 for a truncated value, 1366 for an integer
column given something that is not one. Measured on 9.7.2 rather
than looked up, because an errno a client switches on has to be
the errno it would have seen.
Fields§
§level: &'static strWarning, Error or Note — the Level column.
code: u16MySQL’s error code.
message: StringThe message, worded as MySQL words it.
Trait Implementations§
Source§impl Clone for MysqlWarning
impl Clone for MysqlWarning
Source§fn clone(&self) -> MysqlWarning
fn clone(&self) -> MysqlWarning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more