The capability flags are used by the client and server to indicate which features they support and want to use.

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 rows instead of affected rows in 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 Packet contains 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_USER in 3.22, unused in 4.0

CLIENT_INTERACTIVE

wait_timeout versus 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 SIGPIPE if 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_41 in 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_QUERY and COM_STMT_PREPARE.

Client

May send multiple statements per COM_QUERY and COM_STMT_PREPARE.

Note

Was named CLIENT_MULTI_QUERIES in 4.1.0, renamed later.

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::HandshakeResponse41 is 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.

MySQL--连接属性的更多相关文章

  1. Java Mysql连接池配置和案例分析--超时异常和处理

    前言: 最近在开发服务的时候, 发现服务只要一段时间不用, 下次首次访问总是失败. 该问题影响虽不大, 但终究影响用户体验. 观察日志后发现, mysql连接因长时间空闲而被关闭, 使用时没有死链检测 ...

  2. [原创]java WEB学习笔记80:Hibernate学习之路--- hibernate配置文件:JDBC 连接属性,C3P0 数据库连接池属性等

    本博客的目的:①总结自己的学习过程,相当于学习笔记 ②将自己的经验分享给大家,相互学习,互相交流,不可商用 内容难免出现问题,欢迎指正,交流,探讨,可以留言,也可以通过以下方式联系. 本人互联网技术爱 ...

  3. mysql连接字符集default

    用mysql客户端工具输入中文数据报错,或乱码问题解决 数据库字符集为latin1时 用mysql工具,然后选择连接>l连接属性>高级>字符集选择default

  4. 记一次网络原因导致的mysql连接中断问题(druid)

    date: 2018-04-19 21:00 tag: java,mysql,exception,mat,调试,jvm 工具: gceasy.io, MAT 线上系统出现一个诡异的bug,通过heap ...

  5. Navicat for MySQL连接出错:1251

    平台:window10 x64+mysql-8.0.15-winx64+navicat_trial_11.1.20.0(PatchNavicat破解) 错误提示:1251-Client does no ...

  6. redis mysql 连接池 之 golang 实现

    1 mysql 连接池代码 package lib import ( "database/sql" "fmt" "strconv" &quo ...

  7. mysql连接类与ORM的封装

    ORM: - ORM什么是? 类名 ---> 数据库表 对象 ---> 记录 对象.属性 ---> 字段 - ORM的优缺点: 优点: 可跨平台,可以通过对象.属性取值,对象.方法, ...

  8. Mysql 连接路径 url 参数解析

    1.mysql - url 参数解析 url:jdbc:mysql://127.0.0.1:3306/user?useUnicode=true&characterEncoding=utf8 u ...

  9. navicat for mysql连接本地数据库

    navicat for mysql连接本地数据库 打算使用navicat连接本地数据库,连接的时候,一直连接不上.然后猜想是不是本地数据库没有设置好.输入mysql,出错内容:access denie ...

  10. MySQL 连接为什么挂死了?

    摘要:本次分享的是一次关于 MySQL 高可用问题的定位过程,其中曲折颇多但问题本身却比较有些代表性,遂将其记录以供参考. 一.背景 近期由测试反馈的问题有点多,其中关于系统可靠性测试提出的问题令人感 ...

随机推荐

  1. Liunx+C编程一站式学习

    Liunx+C编程一站式学习这本书有什么特点?面向什么样的读者?这本书最初是为某培训班的嵌入式系统Linux工程师就业班课程量身定做的教材之一.该课程是为期四个月的全日制职业培训,要求学员毕业时具备非 ...

  2. Qt5.3企业版和开源版功能区别

    一: Charts Charts是QT提供的图表模块.他提供了非常简便的APIs来绘制令人惊叹的Line, Spline,Area,Scatter,Pie,Donut,Bar,Polar和Box-an ...

  3. Android下的SQLite数据库的相关操作及AndroidTestCase测试

    一:创建数据库 package com.itcode.mysqlite; import android.content.Context; import android.database.sqlite. ...

  4. Java应用开发的一条经验

    一旦为应用建立良好的基础设施, 后续的开发就会变得容易而快速.  这些基础设施包括: 1.   线程池的建立.配置: 在 JDK 并发库的基础上建立更适合于应用的并发使用接口: 2.   跨多数据源的 ...

  5. Direct3D 索引缓存

    小学的时候我们知道3个顶点组成一个三角形,那么四个顶点我们会说有4个三角形.这就是一个顶点同时参与了四次绘制三角形的结果. 在程序中也一样,比如我们绘制的两个三角形是挨着一起的,总有几个顶点是重合的. ...

  6. functools:管理函数工具(部分)

    # -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' #functools:管理函数工具 #作用:处理其他函数的函数 #版 ...

  7. 【网络协议】TCP连接的建立和释放

    转载请注明出处:http://blog.csdn.net/ns_code/article/details/29382883 TCP首部格式 先看TCP报文段的格式,例如以下; TCP报文段首部的前20 ...

  8. 域名解析 URL转发

    URL转发 转发功能:如果您没有一台独立的服务器(也就是没有一个独立的IP地址)或者您还有一个域名B,您想访问A域名时访问到B域名的内容,这时您就可以通过URL转发来实现.url转发可以转发到某一个目 ...

  9. 测试MD5的加密功能

    测试md5主要用于数据库加密.图片修改为RAR格式有源程序.

  10. MySql命令——游标

    1.游标的概念 有时,需要在检索出来的行中前进或后退一行或多行.这就是使用游标的原因.游标(cursor)是一个存储在 MySql 服务器上的数据库查询,它不是一条 select 语句,而是被该语句检 ...