summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-10-09 09:54:48 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2009-10-09 09:54:48 +0200
commit5105fd1cc2f3c402ec1ab6d36696403eefcfb338 (patch)
tree4172df49f7fd8bf2aa3fa2fb27d51db7566b7438 /mysql-test
parent5f8cfacf6c6e4b74c8825c47fa9acdf2fae8f396 (diff)
parent27b80f9db8f611cc9f4d28d58efc34697363e875 (diff)
downloadmariadb-git-5105fd1cc2f3c402ec1ab6d36696403eefcfb338.tar.gz
merge into mysql-5.1-bugteam
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition.result15
-rw-r--r--mysql-test/t/partition.test13
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 2d54a66fe11..6611d39628f 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -50,6 +50,21 @@ t1 CREATE TABLE `t1` (
PARTITION p3 VALUES LESS THAN (733969) ENGINE = MyISAM,
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
DROP TABLE t1;
+create table t1 (a int, b int, key(a))
+partition by list (a)
+( partition p0 values in (1),
+partition p1 values in (2));
+insert into t1 values (1,1),(2,1),(2,2),(2,3);
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A 1 NULL NULL YES BTREE
+drop table t1;
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
ENGINE=MyISAM
PARTITION BY HASH (a);
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index c5ed098b678..1dfc53c6232 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -62,6 +62,19 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
#
+# Bug#44059: rec_per_key on empty partition gives weird optimiser results
+#
+create table t1 (a int, b int, key(a))
+partition by list (a)
+( partition p0 values in (1),
+ partition p1 values in (2));
+insert into t1 values (1,1),(2,1),(2,2),(2,3);
+show indexes from t1;
+analyze table t1;
+show indexes from t1;
+drop table t1;
+
+#
# Bug#36001: Partitions: spelling and using some error messages
#
--error ER_FOREIGN_KEY_ON_PARTITIONED