1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

LAST_INSERT_ID() should not be set if we couldn't generate an auto_increment id.

This commit is contained in:
monty@mashka.mysql.fi
2003-06-30 13:28:36 +03:00
parent dbebed97e4
commit 6bc7b3a6be
4 changed files with 29 additions and 3 deletions

View File

@@ -80,6 +80,9 @@ insert into t1 set i = 254;
insert into t1 set i = null;
select last_insert_id();
--error 1062
insert into t1 set i = 254;
select last_insert_id();
--error 1062
insert into t1 set i = null;
select last_insert_id();
drop table t1;
@@ -100,5 +103,6 @@ select last_insert_id();
--error 1062
insert into t1 values (NULL, 10);
select last_insert_id();
drop table t1;