1
0
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:
Monty
2018-01-03 00:12:36 +02:00
parent 86cf60a615
commit 36ba58cb75
3 changed files with 67 additions and 8 deletions

View File

@ -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);