Bug #49686 timestamp in SHOW GLOBAL VARIABLES statement
Submitted: 14 Dec 2009 18:02 Modified: 26 Oct 2010 19:16
Reporter: Lig Isler-Turmelle Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Options Severity:S2 (Serious)
Version: OS:Any
Assigned to: CPU Architecture:Any

[14 Dec 2009 18:02] Lig Isler-Turmelle
Description:
There is a change in behavior between 5.0 and 5.1 in regards to the timestamp value in the output of SHOW GLOBAL VARIABLES.

mysql> select version();
+--------------------------+
| version()                |
+--------------------------+
| 5.0.82sp1-enterprise-gpl | 
+--------------------------+
1 row in set (0.03 sec)

mysql> show global variables like 'timestamp';
Empty set (0.03 sec)

----------

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

mysql> show global variables like 'timestamp';
+---------------+------------+
| Variable_name | Value      |
+---------------+------------+
| timestamp     | 1260810391 |
+---------------+------------+
1 row in set (0.02 sec)

In both manuals for 5.0 and 5.1 this is listed as *only* a session variable not a global variable which is what I asked for in my SHOW command.

How to repeat:
in 5.0 
mysql> SHOW GLOBAL VARIABLES LIKE 'timestamp';

in 5.1
mysql> SHOW GLOBAL VARIABLES LIKE 'timestamp';

Compare result sets.

Suggested fix:
Remove timestamp from the output of GLOBAL variables or clarify the docs that it is now in the GLOBAL variables.
[26 Oct 2010 19:16] Konstantin Osipov
Fixed in 5.5:
kostja@ibbur:~$ mysql test -uroot
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.8-ga-valgrind-max-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW GLOBAL VARIABLES LIKE 'timestamp';
Empty set (0.00 sec)

mysql>