Bug #30651 Problems with thread_handling system variable
Submitted: 27 Aug 2007 19:24 Modified: 6 Feb 2008 17:34
Reporter: Paul Dubois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[27 Aug 2007 19:24] Paul Dubois
Description:
In MySQL 5.1.17, the thread_handling system variable was added, which takes values one-thread (server uses one thread) or one-thread-per-connection (server uses multiple threads).

Problem 1.

As this variable controls threading behavior for client connections, it does not make sense (I think) for it to have a session value.  Yet, the server reports such a value:

mysql> select @@session.thread_handling;
+---------------------------+
| @@session.thread_handling |
+---------------------------+
| one-thread-per-connection | 
+---------------------------+

Probably the server should report this error:

ERROR 1238 (HY000): Variable 'thread_handling' is a GLOBAL variable

Problem 2.

It is unclear whether it should be possible to change this variable at runtime. The server does not report an error when you do so, but neither does it change the value:

mysql> set GLOBAL thread_handling='one-thread';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@global.thread_handling;
+---------------------------+
| @@global.thread_handling  |
+---------------------------+
| one-thread-per-connection | 
+---------------------------+

If the variable should not be settable at runtime, the "set GLOBAL" statement should result in an error.

If the variable should be settable at runtime, the server should change its value correctly.

How to repeat:
See above.
[27 Aug 2007 19:41] Sveta Smirnova
Thank you for the report.

Verified as described.
[11 Dec 2007 22:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

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

ChangeSet@1.2681, 2007-12-11 17:30:42-05:00, dkatz@damien-katzs-computer.local +4 -0
  Bug #30651	Problems with thread_handling system variable
  
  Changed thread_handling variable to a global only, read only variable, as it is currently used.
[15 Dec 2007 14:27] Konstantin Osipov
Approved by email.
[16 Dec 2007 11:43] Bugs System
Pushed into 5.1.23-rc
[16 Dec 2007 11:45] Bugs System
Pushed into 6.0.5-alpha
[5 Feb 2008 12:05] Konstantin Osipov
Pushed into 6.0.5
[6 Feb 2008 17:34] Paul Dubois
Noted in 5.1.23, 6.0.5 changelogs.

The thread_handling system variable was treated as having a SESSION
value and as being settable at runtime. Now it has only a GLOBAL
read-only value.