mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed that sequences and default works with ps-protocol
The bug was that for prepared statments the new TABLE_LIST was allocated in the wrong arena.
This commit is contained in:
@ -152,6 +152,22 @@ UNLOCK TABLES;
|
||||
drop table t1;
|
||||
drop sequence s1;
|
||||
#
|
||||
# Testing prepared statements
|
||||
#
|
||||
CREATE or replace SEQUENCE s1 nocache engine=myisam;
|
||||
CREATE or replace table t1 (a int default next value for s1, b int);
|
||||
PREPARE stmt FROM "insert into t1 (b) values(?)";
|
||||
execute stmt using 1;
|
||||
execute stmt using 2;
|
||||
execute stmt using 3;
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
drop table t1,s1;
|
||||
deallocate prepare stmt;
|
||||
#
|
||||
# Wrong usage of default
|
||||
#
|
||||
CREATE table t1 (a int default next value for s1, b int);
|
||||
|
Reference in New Issue
Block a user