summaryrefslogtreecommitdiff
path: root/mysql-test/r/strict_autoinc_1myisam.result
diff options
context:
space:
mode:
authorunknown <acurtis/antony@xiphis.org/ltantony.xiphis.org>2006-08-30 13:20:39 -0700
committerunknown <acurtis/antony@xiphis.org/ltantony.xiphis.org>2006-08-30 13:20:39 -0700
commit2233201ba715bb733af86cddd1305ee389897d4b (patch)
tree8420b990a80a44f9a16ab6d77359c0a179d2893a /mysql-test/r/strict_autoinc_1myisam.result
parent69a29c1ea143387588367afbc3121fce4d977415 (diff)
downloadmariadb-git-2233201ba715bb733af86cddd1305ee389897d4b.tar.gz
Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max" Strict mode should fail if autoincrement value is out of range include/my_base.h: Add new handler error codes sql/ha_berkeley.cc: handle error in update_auto_increment() sql/ha_heap.cc: handle error in update_auto_increment() sql/ha_innodb.cc: handle error in update_auto_increment() sql/ha_myisam.cc: handle error in update_auto_increment() sql/ha_myisammrg.cc: handle error in update_auto_increment() sql/ha_ndbcluster.cc: handle error in update_auto_increment() sql/handler.cc: return error from handler::update_auto_increment() sql/handler.h: change return type of handler::update_auto_increment() to int sql/share/errmsg.txt: new error message for auto-increment mysql-test/include/strict_autoinc.inc: New BitKeeper file ``mysql-test/include/strict_autoinc.inc'' mysql-test/r/strict_autoinc_1myisam.result: New BitKeeper file ``mysql-test/r/strict_autoinc_1myisam.result'' mysql-test/r/strict_autoinc_2innodb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_2innodb.result'' mysql-test/r/strict_autoinc_3heap.result: New BitKeeper file ``mysql-test/r/strict_autoinc_3heap.result'' mysql-test/r/strict_autoinc_4bdb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_4bdb.result'' mysql-test/r/strict_autoinc_5ndb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_5ndb.result'' mysql-test/t/strict_autoinc_1myisam.test: New BitKeeper file ``mysql-test/t/strict_autoinc_1myisam.test'' mysql-test/t/strict_autoinc_2innodb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_2innodb.test'' mysql-test/t/strict_autoinc_3heap.test: New BitKeeper file ``mysql-test/t/strict_autoinc_3heap.test'' mysql-test/t/strict_autoinc_4bdb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_4bdb.test'' mysql-test/t/strict_autoinc_5ndb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_5ndb.test''
Diffstat (limited to 'mysql-test/r/strict_autoinc_1myisam.result')
-rw-r--r--mysql-test/r/strict_autoinc_1myisam.result27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/strict_autoinc_1myisam.result b/mysql-test/r/strict_autoinc_1myisam.result
new file mode 100644
index 00000000000..5d3c2698cda
--- /dev/null
+++ b/mysql-test/r/strict_autoinc_1myisam.result
@@ -0,0 +1,27 @@
+set @org_mode=@@sql_mode;
+create table t1
+(
+`a` tinyint(4) NOT NULL auto_increment,
+primary key (`a`)
+) engine = 'MYISAM' ;
+set @@sql_mode='strict_all_tables';
+insert into t1 values(1000);
+ERROR 22003: Out of range value adjusted for column 'a' at row 1
+select count(*) from t1;
+count(*)
+0
+set auto_increment_increment=1000;
+set auto_increment_offset=700;
+insert into t1 values(null);
+ERROR 22003: Out of range value adjusted for column 'a' at row 1
+select count(*) from t1;
+count(*)
+0
+set @@sql_mode=@org_mode;
+insert into t1 values(null);
+Warnings:
+Warning 1264 Out of range value adjusted for column 'a' at row 1
+select * from t1;
+a
+127
+drop table t1;