server_status.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. // Manually extracted from mysql-5.5.23/include/mysql_com.h
  3. /**
  4. Is raised when a multi-statement transaction
  5. has been started, either explicitly, by means
  6. of BEGIN or COMMIT AND CHAIN, or
  7. implicitly, by the first transactional
  8. statement, when autocommit=off.
  9. */
  10. exports.SERVER_STATUS_IN_TRANS = 1;
  11. exports.SERVER_STATUS_AUTOCOMMIT = 2; /* Server in auto_commit mode */
  12. exports.SERVER_MORE_RESULTS_EXISTS = 8; /* Multi query - next query exists */
  13. exports.SERVER_QUERY_NO_GOOD_INDEX_USED = 16;
  14. exports.SERVER_QUERY_NO_INDEX_USED = 32;
  15. /**
  16. The server was able to fulfill the clients request and opened a
  17. read-only non-scrollable cursor for a query. This flag comes
  18. in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
  19. */
  20. exports.SERVER_STATUS_CURSOR_EXISTS = 64;
  21. /**
  22. This flag is sent when a read-only cursor is exhausted, in reply to
  23. COM_STMT_FETCH command.
  24. */
  25. exports.SERVER_STATUS_LAST_ROW_SENT = 128;
  26. exports.SERVER_STATUS_DB_DROPPED = 256; /* A database was dropped */
  27. exports.SERVER_STATUS_NO_BACKSLASH_ESCAPES = 512;
  28. /**
  29. Sent to the client if after a prepared statement reprepare
  30. we discovered that the new statement returns a different
  31. number of result set columns.
  32. */
  33. exports.SERVER_STATUS_METADATA_CHANGED = 1024;
  34. exports.SERVER_QUERY_WAS_SLOW = 2048;
  35. /**
  36. To mark ResultSet containing output parameter values.
  37. */
  38. exports.SERVER_PS_OUT_PARAMS = 4096;
  39. exports.SERVER_STATUS_IN_TRANS_READONLY = 0x2000; // in a read-only transaction
  40. exports.SERVER_SESSION_STATE_CHANGED = 0x4000;