Bug #34678 @@debug variable's incremental mode
Submitted: 19 Feb 2008 22:01 Modified: 16 Apr 2008 14:18
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Davi Arnaut CPU Architecture:Any

[19 Feb 2008 22:01] Sergei Golubchik
Description:
@@debug variable handles dbug incremental mode incorrectly

How to repeat:
mysql> select @@debug;
+---------+
| @@debug |
+---------+
|         | 
+---------+
mysql> set debug='T';
Query OK, 0 rows affected (0.00 sec)
mysql> select @@debug;
+---------+
| @@debug |
+---------+
| T       | 
+---------+
mysql> set debug='+P';
Query OK, 0 rows affected (0.00 sec)
mysql> select @@debug;
+---------+
| @@debug |
+---------+
| P       | 
+---------+

must be 'T:P'

Suggested fix:
use DBUG_SET instead of a pair DBUG_POP/DBUG_PUSH in sys_var_thd_dbug::update()
[26 Feb 2008 15:13] Davi Arnaut
Queued in 5.1-runtime

http://lists.mysql.com/commits/42996

ChangeSet@1.2580, 2008-02-26 12:03:59-03:00, davi@mysql.com +7 -0
  Bug#34424 query_cache_debug.test leads to valgrind warnings
  Bug#34678 @@debug variable's incremental mode
[3 Mar 2008 18:19] Bugs System
Pushed into 5.1.24-rc
[3 Mar 2008 18:19] Bugs System
Pushed into 6.0.5-alpha
[2 Apr 2008 20:10] Jon Stephens
Pushed into 5.1.23-ndb-6.3.11.
[16 Apr 2008 14:18] Paul DuBois
Noted in 5.1.24, 6.0.5 changelogs.

Assigning an incremental value to the debug system variable did not
add the new value to the current value. For example, if the current
debug value was 'T', the statement SET debug = '+P' resulted in a
value of 'P' rather than the correct value of 'P:T'.