client.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This file was modified by Oracle on September 21, 2021.
  2. // New capability for multi-factor authentication based on mandatory session
  3. // trackers, that are signaled with an extra single-byte prefix on new
  4. // versions of the MySQL server.
  5. // Modifications copyright (c) 2021, Oracle and/or its affiliates.
  6. 'use strict';
  7. // Manually extracted from mysql-5.5.23/include/mysql_com.h
  8. exports.LONG_PASSWORD = 0x00000001; /* new more secure passwords */
  9. exports.FOUND_ROWS = 0x00000002; /* found instead of affected rows */
  10. exports.LONG_FLAG = 0x00000004; /* get all column flags */
  11. exports.CONNECT_WITH_DB = 0x00000008; /* one can specify db on connect */
  12. exports.NO_SCHEMA = 0x00000010; /* don't allow database.table.column */
  13. exports.COMPRESS = 0x00000020; /* can use compression protocol */
  14. exports.ODBC = 0x00000040; /* odbc client */
  15. exports.LOCAL_FILES = 0x00000080; /* can use LOAD DATA LOCAL */
  16. exports.IGNORE_SPACE = 0x00000100; /* ignore spaces before '' */
  17. exports.PROTOCOL_41 = 0x00000200; /* new 4.1 protocol */
  18. exports.INTERACTIVE = 0x00000400; /* this is an interactive client */
  19. exports.SSL = 0x00000800; /* switch to ssl after handshake */
  20. exports.IGNORE_SIGPIPE = 0x00001000; /* IGNORE sigpipes */
  21. exports.TRANSACTIONS = 0x00002000; /* client knows about transactions */
  22. exports.RESERVED = 0x00004000; /* old flag for 4.1 protocol */
  23. exports.SECURE_CONNECTION = 0x00008000; /* new 4.1 authentication */
  24. exports.MULTI_STATEMENTS = 0x00010000; /* enable/disable multi-stmt support */
  25. exports.MULTI_RESULTS = 0x00020000; /* enable/disable multi-results */
  26. exports.PS_MULTI_RESULTS = 0x00040000; /* multi-results in ps-protocol */
  27. exports.PLUGIN_AUTH = 0x00080000; /* client supports plugin authentication */
  28. exports.CONNECT_ATTRS = 0x00100000; /* permits connection attributes */
  29. exports.PLUGIN_AUTH_LENENC_CLIENT_DATA = 0x00200000; /* Understands length-encoded integer for auth response data in Protocol::HandshakeResponse41. */
  30. exports.CAN_HANDLE_EXPIRED_PASSWORDS = 0x00400000; /* Announces support for expired password extension. */
  31. exports.SESSION_TRACK = 0x00800000; /* Can set SERVER_SESSION_STATE_CHANGED in the Status Flags and send session-state change data after a OK packet. */
  32. exports.DEPRECATE_EOF = 0x01000000; /* Can send OK after a Text Resultset. */
  33. exports.SSL_VERIFY_SERVER_CERT = 0x40000000;
  34. exports.REMEMBER_OPTIONS = 0x80000000;
  35. exports.MULTI_FACTOR_AUTHENTICATION = 0x10000000; /* multi-factor authentication */