MySQL--连接属性
2016-07-24 19:09
627 查看
The capability flags are used by the client and server to indicate which features they support and want to use.
Use the improved version of
Note
Assumed to be set since 4.1.1.
Value
0x00000001
Send
Value
0x00000002
Longer flags in
Value
0x00000004
Server
Supports longer flags.
Client
Expects longer flags.
Database (schema) name can be specified on connect in
Value
0x00000008
Server
Supports schema-name in
Client
Value
0x00000010
Server
Do not permit
Compression protocol supported.
Value
0x00000020
Server
Supports compression.
Client
Switches to Compression compressed protocol after successful authentication.
Value
0x00000040
Special handling of ODBC behavior.
Note
No special behavior since 3.22.
Can use
Value
0x00000080
Server
Enables the LOCAL INFILE request of LOAD DATA|XML.
Client
Will handle LOCAL INFILE request.
Value
0x00000100
Server
Parser can ignore spaces before
Client
Let the parser ignore spaces before
Value
0x00000200
Server
Supports the 4.1 protocol.
Client
Uses the 4.1 protocol.
Note
this value was
Value
0x00000400
Server
Supports interactive and noninteractive clients.
Client
Client is interactive.
See
mysql_real_connect()
Value
0x00000800
Server
Supports SSL.
Client
Switch to SSL after sending the capability-flags.
Value
0x00001000
Client
Do not issue
See
mysql_real_connect()
Value
0x00002000
Server
Can send status flags in
Client
Expects status flags in
Note
This flag is optional in 3.23, but always set by the server since 4.0.
Unused.
Value
0x00004000
Note
Was named
Value
0x00008000
Server
Supports
Client
Supports
Value
0x00010000
Server
Can handle multiple statements per
Client
May send multiple statements per
Note
Was named
Requires
Value
0x00020000
Server
Can send multiple resultsets for
Client
Can handle multiple resultsets for
Requires
Server
Can send multiple resultsets for
Client
Can handle multiple resultsets for
Value
0x00040000
Requires
Value
0x00080000
Server
Sends extra data in Initial Handshake Packet and supports the pluggable authentication protocol.
Client
Supports authentication plugins.
Requires
Value
0x00100000
Server
Permits connection attributes in
Client
Sends connection attributes in
Value
0x00200000
Server
Understands length-encoded integer for auth response data in
Client
Length of auth response data in
Note
The flag was introduced in 5.6.6, but had the wrong value.
Value
0x00400000
Server
Announces support for expired password extension.
Client
Can handle expired passwords.
Value
0x00800000
Server
Can set SERVER_SESSION_STATE_CHANGED in the Status Flags and send session-state change data after a OK packet.
Client
Expects the server to send sesson-state changes after a OK packet.
Value
0x01000000
Server
Can send OK after a Text Resultset.
Client
Expects an OK (instead of EOF) after the resultset rows of a Text Resultset.
Background
To support
Therefore, the EOF packet in the Text Resultset is replaced with an OK packet. EOF packets are deprecated as of MySQL 5.7.5.
Protocol::CapabilityFlags:
CLIENT_LONG_PASSWORD
Use the improved version of
Old Password Authentication.
Note
Assumed to be set since 4.1.1.
Value
0x00000001
CLIENT_FOUND_ROWS
Send
found rowsinstead of
affected rowsin
EOF_Packet.
Value
0x00000002
CLIENT_LONG_FLAG
Longer flags in
Protocol::ColumnDefinition320.
Value
0x00000004
Server
Supports longer flags.
Client
Expects longer flags.
CLIENT_CONNECT_WITH_DB
Database (schema) name can be specified on connect in
Handshake Response Packet.
Value
0x00000008
Server
Supports schema-name in
Handshake Response Packet.
Client
Handshake Response Packetcontains a schema-name.
CLIENT_NO_SCHEMA
Value
0x00000010
Server
Do not permit
database.table.column.
CLIENT_COMPRESS
Compression protocol supported.
Value
0x00000020
Server
Supports compression.
Client
Switches to Compression compressed protocol after successful authentication.
CLIENT_ODBC
Value
0x00000040
Special handling of ODBC behavior.
Note
No special behavior since 3.22.
CLIENT_LOCAL_FILES
Can use
LOAD DATA LOCAL.
Value
0x00000080
Server
Enables the LOCAL INFILE request of LOAD DATA|XML.
Client
Will handle LOCAL INFILE request.
CLIENT_IGNORE_SPACE
Value
0x00000100
Server
Parser can ignore spaces before
'('.
Client
Let the parser ignore spaces before
'('.
CLIENT_PROTOCOL_41
Value
0x00000200
Server
Supports the 4.1 protocol.
Client
Uses the 4.1 protocol.
Note
this value was
CLIENT_CHANGE_USERin 3.22, unused in 4.0
CLIENT_INTERACTIVE
wait_timeoutversus
wait_interactive_timeout.
Value
0x00000400
Server
Supports interactive and noninteractive clients.
Client
Client is interactive.
See
mysql_real_connect()
CLIENT_SSL
Value
0x00000800
Server
Supports SSL.
Client
Switch to SSL after sending the capability-flags.
CLIENT_IGNORE_SIGPIPE
Value
0x00001000
Client
Do not issue
SIGPIPEif network failures occur (libmysqlclient only).
See
mysql_real_connect()
CLIENT_TRANSACTIONS
Value
0x00002000
Server
Can send status flags in
EOF_Packet.
Client
Expects status flags in
EOF_Packet.
Note
This flag is optional in 3.23, but always set by the server since 4.0.
CLIENT_RESERVED
Unused.
Value
0x00004000
Note
Was named
CLIENT_PROTOCOL_41in 4.1.0.
CLIENT_SECURE_CONNECTION
Value
0x00008000
Server
Supports
Authentication::Native41.
Client
Supports
Authentication::Native41.
CLIENT_MULTI_STATEMENTS
Value
0x00010000
Server
Can handle multiple statements per
COM_QUERYand
COM_STMT_PREPARE.
Client
May send multiple statements per
COM_QUERYand
COM_STMT_PREPARE.
Note
Was named
CLIENT_MULTI_QUERIESin 4.1.0, renamed later.
Requires
CLIENT_PROTOCOL_41
CLIENT_MULTI_RESULTS
Value
0x00020000
Server
Can send multiple resultsets for
COM_QUERY.
Client
Can handle multiple resultsets for
COM_QUERY.
Requires
CLIENT_PROTOCOL_41
CLIENT_PS_MULTI_RESULTS
Server
Can send multiple resultsets for
COM_STMT_EXECUTE.
Client
Can handle multiple resultsets for
COM_STMT_EXECUTE.
Value
0x00040000
Requires
CLIENT_PROTOCOL_41
CLIENT_PLUGIN_AUTH
Value
0x00080000
Server
Sends extra data in Initial Handshake Packet and supports the pluggable authentication protocol.
Client
Supports authentication plugins.
Requires
CLIENT_PROTOCOL_41
CLIENT_CONNECT_ATTRS
Value
0x00100000
Server
Permits connection attributes in
Protocol::HandshakeResponse41.
Client
Sends connection attributes in
Protocol::HandshakeResponse41.
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
Value
0x00200000
Server
Understands length-encoded integer for auth response data in
Protocol::HandshakeResponse41.
Client
Length of auth response data in
Protocol::HandshakeResponse41is a length-encoded integer.
Note
The flag was introduced in 5.6.6, but had the wrong value.
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS
Value
0x00400000
Server
Announces support for expired password extension.
Client
Can handle expired passwords.
CLIENT_SESSION_TRACK
Value
0x00800000
Server
Can set SERVER_SESSION_STATE_CHANGED in the Status Flags and send session-state change data after a OK packet.
Client
Expects the server to send sesson-state changes after a OK packet.
CLIENT_DEPRECATE_EOF
Value
0x01000000
Server
Can send OK after a Text Resultset.
Client
Expects an OK (instead of EOF) after the resultset rows of a Text Resultset.
Background
To support
CLIENT_SESSION_TRACK, additional information must be sent after all successful commands. Although the OK packet is extensible, the EOF packet is not due to the overlap of its bytes with the content of the Text Resultset Row.
Therefore, the EOF packet in the Text Resultset is replaced with an OK packet. EOF packets are deprecated as of MySQL 5.7.5.
相关文章推荐
- 使用阿里云云服务器Ubuntu14.0.4系统安装mysql修改默认编码导致mysqld.sock消失的问题
- mysql分表场景分析与简单分表操作
- mysql事务和innodb锁
- mysql 数据类型
- Windows Server 2003开机自动启动MySQL服务设置方法
- mysql索引优化
- mysql_5.7.13_绿色版配置
- MySQL 常用函数
- MySQL 运算符
- JDBC连接MySQL数据库步骤
- MySQL 常用语法总结
- org.gjt.mm.mysql.Driver和com.mysql.jdbc.Driver到底有啥区别
- MySQL常用指令(备查)
- mysql外键约束
- Mysql命令大全
- mysql 表级修改字符集列级别不一定自动继承表级字符集
- mysql性能优化
- mysql主从复制介绍
- mysql中的dual表
- 高性能MySQL-Schema与数据类型优化