diff options
-rw-r--r-- | mysql-test/r/strict_autoinc_1myisam.result | 6 | ||||
-rw-r--r-- | mysql-test/r/strict_autoinc_2innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/r/strict_autoinc_3heap.result | 6 | ||||
-rw-r--r-- | mysql-test/r/strict_autoinc_5ndb.result | 6 | ||||
-rw-r--r-- | mysql-test/t/strict_autoinc_4bdb.test | 10 | ||||
-rw-r--r-- | sql/handler.cc | 4 |
6 files changed, 14 insertions, 24 deletions
diff --git a/mysql-test/r/strict_autoinc_1myisam.result b/mysql-test/r/strict_autoinc_1myisam.result index 5d3c2698cda..dcda74a19cd 100644 --- a/mysql-test/r/strict_autoinc_1myisam.result +++ b/mysql-test/r/strict_autoinc_1myisam.result @@ -6,21 +6,21 @@ 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 +ERROR 22003: Out of range value 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 +ERROR 22003: Out of range value 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 +Warning 1264 Out of range value for column 'a' at row 1 select * from t1; a 127 diff --git a/mysql-test/r/strict_autoinc_2innodb.result b/mysql-test/r/strict_autoinc_2innodb.result index f1936ff4de3..9e90ab886f3 100644 --- a/mysql-test/r/strict_autoinc_2innodb.result +++ b/mysql-test/r/strict_autoinc_2innodb.result @@ -6,21 +6,21 @@ primary key (`a`) ) engine = 'InnoDB' ; set @@sql_mode='strict_all_tables'; insert into t1 values(1000); -ERROR 22003: Out of range value adjusted for column 'a' at row 1 +ERROR 22003: Out of range value 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 +ERROR 22003: Out of range value 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 +Warning 1264 Out of range value for column 'a' at row 1 select * from t1; a 127 diff --git a/mysql-test/r/strict_autoinc_3heap.result b/mysql-test/r/strict_autoinc_3heap.result index aa0be270ac5..d22054eb59d 100644 --- a/mysql-test/r/strict_autoinc_3heap.result +++ b/mysql-test/r/strict_autoinc_3heap.result @@ -6,21 +6,21 @@ primary key (`a`) ) engine = 'MEMORY' ; set @@sql_mode='strict_all_tables'; insert into t1 values(1000); -ERROR 22003: Out of range value adjusted for column 'a' at row 1 +ERROR 22003: Out of range value 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 +ERROR 22003: Out of range value 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 +Warning 1264 Out of range value for column 'a' at row 1 select * from t1; a 127 diff --git a/mysql-test/r/strict_autoinc_5ndb.result b/mysql-test/r/strict_autoinc_5ndb.result index d0d62d05b32..debc7242e15 100644 --- a/mysql-test/r/strict_autoinc_5ndb.result +++ b/mysql-test/r/strict_autoinc_5ndb.result @@ -6,21 +6,21 @@ primary key (`a`) ) engine = 'NDB' ; set @@sql_mode='strict_all_tables'; insert into t1 values(1000); -ERROR 22003: Out of range value adjusted for column 'a' at row 1 +ERROR 22003: Out of range value 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 +ERROR 22003: Out of range value 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 +Warning 1264 Out of range value for column 'a' at row 1 select * from t1; a 127 diff --git a/mysql-test/t/strict_autoinc_4bdb.test b/mysql-test/t/strict_autoinc_4bdb.test deleted file mode 100644 index 10d6bfd41e7..00000000000 --- a/mysql-test/t/strict_autoinc_4bdb.test +++ /dev/null @@ -1,10 +0,0 @@ --- source include/have_bdb.inc - -# -# Bug#20573 Strict mode auto-increment -# - -let $type= 'BDB' ; ---source include/strict_autoinc.inc - -# end of test diff --git a/sql/handler.cc b/sql/handler.cc index c34a62c9dda..7848552f3de 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1871,10 +1871,10 @@ int handler::update_auto_increment() variables->auto_increment_increment); /* Row-based replication does not need to store intervals in binlog */ if (!thd->current_stmt_binlog_row_based) - result= result || thd->auto_inc_intervals_in_cur_stmt_for_binlog.append(auto_inc_interval_for_cur_row.minimum(), auto_inc_interval_for_cur_row.values(), variables->auto_increment_increment); + } /* Record this autogenerated value. If the caller then @@ -1890,7 +1890,7 @@ int handler::update_auto_increment() */ set_next_insert_id(compute_next_insert_id(nr, variables)); - DBUG_RETURN(result ? /* some failure occurred */ -1 : 0); + DBUG_RETURN(0); } |