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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user