oceanbase
537 строк · 22.1 Кб
1--disable_query_log
2set @@session.explicit_defaults_for_timestamp=off;
3--enable_query_log
4# owner: jiangxiu.wt
5# owner group: SQL1
6# description: regexp的测试
7
8--disable_warnings
9drop table if exists t1;
10--enable_warnings
11##
12#--real_sleep 10
13create table t1 (a varchar(10) primary key, b int default 0);
14#--real_sleep 10
15insert into t1 (a) values ('a'),('abc'),('abcd'),('hello'),('test');
16
17--error 5813
18select * from t1 where a regexp 'a(';
19--error 5813
20select * from t1 where a regexp 'a(b';
21--error 1139
22select * from t1 where a regexp '*';
23--error 1139
24select * from t1 where a regexp '+';
25--error 1139
26select * from t1 where a regexp '?';
27--error 1139
28select * from t1 where a regexp '(*a)';
29--error 1139
30select * from t1 where a regexp '(+a)';
31--error 1139
32select * from t1 where a regexp '(?a)';
33--error 1139
34select * from t1 where a regexp '({1}a)';
35--error 1139
36select * from t1 where a regexp '(a|*b)';
37--error 1139
38select * from t1 where a regexp '(a|+b)';
39--error 1139
40select * from t1 where a regexp '(a|?b)';
41--error 1139
42select * from t1 where a regexp '(a|{1}b)';
43
44select * from t1 where a regexp '^*';
45
46select * from t1 where a regexp '^+';
47
48select * from t1 where a regexp '^?';
49
50select * from t1 where a regexp '^{1}';
51--error 1139
52select * from t1 where a regexp '{1';
53--error 1139
54select * from t1 where a regexp '{1}';
55--error 1139
56select * from t1 where a regexp 'a{1';
57--error 1139
58select * from t1 where a regexp 'a{1a';
59--error 1139
60select * from t1 where a regexp 'a{1a}';
61--error 1139
62select * from t1 where a regexp 'a{1,x}';
63--error 1139
64select * from t1 where a regexp 'a{1,x';
65
66select * from t1 where a regexp 'a{300}';
67--error 1139
68select * from t1 where a regexp 'a{1,0}';
69
70select * from t1 where a regexp 'a++';
71
72select * from t1 where a regexp 'a*+';
73--error 1139
74select * from t1 where a regexp 'a+*';
75--error 1139
76select * from t1 where a regexp 'a?*';
77
78select * from t1 where a regexp 'a?+';
79--error 1139
80select * from t1 where a regexp 'a{1}{1}';
81--error 1139
82select * from t1 where a regexp 'a*{1}';
83--error 1139
84select * from t1 where a regexp 'a+{1}';
85--error 1139
86select * from t1 where a regexp 'a?{1}';
87--error 1139
88select * from t1 where a regexp 'a{1}*';
89
90select * from t1 where a regexp 'a{1}+';
91
92drop table t1;
93
94
95--disable_warnings
96drop table if exists t1;
97--enable_warnings
98#--real_sleep 10
99create table t1 (a datetime primary key);
100#--real_sleep 10
101insert into t1 values ('2004-03-11 12:00:21');
102select * from t1 where a regexp '2004-03-11 12:00:21';
103select * from t1 where a regexp '2004-03-11 ';
104drop table t1;
105
106# A case
107--disable_warnings
108drop table if exists t1;
109--enable_warnings
110create table t1(id int primary key, name varchar(100));
111insert into t1 values(1, 'hello');
112insert into t1 values(2, 'hell');
113insert into t1 values(3, 'hel');
114insert into t1 values(4, 'hello1');
115insert into t1 values(5, 'hell1');
116insert into t1 values(6, 'hel1');
117insert into t1 values(7, 'hel\n1');
118insert into t1 values(8, 'he\bl1');
119insert into t1 values(9, 'hel\t1');
120insert into t1 values(10, 'hel\r\n1o');
121insert into t1 values(11, '111 <title>Hello World</title> 222');
122
123insert into t1 values (138, 'abc');
124insert into t1 values (139, 'abc');
125insert into t1 values (142, 'abc');
126insert into t1 values (146, 'a(');
127insert into t1 values (152, 'a)');
128insert into t1 values (153, ')');
129insert into t1 values (158, 'ab');
130insert into t1 values (163, 'a^b');
131insert into t1 values (165, 'a$b');
132insert into t1 values (170, '""');
133insert into t1 values (173, '""');
134insert into t1 values (174, '""');
135insert into t1 values (192, 'b');
136insert into t1 values (203, 'abc');
137insert into t1 values (272, 'abc');
138insert into t1 values (273, 'abc');
139insert into t1 values (287, 'ab');
140insert into t1 values (289, 'ab');
141insert into t1 values (291, 'aab');
142insert into t1 values (299, 'a{,2}');
143insert into t1 values (301, 'a{,}');
144insert into t1 values (311, 'abcac');
145insert into t1 values (313, 'abcac');
146insert into t1 values (315, 'abbcac');
147insert into t1 values (317, 'acabc');
148insert into t1 values (319, 'acabc');
149insert into t1 values (321, 'abcabbc');
150insert into t1 values (323, 'abcabbc');
151insert into t1 values (325, 'a');
152insert into t1 values (344, 'a{b}');
153insert into t1 values (384, '-%@a?X-');
154insert into t1 values (385, '-%@aX0-');
155insert into t1 values (386, 'aSSTb');
156insert into t1 values (387, 'aNTb');
157insert into t1 values (388, 'a019b');
158insert into t1 values (389, 'Sa%bS');
159insert into t1 values (390, 'AabC');
160insert into t1 values (391, 'NaSbN');
161insert into t1 values (392, 'S%-&T');
162insert into t1 values (393, 'aSNTb');
163insert into t1 values (394, 'aBCd');
164insert into t1 values (395, 'p0f3Cq');
165insert into t1 values (405, 'abc');
166insert into t1 values (406, 'abd');
167insert into t1 values (407, 'abbd');
168insert into t1 values (409, 'aaaaabaaaabaaaabaaaab');
169insert into t1 values (411, 'aaaaabaaaabaaaabaaaab');
170insert into t1 values (413, 'aaaaabaaaabaaaabaaaabweeknights');
171insert into t1 values (415, 'a12345678901234567890123456789b');
172insert into t1 values (416, 'a123456789012345678901234567890b');
173insert into t1 values (417, 'a1234567890123456789012345678901b');
174insert into t1 values (418, 'a12345678901234567890123456789012b');
175insert into t1 values (419, 'a123456789012345678901234567890123b');
176insert into t1 values (421, 'a1234567890123456789012345678901234567890123456789012345678901234567890b');
177insert into t1 values (423, 'xacegikmoq');
178insert into t1 values (424, 'xacegikmoq');
179insert into t1 values (425, 'xacegikmoqy');
180insert into t1 values (426, 'xacegikmoqy');
181insert into t1 values (438, 'abc');
182insert into t1 values (439, 'aba');
183insert into t1 values (440, 'abc');
184insert into t1 values (441, 'abd');
185insert into t1 values (442, 'accd');
186insert into t1 values (443, 'weeknights');
187insert into t1 values (444, 'weeknights');
188insert into t1 values (445, 'xyzaaabcaababdacd');
189insert into t1 values (446, 'aaabc');
190insert into t1 values (452, '/*x*/');
191insert into t1 values (454, '/*x*/y/*z*/');
192insert into t1 values (456, '/*x*/');
193insert into t1 values (457, '/*x*/y/*z*/');
194insert into t1 values (459, '/*x**/y/*z*/');
195insert into t1 values (461, '/*x*/');
196insert into t1 values (462, '/*x*/y/*z*/');
197insert into t1 values (463, '/*x**/y/*z*/');
198insert into t1 values (464, '/*x****/y/*z*/');
199insert into t1 values (465, '/*x**x*/y/*z*/');
200insert into t1 values (466, '/*x***x/y/*z*/');
201insert into t1 values (469, 'abcd');
202insert into t1 values (470, 'abc');
203insert into t1 values (471, 'abd');
204insert into t1 values (472, 'abbd');
205insert into t1 values (473, 'acd');
206insert into t1 values (474, 'ad');
207insert into t1 values (475, 'abc');
208insert into t1 values (476, 'ac');
209insert into t1 values (477, 'abc');
210insert into t1 values (478, 'abbbc');
211insert into t1 values (479, 'ac');
212insert into t1 values (480, 'abcdef');
213insert into t1 values (482, 'abcdefghijk');
214insert into t1 values (483, 'abcdefghijkl');
215insert into t1 values (484, 'abc');
216insert into t1 values (485, 'ac');
217insert into t1 values (486, 'abc');
218insert into t1 values (487, 'abcc');
219insert into t1 values (488, 'abcbc');
220insert into t1 values (489, 'abb');
221insert into t1 values (490, 'abb');
222insert into t1 values (491, 'abbb');
223insert into t1 values (492, 'abbb');
224insert into t1 values (493, 'abcdef');
225insert into t1 values (494, 'bc');
226insert into t1 values (497, 'ad');
227insert into t1 values (498, 'abcd');
228insert into t1 values (499, 'abd');
229insert into t1 values (500, 'abcd');
230insert into t1 values (501, 'ad');
231insert into t1 values (502, 'abcd');
232insert into t1 values (503, 'ad');
233insert into t1 values (504, 'ad');
234insert into t1 values (505, 'abd');
235insert into t1 values (506, 'ad');
236insert into t1 values (507, 'abcd');
237insert into t1 values (508, 'ad');
238insert into t1 values (509, 'abcd');
239insert into t1 values (510, 'abd');
240insert into t1 values (511, 'acd');
241insert into t1 values (512, 'abd');
242insert into t1 values (513, 'abcd');
243insert into t1 values (514, 'abd');
244insert into t1 values (515, 'abcd');
245insert into t1 values (516, 'acbd');
246insert into t1 values (517, 'abcd');
247insert into t1 values (518, 'abcd');
248insert into t1 values (519, 'abcbd');
249insert into t1 values (520, 'abcbcd');
250insert into t1 values (521, 'abcd');
251insert into t1 values (522, 'abcbd');
252insert into t1 values (523, 'abd');
253insert into t1 values (524, 'abcd');
254insert into t1 values (567, 'A1');
255insert into t1 values (571, 'CC11');
256insert into t1 values (573, 'ab');
257select * from t1 where name rlike '.*h.*';
258select * from t1 where name rlike '.*hel.*';
259select * from t1 where name rlike '.*hell.*';
260select * from t1 where name regexp '.*hello.*';
261select * from t1 where name regexp '^h.*';
262
263select * from t1 where name rlike null;
264
265select * from t1 where name regexp 'abc|de';
266select * from t1 where name regexp 'a|b|c';
267select * from t1 where name regexp 'a(b)c';
268select * from t1 where name regexp 'a\\(';
269select * from t1 where name regexp 'a()b';
270select * from t1 where name regexp 'a^b';
271select * from t1 where name regexp 'a$b';
272select * from t1 where name regexp '$^';
273select * from t1 where name regexp '^^';
274select * from t1 where name regexp '$$';
275select * from t1 where name regexp 'a*(^b$)c*';
276select * from t1 where name regexp '()';
277select * from t1 where name regexp 'ab+c';
278select * from t1 where name regexp 'ab?c';
279select * from t1 where name regexp 'a{1}b';
280select * from t1 where name regexp 'a{1,}b';
281select * from t1 where name regexp 'a{1,2}b';
282--error 1139
283select * from t1 where name regexp 'a{,2}';
284--error 1139
285select * from t1 where name regexp 'a{,}';
286select * from t1 where name regexp 'ab{0,0}c';
287select * from t1 where name regexp 'ab{0,1}c';
288select * from t1 where name regexp 'ab{0,3}c';
289select * from t1 where name regexp 'ab{1,1}c';
290select * from t1 where name regexp 'ab{1,3}c';
291select * from t1 where name regexp 'ab{2,2}c';
292select * from t1 where name regexp 'ab{2,4}c';
293select * from t1 where name regexp '((a{1,10}){1,10}){1,10}';
294--error 1139
295select * from t1 where name regexp 'a*{b}';
296select * from t1 where name regexp '[[:alnum:]]+';
297select * from t1 where name regexp '[[:alpha:]]+';
298select * from t1 where name regexp '[[:blank:]]+';
299select * from t1 where name regexp '[[:cntrl:]]+';
300select * from t1 where name regexp '[[:digit:]]+';
301select * from t1 where name regexp '[[:graph:]]+';
302select * from t1 where name regexp '[[:lower:]]+';
303select * from t1 where name regexp '[[:print:]]+';
304select * from t1 where name regexp '[[:punct:]]+';
305select * from t1 where name regexp '[[:space:]]+';
306select * from t1 where name regexp '[[:upper:]]+';
307select * from t1 where name regexp '[[:xdigit:]]+';
308select * from t1 where name regexp 'a(((b)))c';
309select * from t1 where name regexp 'a(b|(c))d';
310select * from t1 where name regexp 'a(b*|c)d';
311select * from t1 where name regexp 'a[ab]{20}';
312select * from t1 where name regexp 'a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab]';
313select * from t1 where name regexp 'a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night)';
314select * from t1 where name regexp '12345678901234567890123456789';
315select * from t1 where name regexp '123456789012345678901234567890';
316select * from t1 where name regexp '1234567890123456789012345678901';
317select * from t1 where name regexp '12345678901234567890123456789012';
318select * from t1 where name regexp '123456789012345678901234567890123';
319select * from t1 where name regexp '1234567890123456789012345678901234567890123456789012345678901234567890';
320select * from t1 where name regexp '[ab][cd][ef][gh][ij][kl][mn]';
321select * from t1 where name regexp '[ab][cd][ef][gh][ij][kl][mn][op]';
322select * from t1 where name regexp '[ab][cd][ef][gh][ij][kl][mn][op][qr]';
323select * from t1 where name regexp '[ab][cd][ef][gh][ij][kl][mn][op][q]';
324select * from t1 where name regexp '[a]b[c]';
325select * from t1 where name regexp '[a]b[a]';
326select * from t1 where name regexp '[abc]b[abc]';
327select * from t1 where name regexp '[abc]b[abd]';
328select * from t1 where name regexp 'a(b?c)+d';
329select * from t1 where name regexp '(wee|week)(knights|night)';
330select * from t1 where name regexp '(we|wee|week|frob)(knights|night|day)';
331select * from t1 where name regexp 'a[bc]d';
332select * from t1 where name regexp 'a[ab]c';
333
334select * from t1 where name regexp null;
335
336select * from t1 where name regexp '/\\*.*\\*/';
337select * from t1 where name regexp '/\\*.*\\*/';
338select * from t1 where name regexp '/\\*([^*]|\\*[^/])*\\*/';
339select * from t1 where name regexp '/\\*([^*]|\\*[^/])*\\*/';
340select * from t1 where name regexp '/\\*([^*]|\\*[^/])*\\*/';
341select * from t1 where name regexp '/\\*([^*]|\\*+[^*/])*\\*+/';
342select * from t1 where name regexp '/\\*([^*]|\\*+[^*/])*\\*+/';
343select * from t1 where name regexp '/\\*([^*]|\\*+[^*/])*\\*+/';
344select * from t1 where name regexp '/\\*([^*]|\\*+[^*/])*\\*+/';
345select * from t1 where name regexp '/\\*([^*]|\\*+[^*/])*\\*+/';
346select * from t1 where name regexp '/\\*([^*]|\\*+[^*/])*\\*+/';
347select * from t1 where name regexp 'a(b)(c)d';
348select * from t1 where name regexp 'a(((b)))c';
349select * from t1 where name regexp 'a(b|(c))d';
350select * from t1 where name regexp 'a(b*|c|e)d';
351select * from t1 where name regexp 'a(b*|c|e)d';
352select * from t1 where name regexp 'a(b*|c|e)d';
353select * from t1 where name regexp 'a(b?)c';
354select * from t1 where name regexp 'a(b?)c';
355select * from t1 where name regexp 'a(b+)c';
356select * from t1 where name regexp 'a(b+)c';
357select * from t1 where name regexp 'a(b*)c';
358select * from t1 where name regexp '(a|ab)(bc([de]+)f|cde)';
359select * from t1 where name regexp 'a(b)(c)(d)(e)(f)(g)(h)(i)(j)k';
360select * from t1 where name regexp 'a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l';
361select * from t1 where name regexp 'a([bc]?)c';
362select * from t1 where name regexp 'a([bc]?)c';
363select * from t1 where name regexp 'a([bc]+)c';
364select * from t1 where name regexp 'a([bc]+)c';
365select * from t1 where name regexp 'a([bc]+)bc';
366select * from t1 where name regexp 'a(bb+|b)b';
367select * from t1 where name regexp 'a(bbb+|bb+|b)b';
368select * from t1 where name regexp 'a(bbb+|bb+|b)b';
369select * from t1 where name regexp 'a(bbb+|bb+|b)bb';
370select * from t1 where name regexp '(.*).*';
371select * from t1 where name regexp '(a*)*';
372select * from t1 where name regexp 'a(b|c)*d';
373select * from t1 where name regexp 'a(b|c)*d';
374select * from t1 where name regexp 'a(b|c)+d';
375select * from t1 where name regexp 'a(b|c)+d';
376select * from t1 where name regexp 'a(b|c?)+d';
377select * from t1 where name regexp 'a(b|c?)+d';
378select * from t1 where name regexp 'a(b|c){0,0}d';
379select * from t1 where name regexp 'a(b|c){0,1}d';
380select * from t1 where name regexp 'a(b|c){0,1}d';
381select * from t1 where name regexp 'a(b|c){0,2}d';
382select * from t1 where name regexp 'a(b|c){0,2}d';
383select * from t1 where name regexp 'a(b|c){0,}d';
384select * from t1 where name regexp 'a(b|c){0,}d';
385select * from t1 where name regexp 'a(b|c){1,1}d';
386select * from t1 where name regexp 'a(b|c){1,1}d';
387select * from t1 where name regexp 'a(b|c){1,2}d';
388select * from t1 where name regexp 'a(b|c){1,2}d';
389select * from t1 where name regexp 'a(b|c){1,}d';
390select * from t1 where name regexp 'a(b|c){1,}d';
391select * from t1 where name regexp 'a(b|c){2,2}d';
392select * from t1 where name regexp 'a(b|c){2,2}d';
393select * from t1 where name regexp 'a(b|c){2,4}d';
394select * from t1 where name regexp 'a(b|c){2,4}d';
395select * from t1 where name regexp 'a(b|c){2,4}d';
396select * from t1 where name regexp 'a(b|c){2,}d';
397select * from t1 where name regexp 'a(b|c){2,}d';
398select * from t1 where name regexp 'a(b+|((c)*))+d';
399select * from t1 where name regexp 'a(b+|((c)*))+d';
400select * from t1 where name regexp '(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A])';
401select * from t1 where name regexp 'CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a';
402select * from t1 where name regexp 'a?b';
403
404##bug:
405select * from t1 where name regexp 'a' "bc" '|de';
406select * from t1 where name regexp "a" '|' "b" '|' "c";
407select * from t1 where name regexp "a"'()'"b";
408select * from t1 where name regexp "$" "$";
409select * from t1 where name regexp 'a' "*" '(' "^" 'b' "$" ')' "c" '*';
410select * from t1 where name regexp 'a' "b" "{" "0" ',' "0" '}' "c";
411select * from t1 where name regexp '[' "[" ':' "a" "lnum" ':' "]" ']' "+";
412select * from t1 where name regexp 'a' "(" "(" '(' "b" ')' ")" ')' 'c';
413select * from t1 where name regexp 'a'"("'b'"|"'('"c"')'")"'d';
414select * from t1 where name regexp 'a'""'('"b"'*'"|"'c'")"'d';
415select * from t1 where name regexp '[ab]'"[cd]"'[ef]'"[gh]"'[ij]'"[kl]"'[mn]';
416select * from t1 where name regexp '[a]'"b"'[c]';
417select * from t1 where name regexp '[abc]'"b"'[abc]';
418select * from t1 where name regexp 'a'"(b?c)"'+'"d";
419select * from t1 where name regexp '(wee|week)'"(knights"'|'"night)";
420select * from t1 where name regexp 'a'"[ab]"'c';
421select * from t1 where name regexp '(a|ab)'"(bc([de]+)"'f|cde)';
422select * from t1 where name regexp 'a(bbb'"+"'|bb'"+"'|b'")b";
423select * from t1 where name regexp 'a'"("'b'"|"'c'")"'{'"1"','"}"'d';
424
425--disable_warnings
426drop table if exists t1;
427--enable_warnings
428create table t1 (a varchar(50) primary key) ;
429insert into t1 values('abcdef');
430insert into t1 values('_bcdef');
431insert into t1 values('a_cdef');
432insert into t1 values('ab_def');
433insert into t1 values('abc_ef');
434insert into t1 values('abcd_f');
435insert into t1 values('abcde_');
436# should return ab_def
437select a as c1u from t1 where a rlike 'ab\_def';
438drop table t1;
439
440##bug:
441--disable_warnings
442drop table if exists t;
443--enable_warnings
444
445create table t (c1 char(20));
446insert into t values ('');
447select c1 regexp 'ddd' from t;
448
449
450--disable_warnings
451drop table if exists t1;
452--enable_warnings
453
454create table t1(c1 blob);
455insert into t1 values('UNPRESS123');
456insert into t1 values('UNPRESS456');
457select * from t1 where c1 regexp '^U';
458
459
460
461##bug48378677
462set names gbk;
463select 'a' collate gbk_bin regexp 'A';
464select 'a' collate gbk_chinese_ci regexp 'A';
465select 'a' regexp 'A' collate gbk_chinese_ci;
466select 'a' regexp 'A' collate gbk_bin;
467select 'a' collate gbk_bin regexp 'A' collate gbk_bin;
468select 'a' collate gbk_chinese_ci regexp 'A' collate gbk_chinese_ci;
469--error 1267
470select 'a' collate gbk_bin regexp 'A' collate gbk_chinese_ci;
471--error 1267
472select 'a' collate gbk_chinese_ci regexp 'A' collate gbk_bin;
473
474set names latin1;
475select 'a' collate latin1_bin regexp 'A';
476select 'a' collate latin1_swedish_ci regexp 'A';
477select 'a' regexp 'A' collate latin1_swedish_ci;
478select 'a' regexp 'A' collate latin1_bin;
479select 'a' collate latin1_bin regexp 'A' collate latin1_bin;
480select 'a' collate latin1_swedish_ci regexp 'A' collate latin1_swedish_ci;
481--error 1267
482select 'a' collate latin1_bin regexp 'A' collate latin1_swedish_ci;
483--error 1267
484select 'a' collate latin1_swedish_ci regexp 'A' collate latin1_bin;
485
486
487##bug:
488
489--error 0,1008
490drop database ly;
491
492create database ly character set GB18030;
493use ly;
494
495DROP TABLE IF EXISTS `table10_bigint`;
496CREATE TABLE `table10_bigint` (
497`col_smallint_signed` smallint(6) DEFAULT NULL,
498`col_decimal_20_0_signed` decimal(20,0) DEFAULT NULL,
499`col_tinyint_unsigned` tinyint(3) unsigned DEFAULT NULL,
500`col_mediumint_signed` mediumint(9) DEFAULT NULL,
501`col_decimal_30_5_signed` decimal(30,5) DEFAULT NULL,
502`col_int` int(11) DEFAULT NULL,
503`col_smallint_unsigned` smallint(5) unsigned DEFAULT NULL,
504`col_decimal_30_5` decimal(30,5) DEFAULT NULL,
505`col_tinyint_signed` tinyint(4) DEFAULT NULL,
506`col_decimal_20_0` decimal(20,0) DEFAULT NULL,
507`pk` bigint(20) NOT NULL,
508`col_int_unsigned` int(10) unsigned DEFAULT NULL,
509`col_datetime` datetime DEFAULT NULL,
510`col_mediumint_unsigned` mediumint(8) unsigned DEFAULT NULL,
511`col_bigint_signed` bigint(20) DEFAULT NULL,
512`col_integer_unsigned` int(10) unsigned DEFAULT NULL,
513`col_char_30` char(30) DEFAULT NULL,
514`col_integer` int(11) DEFAULT NULL,
515`col_bigint_unsigned` bigint(20) unsigned DEFAULT NULL,
516`col_int_signed` int(11) DEFAULT NULL,
517`col_timestamp` timestamp NULL DEFAULT NULL,
518`col_tinyint` tinyint(4) DEFAULT NULL,
519`col_char_20` char(20) DEFAULT NULL,
520`col_decimal_20_0_unsigned` decimal(20,0) unsigned DEFAULT NULL,
521`col_smallint` smallint(6) DEFAULT NULL,
522`col_decimal_30_5_unsigned` decimal(30,5) unsigned DEFAULT NULL,
523`col_date` date DEFAULT NULL,
524`col_integer_signed` int(11) DEFAULT NULL,
525`col_mediumint` mediumint(9) DEFAULT NULL,
526`col_bigint` bigint(20) DEFAULT NULL,
527PRIMARY KEY (`pk`)
528) DEFAULT CHARSET = gb18030 ROW_FORMAT = DYNAMIC ;
529
530
531INSERT INTO `table10_bigint` VALUES (9,3,NULL,7,6.00000,NULL,NULL,NULL,NULL,8,1,4,'2007-12-25 08:02:41',2,8,NULL,'kqpbiirnugot',NULL,NULL,0,'2006-02-12 16:48:16',NULL,'get',NULL,NULL,NULL,'2006-10-20',NULL,5,3),(NULL,NULL,NULL,NULL,7.00000,7,9,NULL,9,2,2,NULL,'2000-08-08 04:39:35',7,NULL,NULL,'',5,NULL,NULL,'2003-10-07 10:09:45',1,'r',5,NULL,NULL,'2002-10-27',NULL,7,NULL),(NULL,6,NULL,NULL,1.00000,NULL,NULL,8.00000,4,8,3,NULL,'2004-08-13 10:53:30',5,8,6,'d',NULL,NULL,9,'2007-07-26 10:08:34',NULL,NULL,9,NULL,NULL,'2003-05-10',NULL,NULL,NULL),(3,2,NULL,NULL,1.00000,6,5,5.00000,NULL,NULL,4,NULL,'2000-06-15 20:10:58',NULL,NULL,0,'come',3,9,3,'2005-02-03 16:00:00',NULL,'',NULL,3,0.00000,'2001-07-11',NULL,NULL,3),(6,NULL,NULL,9,NULL,NULL,8,4.00000,8,NULL,5,NULL,'2000-11-19 22:25:40',NULL,1,6,'j',7,8,5,'2005-03-27 15:01:52',8,'w',NULL,5,NULL,'2003-02-27',6,NULL,NULL),(NULL,5,4,1,3.00000,NULL,NULL,NULL,2,6,6,NULL,'2009-03-12 00:00:00',8,NULL,4,'',6,3,NULL,'2002-05-23 11:10:50',NULL,'now',2,4,NULL,'2004-04-03',NULL,5,6),(7,NULL,4,NULL,1.00000,NULL,NULL,NULL,5,NULL,7,NULL,'2006-09-25 12:07:13',7,NULL,NULL,'z',7,NULL,9,'2001-01-07 16:00:00',0,'want',5,0,3.00000,'2009-07-12',NULL,NULL,3),(NULL,NULL,8,7,NULL,NULL,NULL,8.00000,NULL,1,8,0,'2001-10-23 00:00:00',1,6,NULL,'',NULL,8,7,'2008-02-20 03:04:52',2,'b',NULL,9,NULL,'2008-01-22',4,7,6),(NULL,9,NULL,8,7.00000,0,8,5.00000,3,8,9,7,'2002-07-27 22:52:55',4,NULL,NULL,'yes',NULL,3,NULL,'2008-02-24 08:16:18',9,'',NULL,0,NULL,'2003-11-02',6,9,NULL),(2,NULL,7,NULL,2.00000,1,NULL,2.00000,6,6,10,NULL,'2007-06-02 02:12:10',NULL,NULL,NULL,'',NULL,NULL,1,'2009-12-16 00:47:00',2,'I',NULL,3,1.00000,'2008-02-26',NULL,8,5);
532
533set names GB18030;
534
535SELECT TRIM( SUBSTRING( SUBSTRING( '∷ ∶ ∫ ∮ ∝ ∞ ∧ ∨ ∑ ∏ ∪ ∩ ∈ ∵ ∴ ⊥ ∥ ∠ ⌒ ⊙ √∟⊿ ㏒ ㏑ % ‰' , 1, LEAST( 228, 20 ) ) , 1 , LEAST( 228, 20 ) ) ) NOT REGEXP CONCAT( 'tu', '%' ) FROM table10_bigint WHERE col_int NOT IN ( 5387431054241955840 , 13633803446934044672 , 65066 , 45808 , 6755399441055744000 ) ORDER BY col_char_20 DESC , pk ASC LIMIT 6 OFFSET 1;
536
537drop database ly;
538