diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-16 17:27:53 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-16 23:58:40 +0200 |
commit | b56ad494b47c19fef98101c224ed764664691b72 (patch) | |
tree | a1e0521666a552d8e2ff71324112e198b383c456 /mysql-test | |
parent | 66fd45afce1ba5e1032c32cc891c09d64fa38d9e (diff) | |
download | mariadb-git-b56ad494b47c19fef98101c224ed764664691b72.tar.gz |
MDEV-8287 DROP TABLE suppresses all engine errors
in ha_delete_table()
* only convert ENOENT and HA_ERR_NO_SUCH_TABLE to warnings
* only return real error codes (that is, not ENOENT and
not HA_ERR_NO_SUCH_TABLE)
* intercept HA_ERR_ROW_IS_REFERENCED to generate backward
compatible ER_ROW_IS_REFERENCED
in mysql_rm_table_no_locks()
* no special code to handle HA_ERR_ROW_IS_REFERENCED
* no special code to handle ENOENT and HA_ERR_NO_SUCH_TABLE
* return multi-table error ER_BAD_TABLE_ERROR <table list> only
when there were many errors, not when there were many
tables to drop (but only one table generated an error)
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/partition_myisam.result | 2 | ||||
-rw-r--r-- | mysql-test/r/partition_not_blackhole.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/percona/percona_innodb_fake_changes.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/percona/percona_innodb_fake_changes.test | 2 | ||||
-rw-r--r-- | mysql-test/t/partition_myisam.test | 2 | ||||
-rw-r--r-- | mysql-test/t/partition_not_blackhole.test | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/r/partition_myisam.result b/mysql-test/r/partition_myisam.result index 80b3a9511ea..bb1a7b19a9d 100644 --- a/mysql-test/r/partition_myisam.result +++ b/mysql-test/r/partition_myisam.result @@ -90,7 +90,7 @@ ERROR HY000: Failed to read from the .par file # Note that it is currently impossible to drop a partitioned table # without the .par file DROP TABLE t1; -ERROR 42S02: Unknown table 'test.t1' +ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition # # Bug#50392: insert_id is not reset for partitioned tables # auto_increment on duplicate entry diff --git a/mysql-test/r/partition_not_blackhole.result b/mysql-test/r/partition_not_blackhole.result index 923d70c0ad6..7759f947c32 100644 --- a/mysql-test/r/partition_not_blackhole.result +++ b/mysql-test/r/partition_not_blackhole.result @@ -11,6 +11,6 @@ t1 SHOW CREATE TABLE t1; ERROR HY000: Incorrect information in file: './test/t1.frm' DROP TABLE t1; -ERROR 42S02: Unknown table 'test.t1' +ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition t1.frm t1.par diff --git a/mysql-test/suite/percona/percona_innodb_fake_changes.result b/mysql-test/suite/percona/percona_innodb_fake_changes.result index 95f0c07cd11..1b870fdbb92 100644 --- a/mysql-test/suite/percona/percona_innodb_fake_changes.result +++ b/mysql-test/suite/percona/percona_innodb_fake_changes.result @@ -45,7 +45,7 @@ BEGIN; CREATE TABLE t2 (a INT) ENGINE=InnoDB; ERROR HY000: Can't create table `test`.`t2` (errno: 131 "Command not supported by database") DROP TABLE t1; -ERROR 42S02: Unknown table 'test.t1' +ERROR HY000: Storage engine InnoDB of the table `test`.`t1` doesn't have this option TRUNCATE TABLE t1; ERROR HY000: Got error 131 "Command not supported by database" during COMMIT ALTER TABLE t1 ENGINE=MyISAM; diff --git a/mysql-test/suite/percona/percona_innodb_fake_changes.test b/mysql-test/suite/percona/percona_innodb_fake_changes.test index 5fa3ecc7b63..67f5450ba45 100644 --- a/mysql-test/suite/percona/percona_innodb_fake_changes.test +++ b/mysql-test/suite/percona/percona_innodb_fake_changes.test @@ -38,7 +38,7 @@ SET innodb_fake_changes=1; BEGIN; --error 1005 CREATE TABLE t2 (a INT) ENGINE=InnoDB; ---error 1051 +--error 1031 DROP TABLE t1; --error 1180 TRUNCATE TABLE t1; diff --git a/mysql-test/t/partition_myisam.test b/mysql-test/t/partition_myisam.test index a33b9e19fbf..bce0c6f009c 100644 --- a/mysql-test/t/partition_myisam.test +++ b/mysql-test/t/partition_myisam.test @@ -123,7 +123,7 @@ CHECK TABLE t1; SELECT * FROM t1; --echo # Note that it is currently impossible to drop a partitioned table --echo # without the .par file ---error ER_BAD_TABLE_ERROR +--error ER_GET_ERRNO DROP TABLE t1; --remove_file $MYSQLD_DATADIR/test/t1.frm --remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYI diff --git a/mysql-test/t/partition_not_blackhole.test b/mysql-test/t/partition_not_blackhole.test index 7352aeaa230..3731d659ad0 100644 --- a/mysql-test/t/partition_not_blackhole.test +++ b/mysql-test/t/partition_not_blackhole.test @@ -19,7 +19,7 @@ SHOW TABLES; --replace_result $MYSQLD_DATADIR ./ --error ER_NOT_FORM_FILE SHOW CREATE TABLE t1; ---error ER_BAD_TABLE_ERROR +--error ER_GET_ERRNO DROP TABLE t1; --list_files $MYSQLD_DATADIR/test t1* --remove_file $MYSQLD_DATADIR/test/t1.frm |