Debian Codegraph @

mysql-test/suite/query_rewrite_plugins/r/engines.result

raw
1 #
2 # Tests that it works to have the rules table in different engines.
3 #
4 # Query rewrite plugin was installed.
5 # We don't need this column for this test, and digests aren't stable.
6 ALTER TABLE query_rewrite.rewrite_rules DROP COLUMN pattern_digest;
7 ALTER TABLE query_rewrite.rewrite_rules ENGINE = myisam;
8 SELECT engine FROM information_schema.tables WHERE table_name = 'rewrite_rules';
9 ENGINE
10 MyISAM
11 CREATE TABLE t1 ( a VARCHAR(10), b VARCHAR(10) );
12 INSERT INTO t1 VALUES ( 'abc', 'def' ), ( 'ghi', 'klm' ), ( 'nop', 'qrs' );
13 CREATE TABLE t2 ( a VARCHAR(10) );
14 INSERT INTO t2 VALUES ( 'abc' ), ( 'klm' );
15 # Test of literals matching.
16 INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
17 VALUES ( 'SELECT ?', 'SELECT "literal"' );
18 SELECT * FROM query_rewrite.rewrite_rules;
19 id pattern pattern_database replacement enabled message normalized_pattern
20 1 SELECT ? NULL SELECT "literal" YES NULL NULL
21 CALL query_rewrite.flush_rewrite_rules();
22 SELECT * FROM query_rewrite.rewrite_rules;
23 id pattern pattern_database replacement enabled message normalized_pattern
24 1 SELECT ? NULL SELECT "literal" YES NULL select ?
25 SELECT NULL;
26 literal
27 literal
28 Warnings:
29 Note 1105 Query 'SELECT NULL' rewritten to 'SELECT "literal"' by a query rewrite plugin
30 SELECT 'abc';
31 literal
32 literal
33 Warnings:
34 Note 1105 Query 'SELECT 'abc'' rewritten to 'SELECT "literal"' by a query rewrite plugin
35 SELECT 1;
36 literal
37 literal
38 Warnings:
39 Note 1105 Query 'SELECT 1' rewritten to 'SELECT "literal"' by a query rewrite plugin
40 SELECT 1.1;
41 literal
42 literal
43 Warnings:
44 Note 1105 Query 'SELECT 1.1' rewritten to 'SELECT "literal"' by a query rewrite plugin
45 SELECT 123456789123456789123456789123456789123456789123456789;
46 literal
47 literal
48 Warnings:
49 Note 1105 Query 'SELECT 123456789123456789123456789123456789123456789123456789' rewritten to 'SELECT "literal"' by a query rewrite plugin
50 # Check our status variables.
51 SHOW STATUS LIKE 'Rewriter%';
52 Variable_name Value
53 Rewriter_number_loaded_rules 1
54 Rewriter_number_reloads 2
55 Rewriter_number_rewritten_queries 5
56 Rewriter_reload_error OFF
57 DELETE FROM query_rewrite.rewrite_rules;
58 INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
59 VALUES ( 'SELECT * FROM test.t1 WHERE ( a = ? AND TRUE ) OR b = ?',
60 'SELECT a FROM test.t1 WHERE a = ?' ),
61 ( 'SELECT a FROM test.t1',
62 'SELECT * FROM test.t1 WHERE a = \'abc\'' ),
63 ( 'SELECT a FROM test.t1 WHERE b = ?',
64 'SELECT * FROM test.t1 WHERE b = ?' ),
65 ( 'SELECT * FROM test.t2',
66 'SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a' ),
67 ( 'SELECT * FROM test.t1 WHERE a = ? OR b = ?',
68 'SELECT * FROM test.t1 WHERE b = ? OR a = ?' );
69 SELECT * FROM query_rewrite.rewrite_rules;
70 id pattern pattern_database replacement enabled message normalized_pattern
71 2 SELECT * FROM test.t1 WHERE ( a = ? AND TRUE ) OR b = ? NULL SELECT a FROM test.t1 WHERE a = ? YES NULL NULL
72 3 SELECT a FROM test.t1 NULL SELECT * FROM test.t1 WHERE a = 'abc' YES NULL NULL
73 4 SELECT a FROM test.t1 WHERE b = ? NULL SELECT * FROM test.t1 WHERE b = ? YES NULL NULL
74 5 SELECT * FROM test.t2 NULL SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a YES NULL NULL
75 6 SELECT * FROM test.t1 WHERE a = ? OR b = ? NULL SELECT * FROM test.t1 WHERE b = ? OR a = ? YES NULL NULL
76 CALL query_rewrite.flush_rewrite_rules();
77 SELECT * FROM query_rewrite.rewrite_rules;
78 id pattern pattern_database replacement enabled message normalized_pattern
79 2 SELECT * FROM test.t1 WHERE ( a = ? AND TRUE ) OR b = ? NULL SELECT a FROM test.t1 WHERE a = ? YES NULL select `*` from `test`.`t1` where (((`a` = ?) and true) or (`b` = ?))
80 3 SELECT a FROM test.t1 NULL SELECT * FROM test.t1 WHERE a = 'abc' YES NULL select `a` from `test`.`t1`
81 4 SELECT a FROM test.t1 WHERE b = ? NULL SELECT * FROM test.t1 WHERE b = ? YES NULL select `a` from `test`.`t1` where (`b` = ?)
82 5 SELECT * FROM test.t2 NULL SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a YES NULL select `*` from `test`.`t2`
83 6 SELECT * FROM test.t1 WHERE a = ? OR b = ? NULL SELECT * FROM test.t1 WHERE b = ? OR a = ? YES NULL select `*` from `test`.`t1` where ((`a` = ?) or (`b` = ?))
84 # Check a query that doesn't have a rewrite rule doesn't get rewritten.
85 SELECT b FROM test.t1;
86 b
87 def
88 klm
89 qrs
90 # Check a query with just one parameter.
91 SELECT a FROM test.t1 WHERE b = 'qrs';
92 a b
93 nop qrs
94 Warnings:
95 Note 1105 Query 'SELECT a FROM test.t1 WHERE b = 'qrs'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'qrs'' by a query rewrite plugin
96 # Check a rule with parameter truncation (fewer parameters in the
97 # output query than in the input query);
98 SELECT * FROM test.t1 WHERE ( a = 'abc' AND TRUE ) OR b = 'klm';
99 a
100 abc
101 Warnings:
102 Note 1105 Query 'SELECT * FROM test.t1 WHERE ( a = 'abc' AND TRUE ) OR b = 'klm'' rewritten to 'SELECT a FROM test.t1 WHERE a = 'abc'' by a query rewrite plugin
103 SELECT * FROM test.t1 WHERE ( a = 'abc' AND FALSE ) OR b = 'klm';
104 a b
105 ghi klm
106 # Check a non parameterized query.
107 SELECT * from t1 WHERE a = 'abc';
108 a b
109 abc def
110 # Check that a non-rewritten query does not yield a warning.
111 SELECT b FROM test.t1;
112 b
113 def
114 klm
115 qrs
116 # Check that a query is not rewritten if the query corresponds to a
117 # replacement.
118 SELECT a FROM test.t1;
119 a b
120 abc def
121 Warnings:
122 Note 1105 Query 'SELECT a FROM test.t1' rewritten to 'SELECT * FROM test.t1 WHERE a = 'abc'' by a query rewrite plugin
123 # Check that we can execute a rewrite more than once.
124 SELECT * FROM test.t2;
125 a b a
126 abc def abc
127 Warnings:
128 Note 1105 Query 'SELECT * FROM test.t2' rewritten to 'SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a' by a query rewrite plugin
129 SELECT * FROM test.t2;
130 a b a
131 abc def abc
132 Warnings:
133 Note 1105 Query 'SELECT * FROM test.t2' rewritten to 'SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a' by a query rewrite plugin
134 # Remove the warnings.
135 SELECT b FROM test.t1;
136 b
137 def
138 klm
139 qrs
140 # Check parameter switching in a query rewrite
141 SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi';
142 a b
143 abc def
144 ghi klm
145 Warnings:
146 Note 1105 Query 'SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'def' OR a = 'ghi'' by a query rewrite plugin
147 # Verify with whitespace.
148 SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi';
149 a b
150 abc def
151 ghi klm
152 Warnings:
153 Note 1105 Query 'SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'def' OR a = 'ghi'' by a query rewrite plugin
154 # Verify with comments.
155 SELECT * FROM test.t1 WHERE a =/* 'def' ? */'def' OR b = 'ghi';
156 a b
157 abc def
158 ghi klm
159 Warnings:
160 Note 1105 Query 'SELECT * FROM test.t1 WHERE a =/* 'def' ? */'def' OR b = 'ghi'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'def' OR a = 'ghi'' by a query rewrite plugin
161 # Check our status variables.
162 SHOW STATUS LIKE 'Rewriter%';
163 Variable_name Value
164 Rewriter_number_loaded_rules 5
165 Rewriter_number_reloads 3
166 Rewriter_number_rewritten_queries 13
167 Rewriter_reload_error OFF
168 DROP TABLE t1;
169 DROP TABLE t2;
170 DELETE FROM query_rewrite.rewrite_rules;
171 # Test of literals matching.
172 INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
173 VALUES ( 'SELECT 1, ?', 'SELECT "rewritten w/rule 1"' ),
174 ( 'SELECT 2, ?', 'SELECT "rewritten w/rule 2"' ),
175 ( 'SELECT "The_original_query"', 'SELECT "The_rewritten_query"');
176 SELECT * FROM query_rewrite.rewrite_rules;
177 id pattern pattern_database replacement enabled message normalized_pattern
178 7 SELECT 1, ? NULL SELECT "rewritten w/rule 1" YES NULL NULL
179 8 SELECT 2, ? NULL SELECT "rewritten w/rule 2" YES NULL NULL
180 9 SELECT "The_original_query" NULL SELECT "The_rewritten_query" YES NULL NULL
181 CALL query_rewrite.flush_rewrite_rules();
182 SELECT * FROM query_rewrite.rewrite_rules;
183 id pattern pattern_database replacement enabled message normalized_pattern
184 7 SELECT 1, ? NULL SELECT "rewritten w/rule 1" YES NULL select ?,?
185 8 SELECT 2, ? NULL SELECT "rewritten w/rule 2" YES NULL select ?,?
186 9 SELECT "The_original_query" NULL SELECT "The_rewritten_query" YES NULL select ?
187 SELECT 1, 1;
188 rewritten w/rule 1
189 rewritten w/rule 1
190 Warnings:
191 Note 1105 Query 'SELECT 1, 1' rewritten to 'SELECT "rewritten w/rule 1"' by a query rewrite plugin
192 SELECT 1, 2;
193 rewritten w/rule 1
194 rewritten w/rule 1
195 Warnings:
196 Note 1105 Query 'SELECT 1, 2' rewritten to 'SELECT "rewritten w/rule 1"' by a query rewrite plugin
197 SELECT 2, 1;
198 rewritten w/rule 2
199 rewritten w/rule 2
200 Warnings:
201 Note 1105 Query 'SELECT 2, 1' rewritten to 'SELECT "rewritten w/rule 2"' by a query rewrite plugin
202 SELECT 2, 2;
203 rewritten w/rule 2
204 rewritten w/rule 2
205 Warnings:
206 Note 1105 Query 'SELECT 2, 2' rewritten to 'SELECT "rewritten w/rule 2"' by a query rewrite plugin
207 SELECT 3, 1;
208 3 1
209 3 1
210 SELECT 3, 2;
211 3 2
212 3 2
213 SELECT 'The_original_query';
214 The_rewritten_query
215 The_rewritten_query
216 Warnings:
217 Note 1105 Query 'SELECT 'The_original_query'' rewritten to 'SELECT "The_rewritten_query"' by a query rewrite plugin
218 DELETE FROM query_rewrite.rewrite_rules;
219 ALTER TABLE query_rewrite.rewrite_rules ENGINE = memory;
220 SELECT engine FROM information_schema.tables WHERE table_name = 'rewrite_rules';
221 ENGINE
222 MEMORY
223 CREATE TABLE t1 ( a VARCHAR(10), b VARCHAR(10) );
224 INSERT INTO t1 VALUES ( 'abc', 'def' ), ( 'ghi', 'klm' ), ( 'nop', 'qrs' );
225 CREATE TABLE t2 ( a VARCHAR(10) );
226 INSERT INTO t2 VALUES ( 'abc' ), ( 'klm' );
227 # Test of literals matching.
228 INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
229 VALUES ( 'SELECT ?', 'SELECT "literal"' );
230 SELECT * FROM query_rewrite.rewrite_rules;
231 id pattern pattern_database replacement enabled message normalized_pattern
232 10 SELECT ? NULL SELECT "literal" YES NULL NULL
233 CALL query_rewrite.flush_rewrite_rules();
234 SELECT * FROM query_rewrite.rewrite_rules;
235 id pattern pattern_database replacement enabled message normalized_pattern
236 10 SELECT ? NULL SELECT "literal" YES NULL select ?
237 SELECT NULL;
238 literal
239 literal
240 Warnings:
241 Note 1105 Query 'SELECT NULL' rewritten to 'SELECT "literal"' by a query rewrite plugin
242 SELECT 'abc';
243 literal
244 literal
245 Warnings:
246 Note 1105 Query 'SELECT 'abc'' rewritten to 'SELECT "literal"' by a query rewrite plugin
247 SELECT 1;
248 literal
249 literal
250 Warnings:
251 Note 1105 Query 'SELECT 1' rewritten to 'SELECT "literal"' by a query rewrite plugin
252 SELECT 1.1;
253 literal
254 literal
255 Warnings:
256 Note 1105 Query 'SELECT 1.1' rewritten to 'SELECT "literal"' by a query rewrite plugin
257 SELECT 123456789123456789123456789123456789123456789123456789;
258 literal
259 literal
260 Warnings:
261 Note 1105 Query 'SELECT 123456789123456789123456789123456789123456789123456789' rewritten to 'SELECT "literal"' by a query rewrite plugin
262 # Check our status variables.
263 SHOW STATUS LIKE 'Rewriter%';
264 Variable_name Value
265 Rewriter_number_loaded_rules 1
266 Rewriter_number_reloads 5
267 Rewriter_number_rewritten_queries 23
268 Rewriter_reload_error OFF
269 DELETE FROM query_rewrite.rewrite_rules;
270 INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
271 VALUES ( 'SELECT * FROM test.t1 WHERE ( a = ? AND TRUE ) OR b = ?',
272 'SELECT a FROM test.t1 WHERE a = ?' ),
273 ( 'SELECT a FROM test.t1',
274 'SELECT * FROM test.t1 WHERE a = \'abc\'' ),
275 ( 'SELECT a FROM test.t1 WHERE b = ?',
276 'SELECT * FROM test.t1 WHERE b = ?' ),
277 ( 'SELECT * FROM test.t2',
278 'SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a' ),
279 ( 'SELECT * FROM test.t1 WHERE a = ? OR b = ?',
280 'SELECT * FROM test.t1 WHERE b = ? OR a = ?' );
281 SELECT * FROM query_rewrite.rewrite_rules;
282 id pattern pattern_database replacement enabled message normalized_pattern
283 11 SELECT * FROM test.t1 WHERE ( a = ? AND TRUE ) OR b = ? NULL SELECT a FROM test.t1 WHERE a = ? YES NULL NULL
284 12 SELECT a FROM test.t1 NULL SELECT * FROM test.t1 WHERE a = 'abc' YES NULL NULL
285 13 SELECT a FROM test.t1 WHERE b = ? NULL SELECT * FROM test.t1 WHERE b = ? YES NULL NULL
286 14 SELECT * FROM test.t2 NULL SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a YES NULL NULL
287 15 SELECT * FROM test.t1 WHERE a = ? OR b = ? NULL SELECT * FROM test.t1 WHERE b = ? OR a = ? YES NULL NULL
288 CALL query_rewrite.flush_rewrite_rules();
289 SELECT * FROM query_rewrite.rewrite_rules;
290 id pattern pattern_database replacement enabled message normalized_pattern
291 11 SELECT * FROM test.t1 WHERE ( a = ? AND TRUE ) OR b = ? NULL SELECT a FROM test.t1 WHERE a = ? YES NULL select `*` from `test`.`t1` where (((`a` = ?) and true) or (`b` = ?))
292 12 SELECT a FROM test.t1 NULL SELECT * FROM test.t1 WHERE a = 'abc' YES NULL select `a` from `test`.`t1`
293 13 SELECT a FROM test.t1 WHERE b = ? NULL SELECT * FROM test.t1 WHERE b = ? YES NULL select `a` from `test`.`t1` where (`b` = ?)
294 14 SELECT * FROM test.t2 NULL SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a YES NULL select `*` from `test`.`t2`
295 15 SELECT * FROM test.t1 WHERE a = ? OR b = ? NULL SELECT * FROM test.t1 WHERE b = ? OR a = ? YES NULL select `*` from `test`.`t1` where ((`a` = ?) or (`b` = ?))
296 # Check a query that doesn't have a rewrite rule doesn't get rewritten.
297 SELECT b FROM test.t1;
298 b
299 def
300 klm
301 qrs
302 # Check a query with just one parameter.
303 SELECT a FROM test.t1 WHERE b = 'qrs';
304 a b
305 nop qrs
306 Warnings:
307 Note 1105 Query 'SELECT a FROM test.t1 WHERE b = 'qrs'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'qrs'' by a query rewrite plugin
308 # Check a rule with parameter truncation (fewer parameters in the
309 # output query than in the input query);
310 SELECT * FROM test.t1 WHERE ( a = 'abc' AND TRUE ) OR b = 'klm';
311 a
312 abc
313 Warnings:
314 Note 1105 Query 'SELECT * FROM test.t1 WHERE ( a = 'abc' AND TRUE ) OR b = 'klm'' rewritten to 'SELECT a FROM test.t1 WHERE a = 'abc'' by a query rewrite plugin
315 SELECT * FROM test.t1 WHERE ( a = 'abc' AND FALSE ) OR b = 'klm';
316 a b
317 ghi klm
318 # Check a non parameterized query.
319 SELECT * from t1 WHERE a = 'abc';
320 a b
321 abc def
322 # Check that a non-rewritten query does not yield a warning.
323 SELECT b FROM test.t1;
324 b
325 def
326 klm
327 qrs
328 # Check that a query is not rewritten if the query corresponds to a
329 # replacement.
330 SELECT a FROM test.t1;
331 a b
332 abc def
333 Warnings:
334 Note 1105 Query 'SELECT a FROM test.t1' rewritten to 'SELECT * FROM test.t1 WHERE a = 'abc'' by a query rewrite plugin
335 # Check that we can execute a rewrite more than once.
336 SELECT * FROM test.t2;
337 a b a
338 abc def abc
339 Warnings:
340 Note 1105 Query 'SELECT * FROM test.t2' rewritten to 'SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a' by a query rewrite plugin
341 SELECT * FROM test.t2;
342 a b a
343 abc def abc
344 Warnings:
345 Note 1105 Query 'SELECT * FROM test.t2' rewritten to 'SELECT * FROM test.t1 JOIN test.t2 ON t1.a = t2.a' by a query rewrite plugin
346 # Remove the warnings.
347 SELECT b FROM test.t1;
348 b
349 def
350 klm
351 qrs
352 # Check parameter switching in a query rewrite
353 SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi';
354 a b
355 abc def
356 ghi klm
357 Warnings:
358 Note 1105 Query 'SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'def' OR a = 'ghi'' by a query rewrite plugin
359 # Verify with whitespace.
360 SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi';
361 a b
362 abc def
363 ghi klm
364 Warnings:
365 Note 1105 Query 'SELECT * FROM test.t1 WHERE a = 'def' OR b = 'ghi'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'def' OR a = 'ghi'' by a query rewrite plugin
366 # Verify with comments.
367 SELECT * FROM test.t1 WHERE a =/* 'def' ? */'def' OR b = 'ghi';
368 a b
369 abc def
370 ghi klm
371 Warnings:
372 Note 1105 Query 'SELECT * FROM test.t1 WHERE a =/* 'def' ? */'def' OR b = 'ghi'' rewritten to 'SELECT * FROM test.t1 WHERE b = 'def' OR a = 'ghi'' by a query rewrite plugin
373 # Check our status variables.
374 SHOW STATUS LIKE 'Rewriter%';
375 Variable_name Value
376 Rewriter_number_loaded_rules 5
377 Rewriter_number_reloads 6
378 Rewriter_number_rewritten_queries 31
379 Rewriter_reload_error OFF
380 DROP TABLE t1;
381 DROP TABLE t2;
382 DELETE FROM query_rewrite.rewrite_rules;
383 # Test of literals matching.
384 INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
385 VALUES ( 'SELECT 1, ?', 'SELECT "rewritten w/rule 1"' ),
386 ( 'SELECT 2, ?', 'SELECT "rewritten w/rule 2"' ),
387 ( 'SELECT "The_original_query"', 'SELECT "The_rewritten_query"');
388 SELECT * FROM query_rewrite.rewrite_rules;
389 id pattern pattern_database replacement enabled message normalized_pattern
390 16 SELECT 1, ? NULL SELECT "rewritten w/rule 1" YES NULL NULL
391 17 SELECT 2, ? NULL SELECT "rewritten w/rule 2" YES NULL NULL
392 18 SELECT "The_original_query" NULL SELECT "The_rewritten_query" YES NULL NULL
393 CALL query_rewrite.flush_rewrite_rules();
394 SELECT * FROM query_rewrite.rewrite_rules;
395 id pattern pattern_database replacement enabled message normalized_pattern
396 16 SELECT 1, ? NULL SELECT "rewritten w/rule 1" YES NULL select ?,?
397 17 SELECT 2, ? NULL SELECT "rewritten w/rule 2" YES NULL select ?,?
398 18 SELECT "The_original_query" NULL SELECT "The_rewritten_query" YES NULL select ?
399 SELECT 1, 1;
400 rewritten w/rule 1
401 rewritten w/rule 1
402 Warnings:
403 Note 1105 Query 'SELECT 1, 1' rewritten to 'SELECT "rewritten w/rule 1"' by a query rewrite plugin
404 SELECT 1, 2;
405 rewritten w/rule 1
406 rewritten w/rule 1
407 Warnings:
408 Note 1105 Query 'SELECT 1, 2' rewritten to 'SELECT "rewritten w/rule 1"' by a query rewrite plugin
409 SELECT 2, 1;
410 rewritten w/rule 2
411 rewritten w/rule 2
412 Warnings:
413 Note 1105 Query 'SELECT 2, 1' rewritten to 'SELECT "rewritten w/rule 2"' by a query rewrite plugin
414 SELECT 2, 2;
415 rewritten w/rule 2
416 rewritten w/rule 2
417 Warnings:
418 Note 1105 Query 'SELECT 2, 2' rewritten to 'SELECT "rewritten w/rule 2"' by a query rewrite plugin
419 SELECT 3, 1;
420 3 1
421 3 1
422 SELECT 3, 2;
423 3 2
424 3 2
425 SELECT 'The_original_query';
426 The_rewritten_query
427 The_rewritten_query
428 Warnings:
429 Note 1105 Query 'SELECT 'The_original_query'' rewritten to 'SELECT "The_rewritten_query"' by a query rewrite plugin
430 DELETE FROM query_rewrite.rewrite_rules;
431 Warnings:
432 Warning 1620 Plugin is busy and will be uninstalled on shutdown
433 # Query rewrite plugin was queued for uninstalling.