Skip to content

Commit a265f0f

Browse files
committed
MDEV-9137 MariaDB Crash on Query Using Aria Engine
more tests
1 parent fb324e3 commit a265f0f

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

mysql-test/suite/maria/fulltext2.result

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,69 @@ test.t1 check status OK
1818
repair table t1;
1919
Table Op Msg_type Msg_text
2020
test.t1 repair status OK
21+
select count(*) from t1 where match a against ('aaaxxx');
22+
count(*)
23+
0
24+
select count(*) from t1 where match a against ('aaayyy');
25+
count(*)
26+
150
2127
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
2228
count(*)
2329
1024
30+
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
31+
count(*)
32+
150
33+
select count(*) from t1 where match a against ('aaax*' in boolean mode);
34+
count(*)
35+
1024
36+
select count(*) from t1 where match a against ('aaay*' in boolean mode);
37+
count(*)
38+
150
39+
select count(*) from t1 where match a against ('aaa*' in boolean mode);
40+
count(*)
41+
1174
2442
insert t1 (a) values ('aaaxxx'),('aaayyy');
43+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
44+
count(*)
45+
1025
46+
select count(*) from t1 where match a against ('aaayyy');
47+
count(*)
48+
151
49+
insert t1 (a) values ('aaaxxx 000000');
50+
select count(*) from t1 where match a against ('000000');
51+
count(*)
52+
1
53+
delete from t1 where match a against ('000000');
54+
select count(*) from t1 where match a against ('000000');
55+
count(*)
56+
0
57+
select count(*) from t1 where match a against ('aaaxxx');
58+
count(*)
59+
0
60+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
61+
count(*)
62+
1025
63+
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
64+
count(*)
65+
151
66+
select count(*) from t1 where a = 'aaaxxx';
67+
count(*)
68+
1025
69+
select count(*) from t1 where a = 'aaayyy';
70+
count(*)
71+
151
72+
insert t1 (a) values ('aaaxxx 000000');
73+
select count(*) from t1 where match a against ('000000');
74+
count(*)
75+
1
76+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
77+
count(*)
78+
1026
79+
update t1 set a='aaaxxx' where a = 'aaayyy';
80+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
81+
count(*)
82+
1177
83+
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
84+
count(*)
85+
0
2586
drop table t1;

mysql-test/suite/maria/fulltext2.test

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,39 @@ repair table t1;
3939
check table t1;
4040
repair table t1;
4141

42+
select count(*) from t1 where match a against ('aaaxxx');
43+
select count(*) from t1 where match a against ('aaayyy');
4244
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
45+
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
46+
47+
select count(*) from t1 where match a against ('aaax*' in boolean mode);
48+
select count(*) from t1 where match a against ('aaay*' in boolean mode);
49+
select count(*) from t1 where match a against ('aaa*' in boolean mode);
4350

4451
# mi_write:
4552
insert t1 (a) values ('aaaxxx'),('aaayyy');
53+
# call to enlarge_root() below
54+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
55+
select count(*) from t1 where match a against ('aaayyy');
56+
57+
# mi_delete
58+
insert t1 (a) values ('aaaxxx 000000');
59+
select count(*) from t1 where match a against ('000000');
60+
delete from t1 where match a against ('000000');
61+
select count(*) from t1 where match a against ('000000');
62+
select count(*) from t1 where match a against ('aaaxxx');
63+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
64+
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
65+
# double-check without index
66+
select count(*) from t1 where a = 'aaaxxx';
67+
select count(*) from t1 where a = 'aaayyy';
68+
69+
# update
70+
insert t1 (a) values ('aaaxxx 000000');
71+
select count(*) from t1 where match a against ('000000');
72+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
73+
update t1 set a='aaaxxx' where a = 'aaayyy';
74+
select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
75+
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
4676

4777
drop table t1;

0 commit comments

Comments
 (0)