Bug #27603 Autocommit is not available in either SHOW STATUS or SHOW VARIABLES
Submitted: 3 Apr 2007 0:55 Modified: 29 Sep 2009 15:00
Reporter: Shawn Green Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:5.0.38-enterprise OS:Any (any)
Assigned to: CPU Architecture:Any
Tags: autocommit, variable

[3 Apr 2007 0:55] Shawn Green
Description:
Trying to view the status of the autocommit variable. It is not listed in either SHOW VARIABLES, SHOW STATUS, or SHOW GLOBAL STATUS. This is clearly a variable, because you can set it, and as such should appear along with all of the other variables in the SHOW VARIABLES report.

Being available by way of the query "SELECT @@autocommit;" does not count as it is a variable and should be in the SHOW VARIABLES report.

How to repeat:
Look at the output from SHOW VARIABLES, SHOW STATUS, or SHOW GLOBAL STATUS for the value of autocommit.

Suggested fix:
Add autocommit to the SHOW VARIABLES report.
[3 Apr 2007 16:05] Stefan Hinz
This doesn't look like a documentation request to me. I've changed the bug category to Server:Parser.
[4 Oct 2007 15:52] Paul DuBois
The problem described in this bug report is true for pretty much every session-only variable. Try to use SHOW to get any of the variables listed here:

http://dev.mysql.com/doc/refman/5.0/en/set-option.html
[1 Oct 2008 20:22] Konstantin Osipov
I can't repeat it:
mysql> show session variables like '%autocommit%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit    | ON    | 
+---------------+-------+
1 row in set (0.00 sec)

mysql> select @@version;
+--------------------------------+
| @@version                      |
+--------------------------------+
| 6.0.8-alpha-valgrind-max-debug | 
+--------------------------------+
1 row in set (0.00 sec)
[29 Sep 2009 15:00] Valeriy Kravchuk
This is implemented in MySQL 5.1 already:

mysql> select version();
+------------------+
| version()        |
+------------------+
| 5.1.39-community |
+------------------+
1 row in set (0.00 sec)

mysql> show session variables like '%auto%';
+-----------------------------+-------+
| Variable_name               | Value |
+-----------------------------+-------+
| auto_increment_increment    | 1     |
| auto_increment_offset       | 1     |
| autocommit                  | ON    |
| automatic_sp_privileges     | ON    |
| innodb_autoextend_increment | 8     |
| innodb_autoinc_lock_mode    | 1     |
| sql_auto_is_null            | ON    |
+-----------------------------+-------+
7 rows in set (0.00 sec)