forked from oceanbase/oceanbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_fast_parser.sql
More file actions
264 lines (263 loc) · 9 KB
/
Copy pathtest_fast_parser.sql
File metadata and controls
264 lines (263 loc) · 9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
a
bc --123;
abc - 123;
select - 0xab;
select - 0x;
select -0xa;
select -xa;
select -.xa;
select /* comment */ /*+ hint */ ;
select /* comment */ /* hin t*/;
merge/*+*/;
merge/**//*+*/;
merge/* *//*+ */;
select/*+*/;
insert/**//*+*/;
load data/* *//*+ */;
load data/*+*/;
hint/**//*+*/;
delete/* *//*+ */;
@@agdA$_;
@af015_;
@@ad45_;
@af015_@!#;
@@ad45_%$*(;
123;
(0.8);
intetval_pricision (123);
intetval_pricision( 145646);
intetval_pricision (234 );
'afadf\''asdas'
'fdghdg\\af'''
'fdghdg\\af''435634\a'
"asdasd124$^"
"fgg""42#"
select no_wait;
select NOWAIT;
update NoWaIT;
place NULL+241;
asfaq TRUE - - + 2 - 4++1A3 V;
123E+F;
E- 1F;
123E F;
...14 .4 5..1e13g;
.12E-+9F;
.12 -=F;
.58-f;
123E+FDD D;
25423E-d dD;
E- 1FdD;
123E Fd D;
...14 .4d 5..1e13gd;
.12E-+d9dF;
d.d12 -=F;
.d58-f;
123E+Ff;
25423E-f;
E-f 1F;
123E F;
.ff..14 f.4 5.f.1e13g;
2f.12E-+9F;
.58-f d 1.0f;
0.1D;
.0f;
1.D;
true TRUEfalse;
false fale;
n'af1af8123$^'
'af1af8123$^'
nq'af1af8123$^'
q'af1af8123$^'
n'[24]''[af]'
n'[24]' 4352 '[af]'
q'[24]''[af]'
q'[24]' '[af]'
nQ'[24]''[af]'
Nq'[24]' '[af]'
Nq'{24]' '[af]}'
"12124";
"21dgf##%^!";
date '1fgh';
TIMESTAMP'';
TIMESTAMP'#$%^&*';
TIMESTAMP "#$%^&*";
- + & ~ |^ /% *( ), . : !;
-+&~|^/%*(),.:!;
;
||
<>==+===<<<<<=;
$$!=~&***;
?;
:123;
:abc;
0.5F;
354 E+;
\t\n\r;
-- ;
intetval_pricision (1.23);
intetval_pricision( 14.56.46);
intetval_pricision (abc.E234 );
Interval year (123);
interval yea ();
interval month (999);
interval year;
interval month;
interval (147);
Interval year (123) to year;
Interval year (123) to month;
Interval year (123) tomonth;
Interval year to month;
Interval yearto month;
interval yea to year ();
interval month to year (999);
interval year(123) to month;
interval month(654)to month;
interval (147) to year;
interval year(123 to month;
interval month 654)to month;
interval (147 to year;
Interval day (123);
interval min ();
interval minute (999);
interval second;
interval hour;
interval (147);
Interval minute (123) to day;
Interval second (123) to second(258);
Interval year (123) to day;
Interval second to day 231;
Interval hour to second (214;
Interval hour to second (214));
Interval hour to second (214) day);
interval second to second (a);
interval second to second ();
interval second to day (99#9);
interval minute(123g) to second(123)(0;
interval minute(123) to second(5j123)(0.00);
interval day(654)to hour;
interval( 123, dad4);
interval day(123, 568);
interval second(123, 568);
interval second(,abc);
interval second( , );
interval second(123,));
interval second(123, a568);
interval second(.123, 568);
interval second(0.5, 568E);
interval second(123, 568E+-1);
interval second(123, );
interval '123' day to day (123);
interval '123' day to second (123);
interval '123' day to day;
Interval "1"month (123);
Interval '1'month (123);
Interval '1'day
SELECT INTERVAL '123-2' YEAR( 3) TO MONTH FROM DUAL;
select nq'[abc'asdasd]';
select nq'[abc]';
select q'{abc}';
select nq'a''bc';
select nq'abc';
select nq'a''';
select n'a''bc';
select 1.2e-1D;
select 1.2e-1d;
select 1.2e-1f;
select ; 1
select "abc";
select "ab;
select nq'abc';
select q'abv';
select q'abc;
select 'abc';
select 'abc;
select n'abcd';
select N'abcd';
select `abc`; // bt
select `asda safa`;
select x from t -- \n;
select #123;
select #123 \n abc;
select 1, 2, '3' from dual;
select * from dual;
select 1 from dual;
select a, b from t where a = 'hello' and b = 1;
select 1, c1 from dual;
select a, 1, /* add 1 comment */ 'a' /*+ add fake hint */ from t;
select a, 1, 'a' from t; -- add 1 comment
select a, 1, -- add 1 comment 'a' from t;
select a, 1, #add 1 comment 'a' from t;
select /* add comment */ /*+ add hint */ /*+ add fake int */ from t;
select 0xab from t;
select 0Xab from t;
select x'ab' from t;
select X'ab' from t;
select 0b1 from t;
select 0B1 from t;
select b'1' from t;
select B'1' from t;
select B'' from t;
select - 2 - - 5);
select 1--(+ --+ --2 - - - 5);
select - -1 from t;
select 'abc''de' from dual;
select 'abc' 'de' from dual;
select 'abc' 'de' 'fgh' from dual;
select 'abc' 'de' 'fgh' from dual;
select 'abc' /* comment */ /*+ hint */ 'de' 'fgh' from dual;
select 'abc' 'de' from dual;
select 'abc' 'de' '' from dual;
select `abc` from dual;
select `abc` `de` from dual;
select 'abc' `de` from dual;
select 'abc' `de` 'fgh' from dual;
SELECT DISTINCT GRANDPARENT1 . col_int_key AS G1 FROM p AS GRANDPARENT1 WHERE GRANDPARENT1 . `pk` IN ( SELECT PARENT1 . `col_int_key` AS P1 FROM hh AS PARENT1 LEFT JOIN c AS PARENT2 ON ( PARENT1 . `col_varchar_10_key` >= PARENT2 . `col_varchar_20` ) WHERE ( PARENT1 . `pk` , PARENT1 . `pk` ) IN ( SELECT CHILD1 . `col_int_key` AS C1 , CHILD1 . `col_int_key` AS C2 FROM q AS CHILD1 LEFT JOIN s AS CHILD2 ON ( CHILD1 . `col_varchar_10_key` <> CHILD2 . `col_varchar_10` ) WHERE ( ( CHILD1 . `col_varchar_20_key` <> CHILD1 . `col_varchar_20` ) OR NOT ( ( CHILD1 . `col_date_key` <= PARENT1 . `col_date` ) OR ( GRANDPARENT1 . `col_date` <> '2006-03-14' ) ) ) ORDER BY CHILD1 . col_int_key ) AND ( ( PARENT1 . `col_datetime` >= GRANDPARENT1 . `col_datetime` ) OR ( GRANDPARENT1 . `col_date_key` BETWEEN '2007-11-14' AND '2000-11-16' OR GRANDPARENT1 . `col_int` = 4 ) ) ) AND ( GRANDPARENT1 . col_int_key IS UNKNOWN OR NOT GRANDPARENT1 . `col_datetime_key` <= '2006-03-25' ) ORDER BY GRANDPARENT1 . col_int_key LIMIT 7;
SELECT /*+ 10;
SELECT /*+ SET_VAR(time_zone '+04:00') */ TIMEDIFF(NOW(), UTC_TIMESTAMP);
SELECT /*+ SET_VAR(time_zone 'abc+04:00') */ TIMEDIFF(NOW(), UTC_TIMESTAMP);
SELECT 100 + /*/*/ 1 AS result;
select /*+ NO_UNNEST */;
select true form false is null;
select -1.5;
select - 1;
select `abv`;
select 'asf';
select "abc";
select :1;
select ?;
select 'abc' 'cde adsasdas' ' adasd';
select "abc" "cde adsasdas" " adasd";
insert into t1 values(0.01,1.1e1,0.1e-1,0.1e-1e, 0.1e, 1e1e, 0.1e0, 0.1e+);
show tables in mysql where Tables_in_mysql != 'ndb_binlog_index';
CREATE USER u1;
GRANT SERVICE_CONNECTION_ADMIN ON *.* TO u1;
INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
select a, (select t2.* as 'x' from t2) from t1;
select t1.*, (select t2.* as 'x' from t2) from t1;
create table t3 select t1.* as 'with_alias' from t1;
create table t3 select t2.* as 'with_alias', 1, 2 from t2;SELECT name, type FROM performance_schema.threads WHERE name = 'thread/sql/admin_interface';
SELECT CURRENT_USER();
SELECT CURRENT_USER();
select (select d from t2 where d > a), t1.* from t1;
select t1.*, (select a from t2 where d > a) from t1;
select a as 'x', t1.* from t1;
select t1.*, a as 'x' from t1;
123 \ 434;
@ 434 # 123;
gn, ~ [],;
erschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
select 100000000000000000000000000001;
select - 500000000001436161461248952222;
INSERT INTO __all_rootservice_event_history (gmt_create, module, event, name1, value1, name2, value2, rs_svr_ip, rs_svr_port) VALUES (usec_to_time(1597203014979140), 'root_service', 'admin_set_config', 'ret', -4014, 'arg', '{items:[{name:"all_server_list", value:"100.83.6.49:50238", comment:"", zone:"", server:"0.0.0.0", tenant_name:"", exec_tenant_id:1, tenant_ids:[]}], is_inner:true}', '100.83.6.49', 50238);
select 1 /**! ,2 */;
select 1 /*! ,2 **/;
select 1 /*! 2 **/;
select 1 /*! ,2 */;
select interval '123123 23:23:23.123123' day ( 9 ) to second ( 9) R from dual;
select interval '123123 23:23:23.123123' day (9) to second (9) R from dual;
select interval '123123 23:23:23.123123' day(9)to second(9) R from dual;
select interval '12 23:23:23.123123' day to second(6) R from dual;
select interval '12 23:23:23.123123' day to second R from dual;
select '\103hh\100hh' 'ueuoiuo';