summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-09-18 01:10:09 +0400
committerunknown <konstantin@mysql.com>2004-09-18 01:10:09 +0400
commit52683755d3572722bdd32ffe7ae2e6d237d6066d (patch)
tree4fda0b8703de3f38c95d4d7ae20ac12a077cdcb9 /mysql-test/r
parentca65afeb72e7f514d51b7dcf2cc49e85a3b92677 (diff)
downloadmariadb-git-52683755d3572722bdd32ffe7ae2e6d237d6066d.tar.gz
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.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ps.result19
-rw-r--r--mysql-test/r/ps_2myisam.result2
-rw-r--r--mysql-test/r/ps_3innodb.result2
-rw-r--r--mysql-test/r/ps_4heap.result2
-rw-r--r--mysql-test/r/ps_5merge.result4
-rw-r--r--mysql-test/r/ps_6bdb.result2
6 files changed, 25 insertions, 6 deletions
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;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 16d3cdbbb47..7e183118e61 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1015,7 +1015,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
a b
1 one
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 865b108d7ed..d33e3c610c0 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1015,7 +1015,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
a b
0 two
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index 1cc18575dd1..b5888795666 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1016,7 +1016,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
a b
1 one
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 2d67635cc10..7d78f4b9e1c 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1058,7 +1058,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
a b
3 three
@@ -2253,7 +2253,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
a b
3 three
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index 8fe76dae3ab..c5cde1b755a 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -1015,7 +1015,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
a b
0 two