summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2001-11-20 17:58:00 +0100
committerunknown <serg@serg.mysql.com>2001-11-20 17:58:00 +0100
commit62d2ecb170a83de0ec4d98bec37be5c3512cd83d (patch)
tree949106cf06877bc2f852688e09b757f6a7d0b050 /mysql-test
parentc282bbf0ff6d16658a38c61190a2e442e8a32659 (diff)
downloadmariadb-git-62d2ecb170a83de0ec4d98bec37be5c3512cd83d.tar.gz
tests added
mysql-test/r/fulltext_distinct.result: boolean test added mysql-test/t/fulltext_distinct.test: boolean test added mysql-test/r/fulltext_left_join.result: boolean test added mysql-test/t/fulltext_left_join.test: boolean test added
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/fulltext_distinct.result24
-rw-r--r--mysql-test/r/fulltext_left_join.result7
-rw-r--r--mysql-test/t/fulltext_distinct.test62
-rw-r--r--mysql-test/t/fulltext_left_join.test2
4 files changed, 54 insertions, 41 deletions
diff --git a/mysql-test/r/fulltext_distinct.result b/mysql-test/r/fulltext_distinct.result
index 801d82dc6a2..abb4929d0ec 100644
--- a/mysql-test/r/fulltext_distinct.result
+++ b/mysql-test/r/fulltext_distinct.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
id mediumint unsigned NOT NULL auto_increment,
tag char(6) NOT NULL default '',
@@ -8,7 +8,6 @@ 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',
@@ -17,25 +16,28 @@ 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 t1 (tag,value) VALUES ('bar345','baz333 ar');
+INSERT INTO t2 VALUES (2231626,64280,0);
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;
+INSERT INTO t2 VALUES (12346, 3, 1);
+SELECT * FROM t1;
id tag value
1 foo123 bar111
2 foo123 bar222
3 bar345 baz333 ar
-select * from t2;
+SELECT * FROM t2;
id_t2 id_t1 field_number
12346 3 1
2231626 64280 0
2231626 64281 0
-SELECT DISTINCT t2.id_t2
-FROM t2, t1
-WHERE MATCH (t1.value) AGAINST ('baz333')
+SELECT DISTINCT t2.id_t2 FROM t2, t1
+WHERE MATCH (t1.value) AGAINST ('baz333') AND t1.id = t2.id_t1;
+id_t2
+12346
+SELECT DISTINCT t2.id_t2 FROM t2, t1
+WHERE MATCH (t1.value) AGAINST ('baz333' IN BOOLEAN MODE)
AND t1.id = t2.id_t1;
id_t2
12346
-DROP TABLE t1,t2;
+DROP TABLE t1, t2;
diff --git a/mysql-test/r/fulltext_left_join.result b/mysql-test/r/fulltext_left_join.result
index 34b8de31061..9f2ba6a5947 100644
--- a/mysql-test/r/fulltext_left_join.result
+++ b/mysql-test/r/fulltext_left_join.result
@@ -22,4 +22,11 @@ match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
0
0.67003107070923
0
+select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
+from t1 left join t2 on t2.id=t1.id;
+match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
+0
+0
+1
+0
drop table t1, t2;
diff --git a/mysql-test/t/fulltext_distinct.test b/mysql-test/t/fulltext_distinct.test
index 4bd88dde496..86e2f7ca1b4 100644
--- a/mysql-test/t/fulltext_distinct.test
+++ b/mysql-test/t/fulltext_distinct.test
@@ -3,37 +3,39 @@
# 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;
+DROP TABLE IF EXISTS t1, t2;
+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;
+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);
+INSERT INTO t1 (tag,value) VALUES ('foo123','bar111');
+INSERT INTO t1 (tag,value) VALUES ('foo123','bar222');
+INSERT INTO t1 (tag,value) VALUES ('bar345','baz333 ar');
-select * from t1; select * from t2;
+INSERT INTO t2 VALUES (2231626,64280,0);
+INSERT INTO t2 VALUES (2231626,64281,0);
+INSERT INTO t2 VALUES (12346, 3, 1);
- SELECT DISTINCT t2.id_t2
- FROM t2, t1
- WHERE MATCH (t1.value) AGAINST ('baz333')
- AND t1.id = t2.id_t1;
+SELECT * FROM t1; SELECT * FROM t2;
-DROP TABLE t1,t2;
+SELECT DISTINCT t2.id_t2 FROM t2, t1
+WHERE MATCH (t1.value) AGAINST ('baz333') AND t1.id = t2.id_t1;
+
+SELECT DISTINCT t2.id_t2 FROM t2, t1
+WHERE MATCH (t1.value) AGAINST ('baz333' IN BOOLEAN MODE)
+AND t1.id = t2.id_t1;
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/t/fulltext_left_join.test b/mysql-test/t/fulltext_left_join.test
index d09d577d04b..abb1c8e8473 100644
--- a/mysql-test/t/fulltext_left_join.test
+++ b/mysql-test/t/fulltext_left_join.test
@@ -22,6 +22,8 @@ INSERT INTO t2 VALUES('456', 'lui');
select match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
from t1 left join t2 on t2.id=t1.id;
+select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
+ from t1 left join t2 on t2.id=t1.id;
drop table t1, t2;