You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create fulltext index f01 on employees (LastName, FirstName);
61
62
alter table employees drop column LastName;
62
63
show create table employees;
63
-
64
+
Table Create Table
65
+
employees CREATE TABLE `employees` (\n `employeeNumber` int NOT NULL,\n `firstName` varchar(50) NOT NULL,\n `extension` varchar(10) NOT NULL,\n `email` varchar(100) NOT NULL,\n `officeCode` varchar(10) NOT NULL,\n `reportsTo` int DEFAULT NULL,\n `jobTitle` varchar(50) NOT NULL,\n PRIMARY KEY (`employeeNumber`),\n FULLTEXT `f01`(`firstName`)\n)
@@ -608,4 +616,28 @@ where match(comment_text) AGAINST ('全文索引' IN NATURAL LANGUAGE MODE);
608
616
609
617
drop table comments;
610
618
drop table posts;
619
+
drop table if exists fulltext_test01;
620
+
create table `fulltext_test01` (
621
+
`col1` bigint default NULL,
622
+
`col2` int not null,
623
+
`col3` varchar(200) default NULL,
624
+
`col4` varchar(200) default NULL,
625
+
PRIMARY KEY (`col2`),
626
+
FULLTEXT f01(`col3`) WITH PARSER ngram
627
+
);
628
+
load data infile '$resources/external_table_file/zhwiki.txt' into table fulltext_test01 fields terminated by ':' ESCAPED BY '\t' lines terminated by '\n';
629
+
show create table fulltext_test01;
630
+
Table Create Table
631
+
fulltext_test01 CREATE TABLE `fulltext_test01` (\n `col1` bigint DEFAULT NULL,\n `col2` int NOT NULL,\n `col3` varchar(200) DEFAULT NULL,\n `col4` varchar(200) DEFAULT NULL,\n PRIMARY KEY (`col2`),\n FULLTEXT `f01`(`col3`) WITH PARSER ngram\n)
Copy file name to clipboardExpand all lines: test/distributed/cases/fulltext/fulltext2.sql
+16-18Lines changed: 16 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,7 @@ select * from fulltext01;
22
22
23
23
create fulltext index ftidx on fulltext01 (LastName, FirstName);
24
24
altertable fulltext01 add column newcolumn decimal after LastName;
25
-
-- @bvt:issue#20613
26
25
show create table fulltext01;
27
-
-- @bvt:issue
28
26
select*from fulltext01;
29
27
truncate fulltext01;
30
28
droptable fulltext01;
@@ -51,9 +49,7 @@ insert into employees(employeeNumber,lastName,firstName,extension,email,officeCo
51
49
select*from employees;
52
50
create fulltext index f01 on employees (LastName, FirstName);
53
51
altertable employees drop column LastName;
54
-
-- @bvt:issue#20613
55
52
show create table employees;
56
-
-- @bvt:issue
57
53
select*from employees;
58
54
selectcount(*) from employees;
59
55
truncate employees;
@@ -70,9 +66,7 @@ insert into t1 values(3, 'a_cdef');
70
66
insert into t1 values(4, 'ab_def');
71
67
create fulltext index f02 on t1 (col2);
72
68
altertable t1 modify column col2 text;
73
-
-- @bvt:issue#20613
74
69
show create table t1;
75
-
-- @bvt:issue
76
70
select*from t1;
77
71
droptable t1;
78
72
@@ -109,9 +103,7 @@ insert into ab01 values (1,2,'da');
109
103
insert into ab01 values (2,3,'e4r34f');
110
104
select*from ab01;
111
105
create fulltext index f01 on ab01 (col2);
112
-
-- @bvt:issue#20123
113
106
create fulltext index f02 on ab01 (col2);
114
-
-- @bvt:issue
115
107
droptable ab01;
116
108
117
109
@@ -124,9 +116,7 @@ insert into char01 values ('32jhbfchjecmwd%^&^(*&)UJHFRE%^T&YUHIJKNM', null);
124
116
select*from char01;
125
117
altertable char01 add fulltext index f01(col1);
126
118
altertable char01 add fulltext index f02(col2);
127
-
-- @bvt:issue#20613
128
119
show create table char01;
129
-
-- @bvt:issue
130
120
droptable char01;
131
121
132
122
@@ -208,9 +198,7 @@ create table prepare_fulltext (a char primary key , b varchar(20));
208
198
insert into prepare_fulltext values (1, 11), (2, 22), (3, 33);
209
199
prepare stmt1 from'create fulltext index f06 on prepare_fulltext (a)';
210
200
execute stmt1;
211
-
-- @bvt:issue#20613
212
201
show create table prepare_fulltext;
213
-
-- @bvt:issue
214
202
select*from prepare_fulltext;
215
203
droptable prepare_fulltext;
216
204
@@ -227,9 +215,7 @@ prepare stmt4 from 'alter table pro add fulltext index pro1(details) with PARSER
227
215
execute stmt4;
228
216
prepare stmt3 from'alter table pro add fulltext index pro2(name)';
229
217
execute stmt3;
230
-
-- @bvt:issue#20613
231
218
show create table pro;
232
-
-- @bvt:issue
233
219
insert into pro (name, details) values('手机', '{"brand": "Apple", "model": "iPhone 12", "price": 800}');
234
220
select*from pro;
235
221
droptable pro;
@@ -248,9 +234,7 @@ col6 text,
248
234
PRIMARY KEY (`col1`),
249
235
fulltext(col5)
250
236
);
251
-
-- @bvt:issue#20613
252
237
show create table test_table;
253
-
-- @bvt:issue
254
238
load data infile '$resources/load_data/test_1.csv' into table test_table fields terminated by ',' parallel 'true';
255
239
select*from test_table;
256
240
droptable test_table;
@@ -291,9 +275,7 @@ create table t1(
291
275
create fulltext index f06 on t1(col9);
292
276
load data infile {'filepath'='$resources/load_data/jsonline_object01.jl','format'='jsonline','jsondata'='object'} into table t1;
293
277
select*from t1;
294
-
-- @bvt:issue#20613
295
278
show create table t1;
296
-
-- @bvt:issue
297
279
droptable t1;
298
280
299
281
@@ -522,4 +504,20 @@ drop table posts;
522
504
523
505
524
506
507
+
droptable if exists fulltext_test01;
508
+
createtable `fulltext_test01` (
509
+
`col1`bigint default NULL,
510
+
`col2`intnot null,
511
+
`col3`varchar(200) default NULL,
512
+
`col4`varchar(200) default NULL,
513
+
PRIMARY KEY (`col2`),
514
+
FULLTEXT f01(`col3`) WITH PARSER ngram
515
+
);
516
+
load data infile '$resources/external_table_file/zhwiki.txt' into table fulltext_test01 fields terminated by ':' ESCAPED BY '\t' lines terminated by '\n';
0 commit comments