Bug #66884 | SERVER_STATUS is always inited with SERVER_STATUS_AUTOCOMMIT=1 | ||
---|---|---|---|
Submitted: | 20 Sep 2012 3:16 | Modified: | 29 Jan 2013 20:03 |
Reporter: | dennis GAO | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Options | Severity: | S3 (Non-critical) |
Version: | 5.5, 5.0.97, 5.1.69, 5.5.31, 5.7.1 | OS: | Linux (I only test it on ubuntu 11.10) |
Assigned to: | CPU Architecture: | Any | |
Tags: | autocommit |
[20 Sep 2012 3:16]
dennis GAO
[20 Sep 2012 7:56]
Peter Laursen
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_autocommit "Before MySQL 5.5.8, the global autocommit value cannot be set at startup. As a workaround, set the init_connect system variable: SET GLOBAL init_connect='SET autocommit=0';" .. wo what is the exact version you are using? Peter (not a MySQL/Oracle person)
[20 Sep 2012 9:30]
dennis GAO
My mysql version: Server version: 5.5.13-debug-log Source distribution. And I think I set the global and session variable successfully by adding "autocommit=0" into my.cnf before starting the mysqld server. Now the problem is that the return OK packet contains a SERVER_STATUS with a wrong value for SERVER_STATUS_AUTOCOMMIT. If I start mysqld with autocommit=0, the OK packet should contains SERVER_STATUS with SERVER_STATUS_AUTOCOMMIT=0, rather than 1.
[20 Sep 2012 12:36]
Davi Arnaut
Yeah, the flag is not properly adjusted when the session is initialized (or reinitialized). See THD::init, compare to how the NO_BACKSLASH_ESCAPES value is properly reflected in the server_status flag.
[29 Jan 2013 20:03]
Sveta Smirnova
Thank you for the report. Verified as described.
[9 Jan 2017 18:01]
Rene' Cannao'
tcpdump output
Attachment: 66884.tcp.txt (text/plain), 9.53 KiB.
[9 Jan 2017 18:04]
Rene' Cannao'
It seems that not only SERVER_STATUS is always inited with SERVER_STATUS_AUTOCOMMIT=1 , but also running "set autocommit=0" doesn't change SERVER_STATUS with SERVER_STATUS_AUTOCOMMIT=0 . See attached file