Bug #34882 Valid values are not allowed to assign in variable max_delayed_threads
Submitted: 27 Feb 2008 11:11 Modified: 31 Mar 2008 19:59
Reporter: Salman Rawala Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[27 Feb 2008 11:11] Salman Rawala
Description:
When you assign any valid to Global scope of the variable, it works fine, but when you assign any that valid value to session scope of the variable, it gives error that the value is invalid.

How to repeat:
Sample Code: 
 
SET @@global.max_delayed_threads = 1;
SELECT @@global.max_delayed_threads;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_delayed_threads = 1;

Actual Output
SET @@global.max_delayed_threads = 1;
SELECT @@global.max_delayed_threads;
@@global.max_delayed_threads
1

SET @@session.max_delayed_threads = 1;
ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '1'
[27 Feb 2008 11:43] Valeriy Kravchuk
Sorry, but I can not repeat the behaviour described with 5.1.23-rc:

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

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

mysql> SET @@global.max_delayed_threads = 1;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @@global.max_delayed_threads;
+------------------------------+
| @@global.max_delayed_threads |
+------------------------------+
|                            1 |
+------------------------------+
1 row in set (0.00 sec)

mysql> SELECT @@session.max_delayed_threads;
+-------------------------------+
| @@session.max_delayed_threads |
+-------------------------------+
|                            20 |
+-------------------------------+
1 row in set (0.00 sec)

mysql> SET @@session.max_delayed_threads=1;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @@session.max_delayed_threads;
+-------------------------------+
| @@session.max_delayed_threads |
+-------------------------------+
|                             1 |
+-------------------------------+
1 row in set (0.00 sec)
[26 Mar 2008 6:42] Salman Rawala
Verified this on 5.1.23 on Windows XP, and this this bug is still reproducible 

C:\MySQL\mysql-5.1.23-rc-win32\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.22-rc-community-log MySQL Community Server (GPL)

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

mysql> SET @@session.max_delayed_threads = 20;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @@session.max_delayed_threads;
+-------------------------------+
| @@session.max_delayed_threads |
+-------------------------------+
|                            20 |
+-------------------------------+
1 row in set (0.00 sec)

mysql> SET @@session.max_delayed_threads = 2;
ERROR 1231 (42000): Variable 'max_delayed_threads' can't be set to the value of
'2'
[27 Mar 2008 9:53] Sergei Golubchik
This needs to be documented.
The only valid values for @@session.max_delayed_threads are @@global.max_delayed_threads and 0.
[31 Mar 2008 19:59] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.