summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh6
-rw-r--r--mysql-test/r/fulltext_distinct.result10
-rw-r--r--mysql-test/t/fulltext_distinct.test39
3 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 5bb005b60de..8c494d06f75 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -112,6 +112,12 @@ while test $# -gt 0; do
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
--master_port=*) MASTER_MYPORT=`$ECHO "$1" | $SED -e "s;--master_port=;;"` ;;
--slave_port=*) SLAVE_MYPORT=`$ECHO "$1" | $SED -e "s;--slave_port=;;"` ;;
+ --skip-innobase)
+ EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-innobase"
+ EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-innobase" ;;
+ --skip-bdb)
+ EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-bdb"
+ EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-bdb" ;;
--skip-rpl) NO_SLAVE=1 ;;
--record)
RECORD=1;
diff --git a/mysql-test/r/fulltext_distinct.result b/mysql-test/r/fulltext_distinct.result
new file mode 100644
index 00000000000..9729eb59c10
--- /dev/null
+++ b/mysql-test/r/fulltext_distinct.result
@@ -0,0 +1,10 @@
+id tag value
+1 foo123 bar111
+2 foo123 bar222
+3 bar345 baz333 ar
+id_t2 id_t1 field_number
+12346 3 1
+2231626 64280 0
+2231626 64281 0
+id_t2
+12346
diff --git a/mysql-test/t/fulltext_distinct.test b/mysql-test/t/fulltext_distinct.test
new file mode 100644
index 00000000000..4bd88dde496
--- /dev/null
+++ b/mysql-test/t/fulltext_distinct.test
@@ -0,0 +1,39 @@
+#
+# Test of fulltext index
+# bug reported by Tibor Simko <tibor.simko@cern.ch>
+#
+
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1 (
+ id mediumint unsigned NOT NULL auto_increment,
+ tag char(6) NOT NULL default '',
+ value text NOT NULL default '',
+ PRIMARY KEY (id),
+ KEY kt(tag),
+ KEY kv(value(15)),
+ FULLTEXT KEY kvf(value)
+ ) TYPE=MyISAM;
+ DROP TABLE IF EXISTS t2;
+ CREATE TABLE t2 (
+ id_t2 mediumint unsigned NOT NULL default '0',
+ id_t1 mediumint unsigned NOT NULL default '0',
+ field_number tinyint unsigned NOT NULL default '0',
+ PRIMARY KEY (id_t2,id_t1,field_number),
+ KEY id_t1(id_t1)
+ ) TYPE=MyISAM;
+
+ INSERT INTO t1 (tag,value) VALUES ('foo123','bar111');
+ INSERT INTO t2 VALUES (2231626,64280,0);
+ INSERT INTO t1 (tag,value) VALUES ('foo123','bar222');
+ INSERT INTO t2 VALUES (2231626,64281,0);
+insert into t1 (tag,value) values ('bar345','baz333 ar');
+insert into t2 values (12346, 3, 1);
+
+select * from t1; select * from t2;
+
+ SELECT DISTINCT t2.id_t2
+ FROM t2, t1
+ WHERE MATCH (t1.value) AGAINST ('baz333')
+ AND t1.id = t2.id_t1;
+
+DROP TABLE t1,t2;