diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-06 16:24:16 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-06 16:24:16 +0200 |
commit | 074c68409921032f8a64416cc4d5ebc35d95dca9 (patch) | |
tree | 615c99d326fd2ce8c0e3b533b40f0e4e3475bbc1 /mysql-test/suite/maria | |
parent | 563efeceece09154f71da6303244b1df36875428 (diff) | |
parent | df563e0c037f9b2cdb22e145575f92a121b4b529 (diff) | |
download | mariadb-git-074c68409921032f8a64416cc4d5ebc35d95dca9.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r-- | mysql-test/suite/maria/fulltext2.result | 86 | ||||
-rw-r--r-- | mysql-test/suite/maria/fulltext2.test | 77 |
2 files changed, 163 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/fulltext2.result b/mysql-test/suite/maria/fulltext2.result new file mode 100644 index 00000000000..1e4e6636ef6 --- /dev/null +++ b/mysql-test/suite/maria/fulltext2.result @@ -0,0 +1,86 @@ +CREATE TABLE t1 ( +i int(10) unsigned not null auto_increment primary key, +a varchar(255) not null, +FULLTEXT KEY (a) +) ENGINE=Aria ROW_FORMAT=DYNAMIC MAX_ROWS=2000000000000; +repair table t1 quick; +Table Op Msg_type Msg_text +test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +select count(*) from t1 where match a against ('aaaxxx'); +count(*) +0 +select count(*) from t1 where match a against ('aaayyy'); +count(*) +150 +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1024 +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +count(*) +150 +select count(*) from t1 where match a against ('aaax*' in boolean mode); +count(*) +1024 +select count(*) from t1 where match a against ('aaay*' in boolean mode); +count(*) +150 +select count(*) from t1 where match a against ('aaa*' in boolean mode); +count(*) +1174 +insert t1 (a) values ('aaaxxx'),('aaayyy'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1025 +select count(*) from t1 where match a against ('aaayyy'); +count(*) +151 +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +count(*) +1 +delete from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('000000'); +count(*) +0 +select count(*) from t1 where match a against ('aaaxxx'); +count(*) +0 +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1025 +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +count(*) +151 +select count(*) from t1 where a = 'aaaxxx'; +count(*) +1025 +select count(*) from t1 where a = 'aaayyy'; +count(*) +151 +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +count(*) +1 +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1026 +update t1 set a='aaaxxx' where a = 'aaayyy'; +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1177 +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +count(*) +0 +drop table t1; diff --git a/mysql-test/suite/maria/fulltext2.test b/mysql-test/suite/maria/fulltext2.test new file mode 100644 index 00000000000..060b748eb4f --- /dev/null +++ b/mysql-test/suite/maria/fulltext2.test @@ -0,0 +1,77 @@ +# +# test of new fulltext search features +# + +let collation=utf8_unicode_ci; +source include/have_collation.inc; + +# +# two-level tree +# + +CREATE TABLE t1 ( + i int(10) unsigned not null auto_increment primary key, + a varchar(255) not null, + FULLTEXT KEY (a) +) ENGINE=Aria ROW_FORMAT=DYNAMIC MAX_ROWS=2000000000000; + +# two-level entry, second-level tree with depth 2 +disable_query_log; +let $1=1024; +while ($1) +{ + eval insert t1 (a) values ('aaaxxx'); + dec $1; +} + +# one-level entry (entries) +let $1=150; +while ($1) +{ + eval insert t1 (a) values ('aaayyy'); + dec $1; +} +enable_query_log; + +repair table t1 quick; +check table t1; +repair table t1; +check table t1; +repair table t1; + +select count(*) from t1 where match a against ('aaaxxx'); +select count(*) from t1 where match a against ('aaayyy'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy' in boolean mode); + +select count(*) from t1 where match a against ('aaax*' in boolean mode); +select count(*) from t1 where match a against ('aaay*' in boolean mode); +select count(*) from t1 where match a against ('aaa*' in boolean mode); + +# mi_write: +insert t1 (a) values ('aaaxxx'),('aaayyy'); +# call to enlarge_root() below +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy'); + +# mi_delete +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +delete from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('aaaxxx'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +# double-check without index +select count(*) from t1 where a = 'aaaxxx'; +select count(*) from t1 where a = 'aaayyy'; + +# update +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +update t1 set a='aaaxxx' where a = 'aaayyy'; +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy' in boolean mode); + +drop table t1; |