summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisampack.test
diff options
context:
space:
mode:
authorSergey Vojtovich <sergey.vojtovich@oracle.com>2011-09-16 16:21:05 +0400
committerSergey Vojtovich <sergey.vojtovich@oracle.com>2011-09-16 16:21:05 +0400
commitcb9e23bb30319c888b4d6ed37d5560357477e327 (patch)
treee25371d1f9776bc70b1e52f886cc9a7b5f9a8c09 /mysql-test/t/myisampack.test
parent93f2daf3ad75562a6a173a032668a6e0556684b5 (diff)
parent3f9cbd7731fa268575242095cd29d00be2a222f2 (diff)
downloadmariadb-git-cb9e23bb30319c888b4d6ed37d5560357477e327.tar.gz
Merge.
Diffstat (limited to 'mysql-test/t/myisampack.test')
-rw-r--r--mysql-test/t/myisampack.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test
index 463aa559de2..e0edcab6df7 100644
--- a/mysql-test/t/myisampack.test
+++ b/mysql-test/t/myisampack.test
@@ -221,3 +221,47 @@ DROP TABLE t1,t2,t3;
DROP TABLE mysql_db1.t1;
DROP DATABASE mysql_db1;
+--echo #
+--echo # BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES
+--echo #
+CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
+INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc');
+FLUSH TABLE t1;
+--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1
+--exec $MYISAMCHK -srq $MYSQLD_DATADIR/test/t1
+CHECK TABLE t1;
+SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE);
+SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa');
+DROP TABLE t1;
+
+--echo # Test table with key_reflength > rec_reflength
+CREATE TABLE t1(a CHAR(30), FULLTEXT(a));
+--disable_query_log
+--echo # Populating a table, so it's index file exceeds 65K
+let $1=1700;
+while ($1)
+{
+ eval INSERT INTO t1 VALUES('$1aaaaaaaaaaaaaaaaaaaaaaaaaa');
+ dec $1;
+}
+
+--echo # Populating a table, so index file has second level fulltext tree
+let $1=60;
+while ($1)
+{
+ eval INSERT INTO t1 VALUES('aaaa'),('aaaa'),('aaaa'),('aaaa'),('aaaa');
+ dec $1;
+}
+--enable_query_log
+
+FLUSH TABLE t1;
+--echo # Compressing table
+--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1
+--echo # Fixing index (repair by sort)
+--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1
+CHECK TABLE t1;
+FLUSH TABLE t1;
+--echo # Fixing index (repair with keycache)
+--exec $MYISAMCHK -soq $MYSQLD_DATADIR/test/t1
+CHECK TABLE t1;
+DROP TABLE t1;