summaryrefslogtreecommitdiff
path: root/mysql-test/r/auto_increment.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-06-08 22:12:44 +0300
committerMichael Widenius <monty@askmonty.org>2012-06-08 22:12:44 +0300
commit438e9eca68c45e3e735ed21dfaccaf29b0ca16b1 (patch)
tree0342d0af4f883d07465996d361059d4585a16f5b /mysql-test/r/auto_increment.result
parentcb6109cde188b5e018f2169e43bb08ac2bc3e68f (diff)
downloadmariadb-git-438e9eca68c45e3e735ed21dfaccaf29b0ca16b1.tar.gz
Changed last_insert_id() to be unsigned.
Fixed MDEV-331: last_insert_id() returns a signed number mysql-test/r/auto_increment.result: Added test case mysql-test/t/auto_increment.test: Added test case sql/item_func.h: Changed last_insert_id() to be unsigned.
Diffstat (limited to 'mysql-test/r/auto_increment.result')
-rw-r--r--mysql-test/r/auto_increment.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index d21e78428c5..30b4ff11227 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -516,3 +516,25 @@ pk
1
18446744073709551614
DROP TABLE t1;
+CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
+insert into t1 values((1<<63)+1);
+insert into t1 values(null);
+select last_insert_id();
+last_insert_id()
+9223372036854775810
+select * from t1;
+pk
+9223372036854775809
+9223372036854775810
+drop table t1;
+CREATE TABLE t1 (pk BIGINT AUTO_INCREMENT, PRIMARY KEY (pk));
+insert into t1 values(-5);
+insert into t1 values(null);
+select last_insert_id();
+last_insert_id()
+1
+select * from t1;
+pk
+-5
+1
+drop table t1;