mariadb/mysql-test/t/fulltext_order_by.test
unknown e03265d4d5 Removed random chars after filename for LOAD DATA INFILE (in mysqlbinlog)
Add quoting for use `database` for mysqlbinlog
Removed test ins0000001
Add support for --replace for exec in mysqltest
Don't refer to install dir in mysqlbinlog.result


BitKeeper/deleted/.del-ins000001.result~f45c599efdf8352b:
  Delete: mysql-test/r/ins000001.result
BitKeeper/deleted/.del-ins000001.test~2428ee5c9b1bc483:
  Delete: mysql-test/t/ins000001.test
client/mysqlbinlog.cc:
  Removed random chars after filename for LOAD DATA INFILE
client/mysqltest.c:
  Add support for --replace for 'exec'
mysql-test/r/drop_temp_table.result:
  Updated results after quoting change
mysql-test/r/fulltext_multi.result:
  Updated results after quoting change
mysql-test/r/fulltext_order_by.result:
  Updated results after quoting change
mysql-test/r/insert.result:
  New tests
mysql-test/r/insert_select.result:
  Updated results after quoting change
mysql-test/r/mix_innodb_myisam_binlog.result:
  Updated results after quoting change
mysql-test/r/mysqlbinlog.result:
  Updated results after quoting change
mysql-test/r/rpl_log.result:
  Updated results after quoting change
mysql-test/t/fulltext_multi.test:
  Remove 'use'
mysql-test/t/fulltext_order_by.test:
  Remove 'use'
mysql-test/t/insert.test:
  Merge test with ins0000001.test
mysql-test/t/mysqlbinlog.test:
  Don't refer to install dir in result
sql/log_event.cc:
  Add quoting for use `database` for mysqlbinlog
support-files/mysql.server.sh:
  Move pid_file test after arguments have been parsed
2003-09-29 12:31:35 +03:00

48 lines
2.2 KiB
Text

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (
a INT AUTO_INCREMENT PRIMARY KEY,
message CHAR(20),
FULLTEXT(message)
) comment = 'original testcase by sroussey@network54.com';
INSERT INTO t1 (message) VALUES ("Testing"),("table"),("testbug"),
("steve"),("is"),("cool"),("steve is cool");
# basic MATCH
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE MATCH (message) AGAINST ('steve');
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE MATCH (message) AGAINST ('steve');
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE MATCH (message) AGAINST ('steve' IN BOOLEAN MODE);
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE MATCH (message) AGAINST ('steve' IN BOOLEAN MODE);
# MATCH + ORDER BY (with ft-ranges)
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY a;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) ORDER BY a;
# MATCH + ORDER BY (with normal ranges) + UNIQUE
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve') ORDER BY a DESC;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) ORDER BY a DESC;
# MATCH + ORDER BY + UNIQUE (const_table)
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE a=7 and MATCH (message) AGAINST ('steve') ORDER BY 1;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE a=7 and MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) ORDER BY 1;
# ORDER BY MATCH
SELECT a, MATCH (message) AGAINST ('steve') as rel FROM t1 ORDER BY rel;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) as rel FROM t1 ORDER BY rel;
drop table t1;
#
# reused boolean scan bug
#
CREATE TABLE t1 (
a INT AUTO_INCREMENT PRIMARY KEY,
message CHAR(20),
FULLTEXT(message)
);
INSERT INTO t1 (message) VALUES ("testbug"),("testbug foobar");
SELECT a, MATCH (message) AGAINST ('t* f*' IN BOOLEAN MODE) as rel FROM t1;
SELECT a, MATCH (message) AGAINST ('t* f*' IN BOOLEAN MODE) as rel FROM t1 ORDER BY rel,a;
drop table t1;