mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Manually merged
This commit is contained in:
@@ -238,6 +238,23 @@ SHOW CREATE TABLE `t1`;
|
||||
|
||||
DROP TABLE `t1`;
|
||||
|
||||
#
|
||||
# Bug #6880: LAST_INSERT_ID() within a statement
|
||||
#
|
||||
|
||||
create table t1(a int not null auto_increment primary key);
|
||||
create table t2(a int not null auto_increment primary key, t1a int);
|
||||
insert into t1 values(NULL);
|
||||
insert into t2 values (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID());
|
||||
insert into t1 values (NULL);
|
||||
insert into t2 values (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()),
|
||||
(NULL, LAST_INSERT_ID());
|
||||
insert into t1 values (NULL);
|
||||
insert into t2 values (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()),
|
||||
(NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID());
|
||||
select * from t2;
|
||||
drop table t1, t2;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user