Skip to main content

MysqlWarning

Struct MysqlWarning 

Source
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 str

Warning, Error or Note — the Level column.

§code: u16

MySQL’s error code.

§message: String

The message, worded as MySQL words it.

Trait Implementations§

Source§

impl Clone for MysqlWarning

Source§

fn clone(&self) -> MysqlWarning

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MysqlWarning

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MysqlWarning

Source§

impl PartialEq for MysqlWarning

Source§

fn eq(&self, other: &MysqlWarning) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MysqlWarning

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.