From 4148c9f9f60b3a813e3ee0e7423fa83b711d0a66 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 18 Sep 2004 01:10:09 +0400 Subject: A fix and test case for bug#5510 "inserting Null in AutoIncrement primary key Column Fails". mysql-test/r/ps.result: Test results updated: a test case for Bug#5510 "inserting Null in AutoIncrement primary key Column Fails". mysql-test/r/ps_2myisam.result: Bug#5510: a different warning in case of NULL->default truncation.This is OK, the new warning is the same as produced by conventional execution. mysql-test/r/ps_3innodb.result: Bug#5510: a different warning in case of NULL->default truncation.This is OK, the new warning is the same as produced by conventional execution. mysql-test/r/ps_4heap.result: Bug#5510: a different warning in case of NULL->default truncation.This is OK, the new warning is the same as produced by conventional execution. mysql-test/r/ps_5merge.result: Bug#5510: a different warning in case of NULL->default truncation.This is OK, the new warning is the same as produced by conventional execution. mysql-test/r/ps_6bdb.result: Bug#5510: a different warning in case of NULL->default truncation.This is OK, the new warning is the same as produced by conventional execution. mysql-test/t/ps.test: A test case for Bug#5510 "inserting Null in AutoIncrement primary key Column Fails". sql/item.cc: A fix for bug#5510 "inserting Null in AutoIncrement primary key Column Fails": use proper Field API function for NULL placholeders. --- mysql-test/r/ps.result | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/r/ps.result') diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 321b8894796..8742ac29989 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -270,3 +270,22 @@ execute stmt using @var; a deallocate prepare stmt; drop table t1; +create table t1 (a bigint(20) not null primary key auto_increment); +insert into t1 (a) values (null); +select * from t1; +a +1 +prepare stmt from "insert into t1 (a) values (?)"; +set @var=null; +execute stmt using @var; +select * from t1; +a +1 +2 +drop table t1; +create table t1 (a timestamp not null); +prepare stmt from "insert into t1 (a) values (?)"; +execute stmt using @var; +select * from t1; +deallocate prepare stmt; +drop table t1; -- cgit v1.2.1