diff options
author | Michael Widenius <monty@askmonty.org> | 2013-11-05 20:30:36 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-11-05 20:30:36 +0200 |
commit | 6cc9f4ac5c1530087ae1b808ab0fdcc58b308b54 (patch) | |
tree | 249760e31ed7b75bf4353bcc3543a97ce8afa0aa /mysql-test | |
parent | afa49d7919554995726bf710d8a36cb6f4357777 (diff) | |
download | mariadb-git-6cc9f4ac5c1530087ae1b808ab0fdcc58b308b54.tar.gz |
Added usage of handler error names to mysqltest
include/CMakeLists.txt:
Added handler_ername.h
include/handler_ername.h:
Names of handler error messages
mysql-test/extra/binlog_tests/binlog.test:
Test using handler error names
mysql-test/r/mysqltest.result:
Update for new error message
mysql-test/t/auto_increment.test:
Test using handler error names
mysql-test/t/auto_increment_ranges.inc:
Test using handler error names
mysql-test/t/replace.test:
Test using handler error names
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/extra/binlog_tests/binlog.test | 4 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 2 | ||||
-rw-r--r-- | mysql-test/t/auto_increment.test | 6 | ||||
-rw-r--r-- | mysql-test/t/auto_increment_ranges.inc | 56 | ||||
-rw-r--r-- | mysql-test/t/replace.test | 4 |
5 files changed, 36 insertions, 36 deletions
diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 5b57eab1005..63088365b0c 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -213,7 +213,7 @@ reset master; create table t1 (id tinyint auto_increment primary key); insert into t1 values(5); set insert_id=128; ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(null) /* Not binlogged */; # The followin insert ignore will be put in binlog @@ -235,7 +235,7 @@ drop table t1; create table t1 (id tinyint auto_increment primary key) engine=myisam; set insert_id=128; ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(5),(null) /* Insert_id 128 */; # The followin insert ignore will be put in binlog diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index a3043aed711..865c8d7077b 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -232,7 +232,7 @@ mysqltest: At line 2: Spurious text after `query` expression mysqltest: At line 1: Missing argument(s) to 'error' mysqltest: At line 1: Missing argument(s) to 'error' mysqltest: At line 1: The sqlstate definition must start with an uppercase S -mysqltest: At line 1: The error name definition must start with an uppercase E +mysqltest: At line 1: The error name definition must start with an uppercase E or H mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9] mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9] mysqltest: At line 1: The sqlstate must be exactly 5 chars long diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index 15156b89d8e..7f0ab5dc169 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -104,7 +104,7 @@ explain extended select last_insert_id(); --error ER_DUP_ENTRY insert into t1 set i = 254; select last_insert_id(); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 set i = null; select last_insert_id(); drop table t1; @@ -113,7 +113,7 @@ create table t1 (i tinyint unsigned not null auto_increment, key (i)); insert into t1 set i = 254; insert into t1 set i = null; select last_insert_id(); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 set i = null; select last_insert_id(); drop table t1; @@ -354,7 +354,7 @@ INSERT INTO t1 VALUES (18446744073709551601); SET @@SESSION.AUTO_INCREMENT_INCREMENT=10; SELECT @@SESSION.AUTO_INCREMENT_OFFSET; ---error 167 +--error HA_ERR_AUTOINC_ERANGE INSERT INTO t1 VALUES (NULL), (NULL), (NULL); SELECT * FROM t1; diff --git a/mysql-test/t/auto_increment_ranges.inc b/mysql-test/t/auto_increment_ranges.inc index a94aa46d38e..1540be0828e 100644 --- a/mysql-test/t/auto_increment_ranges.inc +++ b/mysql-test/t/auto_increment_ranges.inc @@ -13,25 +13,25 @@ let $range_max=32767; eval create table t1 (a $type primary key auto_increment); eval insert into t1 values($range_max); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); truncate table t1; eval insert into t1 values($range_max-1); insert into t1 values(NULL); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max),(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; eval insert into t1 values($range_max+1); select * from t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); drop table t1; @@ -44,25 +44,25 @@ let $range_max=65535; eval create table t1 (a $type primary key auto_increment); eval insert into t1 values($range_max); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); truncate table t1; eval insert into t1 values($range_max-1); insert into t1 values(NULL); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max),(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; eval insert into t1 values($range_max+1); select * from t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); drop table t1; @@ -75,25 +75,25 @@ let $range_max=2147483647; eval create table t1 (a $type primary key auto_increment); eval insert into t1 values($range_max); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); truncate table t1; eval insert into t1 values($range_max-1); insert into t1 values(NULL); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max),(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; eval insert into t1 values($range_max+1); select * from t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); drop table t1; @@ -106,25 +106,25 @@ let $range_max=4294967295; eval create table t1 (a $type primary key auto_increment); eval insert into t1 values($range_max); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); truncate table t1; eval insert into t1 values($range_max-1); insert into t1 values(NULL); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max),(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; eval insert into t1 values($range_max+1); select * from t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); drop table t1; @@ -137,25 +137,25 @@ let $range_max=cast(9223372036854775807 as unsigned); eval create table t1 (a $type primary key auto_increment); eval insert into t1 values($range_max); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); truncate table t1; eval insert into t1 values($range_max-1); insert into t1 values(NULL); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max),(NULL); select * from t1; truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; eval insert into t1 values($range_max+1); select * from t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); drop table t1; @@ -200,7 +200,7 @@ set @org_mode=@@sql_mode; set @@sql_mode='ansi,traditional'; insert ignore into t1 values(32766),(NULL),(NULL); truncate table t1; ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(32766),(NULL),(NULL); set @@sql_mode=@org_mode; drop table t1; @@ -223,7 +223,7 @@ DROP TABLE t1; CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a)); INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (32768); ---error 167 +--error HA_ERR_AUTOINC_ERANGE INSERT INTO t1 VALUES (NULL); SELECT * FROM t1; DROP TABLE t1; @@ -235,6 +235,6 @@ DROP TABLE t1; create table t1 (a smallint primary key auto_increment); insert into t1 values(32766),(NULL); delete from t1 where a=32767; ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); drop table t1; diff --git a/mysql-test/t/replace.test b/mysql-test/t/replace.test index 3d32a8c0da6..3f2569b0c62 100644 --- a/mysql-test/t/replace.test +++ b/mysql-test/t/replace.test @@ -25,9 +25,9 @@ drop table t1; create table t1 (a tinyint not null auto_increment primary key, b char(20) default "default_value"); insert into t1 values (126,"first"),(63, "middle"),(0,"last"); ---error 167 +--error HA_ERR_AUTOINC_ERANGE insert into t1 values (0,"error"); ---error 167 +--error HA_ERR_AUTOINC_ERANGE replace into t1 values (0,"error"); replace into t1 values (126,"first updated"); replace into t1 values (63,default); |