sqlx_core/mysql/protocol/response/
status.rs

1// https://dev.mysql.com/doc/dev/mysql-server/8.0.12/mysql__com_8h.html#a1d854e841086925be1883e4d7b4e8cad
2// https://mariadb.com/kb/en/library/mariadb-connectorc-types-and-definitions/#server-status
3bitflags::bitflags! {
4    pub struct Status: u16 {
5        // Is raised when a multi-statement transaction has been started, either explicitly,
6        // by means of BEGIN or COMMIT AND CHAIN, or implicitly, by the first
7        // transactional statement, when autocommit=off.
8        const SERVER_STATUS_IN_TRANS = 1;
9
10        // Autocommit mode is set
11        const SERVER_STATUS_AUTOCOMMIT = 2;
12
13        // Multi query - next query exists.
14        const SERVER_MORE_RESULTS_EXISTS = 8;
15
16        const SERVER_QUERY_NO_GOOD_INDEX_USED = 16;
17        const SERVER_QUERY_NO_INDEX_USED = 32;
18
19        // When using COM_STMT_FETCH, indicate that current cursor still has result
20        const SERVER_STATUS_CURSOR_EXISTS = 64;
21
22        // When using COM_STMT_FETCH, indicate that current cursor has finished to send results
23        const SERVER_STATUS_LAST_ROW_SENT = 128;
24
25        // Database has been dropped
26        const SERVER_STATUS_DB_DROPPED = (1 << 8);
27
28        // Current escape mode is "no backslash escape"
29        const SERVER_STATUS_NO_BACKSLASH_ESCAPES = (1 << 9);
30
31        // A DDL change did have an impact on an existing PREPARE (an automatic
32        // re-prepare has been executed)
33        const SERVER_STATUS_METADATA_CHANGED = (1 << 10);
34
35        // Last statement took more than the time value specified
36        // in server variable long_query_time.
37        const SERVER_QUERY_WAS_SLOW = (1 << 11);
38
39        // This result-set contain stored procedure output parameter.
40        const SERVER_PS_OUT_PARAMS = (1 << 12);
41
42        // Current transaction is a read-only transaction.
43        const SERVER_STATUS_IN_TRANS_READONLY = (1 << 13);
44
45        // This status flag, when on, implies that one of the state information has changed
46        // on the server because of the execution of the last statement.
47        const SERVER_SESSION_STATE_CHANGED = (1 << 14);
48    }
49}