mirror of
https://github.com/MariaDB/server.git
synced 2025-10-31 15:50:51 +03:00
A fix and a test case for Bug#9359 "Prepared statements take snapshot
of system vars at PREPARE time": implement a special Item to handle system variables. This item substitutes itself with a basic constant containing variable value at fix_fields.
This commit is contained in:
@@ -702,4 +702,20 @@ select ??;
|
||||
select ? from t1;
|
||||
--enable_ps_protocol
|
||||
drop table t1;
|
||||
#
|
||||
#
|
||||
# Bug#9359 "Prepared statements take snapshot of system vars at PREPARE
|
||||
# time"
|
||||
#
|
||||
prepare stmt from "select @@time_zone";
|
||||
execute stmt;
|
||||
set @@time_zone:='Japan';
|
||||
execute stmt;
|
||||
prepare stmt from "select @@tx_isolation";
|
||||
execute stmt;
|
||||
set transaction isolation level read committed;
|
||||
execute stmt;
|
||||
set transaction isolation level serializable;
|
||||
execute stmt;
|
||||
set @@tx_isolation=default;
|
||||
execute stmt;
|
||||
deallocate prepare stmt;
|
||||
|
||||
Reference in New Issue
Block a user