[MDEV-6940] SET STATEMENT executed after SET GLOBAL does not work Created: 2014-10-24  Updated: 2015-02-02  Resolved: 2014-10-26

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: N/A
Fix Version/s: 10.1.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5231 Per query variables from Percona Serv... Closed
relates to MDEV-6923 Testing for SET STATEMENT .. FOR (MDE... Closed

 Description   

Results of the test case below

MariaDB [test]> # SET STATEMENT works (OK)
MariaDB [test]> set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
+---------------------+
| @@lock_wait_timeout |
+---------------------+
|                   1 |
+---------------------+
1 row in set (0.01 sec)
 
MariaDB [test]> # Setting a totally unrelated global variable
MariaDB [test]> set global general_log=0;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> # SET STATEMENT does not work anymore (FAIL)
MariaDB [test]> set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
+---------------------+
| @@lock_wait_timeout |
+---------------------+
|            31536000 |
+---------------------+
1 row in set (0.00 sec)

Test case

--echo # SET STATEMENT works (OK)
set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
 
--echo # Setting a totally unrelated global variable
set global general_log=0;
 
--echo # SET STATEMENT does not work anymore (FAIL)
set statement lock_wait_timeout=1 for select @@lock_wait_timeout;

Current revision

commit 3a3f88e789a41b309cfe902f4823c9c7ebbce6ca
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date:   Fri Oct 24 10:13:08 2014 +0200
 
    MDEV-5231: Per query variables from Percona Server (rewritten)
elenst@wheezy-64:~/git/bb-10.1-set-statement$ 

Also reproducible with Percona-server (it's even worse there).



 Comments   
Comment by Oleksandr Byelkin [ 2014-10-26 ]

this strange 31536000 is actually what the wariable return as it value when we are saving old values.

Generated at Thu Feb 08 07:15:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.