Bug #26266 autocommit not visible in SHOW VARIABLES output
Submitted: 11 Feb 2007 10:14 Modified: 3 Jan 2008 7:18
Reporter: Roland Bouman Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.2,5.1 OS:Linux (Linux, windows)
Assigned to: CPU Architecture:Any
Tags: autocommit, server variables, show variables
Triage: D4 (Minor)

[11 Feb 2007 10:14] Roland Bouman
Description:
Most if not all variables listed in http://dev.mysql.com/doc/refman/5.1/en/dynamic-system-variables.html show up in the SHOW VARIABLES output. 

For some reason, the value of the autocommit setting does not show up there.

How to repeat:
mysql> show variables like 'autocommit';
Empty set (0.01 sec)

mysql> select @@autocommit;
+--------------+
| @@autocommit |
+--------------+
|            1 |
+--------------+
1 row in set (0.03 sec)

Suggested fix:
Please list autocommit in SHOW VARIABLES output.
[12 Feb 2007 10:02] Valeriy Kravchuk
Thank you for a bug report. Verified just as described with latest 5.1.16-BK on Linux. As autocommit is listed at http://dev.mysql.com/doc/refman/5.0/en/dynamic-system-variables.html, it is dynamic SESSION-level system variable, so it should appear in results of SHOW SESSION VARIABLES.
[3 Jan 2008 7:18] Valeriy Kravchuk
Looks like this is already fixed:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot test -P3310
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.21-beta-community-debug MySQL Community Server - Debug (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show session variables like 'a%';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| auto_increment_increment | 1     |
| auto_increment_offset    | 1     |
| autocommit               | ON    |
| automatic_sp_privileges  | ON    |
+--------------------------+-------+
4 rows in set (0.03 sec)

mysql> show global variables like 'a%';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| auto_increment_increment | 1     |
| auto_increment_offset    | 1     |
| autocommit               | ON    |
| automatic_sp_privileges  | ON    |
+--------------------------+-------+
4 rows in set (0.01 sec)