summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_error.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-05-25 15:41:00 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2010-05-25 15:41:00 +0200
commit0fdd97af48190fab72ea752a7d8120d891bb49af (patch)
tree5645afdf3de2c1af3196a6449398bc4b0a03f6fa /mysql-test/t/partition_error.test
parent8f8e1d6fb85d4be1e8e44beb22b26a72f76ac84e (diff)
downloadmariadb-git-0fdd97af48190fab72ea752a7d8120d891bb49af.tar.gz
Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
Problem was reporting wrong error Fixed by adding a new error which better explain the problem. mysql-test/r/partition_error.result: Bug#49161: Out of memory; restart server and try again (needed 2 bytes) Updated test result mysql-test/t/partition_error.test: Bug#49161: Out of memory; restart server and try again (needed 2 bytes) Added test case sql/ha_partition.cc: Bug#49161: Out of memory; restart server and try again (needed 2 bytes) Better error message. (used ER_UNKNOWN_ERROR to avoid merge problems in mysql-trunk+)
Diffstat (limited to 'mysql-test/t/partition_error.test')
-rw-r--r--mysql-test/t/partition_error.test22
1 files changed, 20 insertions, 2 deletions
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index dbc67032a42..7f733df701b 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -7,7 +7,26 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+--echo #
+--echo # Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
+--echo #
+CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
+FLUSH TABLES;
+--remove_file $MYSQLD_DATADIR/test/t1.par
+CHECK TABLE t1;
+--error ER_UNKNOWN_ERROR
+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
+DROP TABLE t1;
+--remove_file $MYSQLD_DATADIR/test/t1.frm
+--remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYI
+--remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYD
+
--echo #
--echo # Bug#49477: Assertion `0' failed in ha_partition.cc:5530
--echo # with temporary table and partitions
@@ -167,7 +186,6 @@ partitions 3
partition x2 tablespace ts2,
partition x3 tablespace ts3);
-let $MYSQLD_DATADIR= `select @@datadir`;
select load_file('$MYSQLD_DATADIR/test/t1.par');
#
# Partition by hash, invalid field in function