1
set global query_cache_strip_comments=ON;
2
set GLOBAL query_cache_size=1355776;
3
drop table if exists t1;
4
create table t1 (a int not null);
5
insert into t1 values (1),(2),(3);
14
/* with comment first */select * from t1;
19
-----------------------------------------------------
20
/* with comment first */select * from t1
21
-----------------------------------------------------
22
show status like "Qcache_queries_in_cache";
24
Qcache_queries_in_cache 1
25
show status like "Qcache_inserts";
28
show status like "Qcache_hits";
31
/* with comment first */select * from t1;
36
/* with comment first */select * from t1;
41
show status like "Qcache_queries_in_cache";
43
Qcache_queries_in_cache 1
44
show status like "Qcache_inserts";
47
show status like "Qcache_hits";
50
-----------------------------------------------------
53
-----------------------------------------------------
54
show status like "Qcache_queries_in_cache";
56
Qcache_queries_in_cache 1
57
show status like "Qcache_inserts";
60
show status like "Qcache_hits";
75
show status like "Qcache_queries_in_cache";
77
Qcache_queries_in_cache 1
78
show status like "Qcache_inserts";
81
show status like "Qcache_hits";
84
-----------------------------------------------------
87
-----------------------------------------------------
88
show status like "Qcache_queries_in_cache";
90
Qcache_queries_in_cache 1
91
show status like "Qcache_inserts";
94
show status like "Qcache_hits";
103
-- with comment first
109
show status like "Qcache_queries_in_cache";
111
Qcache_queries_in_cache 1
112
show status like "Qcache_inserts";
115
show status like "Qcache_hits";
118
-----------------------------------------------------
119
/* with comment first and "quote" */select * from t1
120
-----------------------------------------------------
121
show status like "Qcache_queries_in_cache";
123
Qcache_queries_in_cache 1
124
show status like "Qcache_inserts";
127
show status like "Qcache_hits";
130
/* with comment first and "quote" */select * from t1;
135
/* with comment first and "quote" */select * from t1;
140
show status like "Qcache_queries_in_cache";
142
Qcache_queries_in_cache 1
143
show status like "Qcache_inserts";
146
show status like "Qcache_hits";
149
-----------------------------------------------------
150
# with comment first and "quote"
152
-----------------------------------------------------
153
show status like "Qcache_queries_in_cache";
155
Qcache_queries_in_cache 1
156
show status like "Qcache_inserts";
159
show status like "Qcache_hits";
162
# with comment first and "quote"
168
# with comment first and "quote"
174
show status like "Qcache_queries_in_cache";
176
Qcache_queries_in_cache 1
177
show status like "Qcache_inserts";
180
show status like "Qcache_hits";
183
-----------------------------------------------------
184
-- with comment first and "quote"
186
-----------------------------------------------------
187
show status like "Qcache_queries_in_cache";
189
Qcache_queries_in_cache 1
190
show status like "Qcache_inserts";
193
show status like "Qcache_hits";
196
-- with comment first and "quote"
202
-- with comment first and "quote"
208
show status like "Qcache_queries_in_cache";
210
Qcache_queries_in_cache 1
211
show status like "Qcache_inserts";
214
show status like "Qcache_hits";
217
-----------------------------------------------------
218
/* with comment and whitespaces first */select * from t1
219
-----------------------------------------------------
220
show status like "Qcache_queries_in_cache";
222
Qcache_queries_in_cache 1
223
show status like "Qcache_inserts";
226
show status like "Qcache_hits";
229
/* with comment and whitespaces first */select * from t1;
234
/* with comment and whitespaces first */select * from t1;
239
show status like "Qcache_queries_in_cache";
241
Qcache_queries_in_cache 1
242
show status like "Qcache_inserts";
245
show status like "Qcache_hits";
248
-----------------------------------------------------
249
# with comment and whitespaces first
251
-----------------------------------------------------
252
show status like "Qcache_queries_in_cache";
254
Qcache_queries_in_cache 1
255
show status like "Qcache_inserts";
258
show status like "Qcache_hits";
261
# with comment and whitespaces first
267
# with comment and whitespaces first
273
show status like "Qcache_queries_in_cache";
275
Qcache_queries_in_cache 1
276
show status like "Qcache_inserts";
279
show status like "Qcache_hits";
282
-----------------------------------------------------
283
-- with comment and whitespaces first
285
-----------------------------------------------------
286
show status like "Qcache_queries_in_cache";
288
Qcache_queries_in_cache 1
289
show status like "Qcache_inserts";
292
show status like "Qcache_hits";
295
-- with comment and whitespaces first
301
-- with comment and whitespaces first
307
show status like "Qcache_queries_in_cache";
309
Qcache_queries_in_cache 1
310
show status like "Qcache_inserts";
313
show status like "Qcache_hits";
316
-----------------------------------------------------
317
select * /* internal comment */ from t1
318
-----------------------------------------------------
319
show status like "Qcache_queries_in_cache";
321
Qcache_queries_in_cache 1
322
show status like "Qcache_inserts";
325
show status like "Qcache_hits";
328
select * /* internal comment */ from t1;
333
select * /* internal comment */ from t1;
338
show status like "Qcache_queries_in_cache";
340
Qcache_queries_in_cache 1
341
show status like "Qcache_inserts";
344
show status like "Qcache_hits";
347
-----------------------------------------------------
348
select */* internal comment */ from t1
349
-----------------------------------------------------
350
show status like "Qcache_queries_in_cache";
352
Qcache_queries_in_cache 1
353
show status like "Qcache_inserts";
356
show status like "Qcache_hits";
359
select */* internal comment */ from t1;
364
select */* internal comment */ from t1;
369
show status like "Qcache_queries_in_cache";
371
Qcache_queries_in_cache 1
372
show status like "Qcache_inserts";
375
show status like "Qcache_hits";
378
-----------------------------------------------------
379
select */* internal comment */from t1
380
-----------------------------------------------------
381
show status like "Qcache_queries_in_cache";
383
Qcache_queries_in_cache 1
384
show status like "Qcache_inserts";
387
show status like "Qcache_hits";
390
select */* internal comment */from t1;
395
select */* internal comment */from t1;
400
show status like "Qcache_queries_in_cache";
402
Qcache_queries_in_cache 1
403
show status like "Qcache_inserts";
406
show status like "Qcache_hits";
409
-----------------------------------------------------
410
select * /* internal comment with "quote" */ from t1
411
-----------------------------------------------------
412
show status like "Qcache_queries_in_cache";
414
Qcache_queries_in_cache 1
415
show status like "Qcache_inserts";
418
show status like "Qcache_hits";
421
select * /* internal comment with "quote" */ from t1;
426
select * /* internal comment with "quote" */ from t1;
431
show status like "Qcache_queries_in_cache";
433
Qcache_queries_in_cache 1
434
show status like "Qcache_inserts";
437
show status like "Qcache_hits";
440
-----------------------------------------------------
441
select */* internal comment with "quote" */ from t1
442
-----------------------------------------------------
443
show status like "Qcache_queries_in_cache";
445
Qcache_queries_in_cache 1
446
show status like "Qcache_inserts";
449
show status like "Qcache_hits";
452
select */* internal comment with "quote" */ from t1;
457
select */* internal comment with "quote" */ from t1;
462
show status like "Qcache_queries_in_cache";
464
Qcache_queries_in_cache 1
465
show status like "Qcache_inserts";
468
show status like "Qcache_hits";
471
-----------------------------------------------------
472
select */* internal comment with "quote" */from t1
473
-----------------------------------------------------
474
show status like "Qcache_queries_in_cache";
476
Qcache_queries_in_cache 1
477
show status like "Qcache_inserts";
480
show status like "Qcache_hits";
483
select */* internal comment with "quote" */from t1;
488
select */* internal comment with "quote" */from t1;
493
show status like "Qcache_queries_in_cache";
495
Qcache_queries_in_cache 1
496
show status like "Qcache_inserts";
499
show status like "Qcache_hits";
502
-----------------------------------------------------
505
-----------------------------------------------------
506
show status like "Qcache_queries_in_cache";
508
Qcache_queries_in_cache 1
509
show status like "Qcache_inserts";
512
show status like "Qcache_hits";
527
show status like "Qcache_queries_in_cache";
529
Qcache_queries_in_cache 1
530
show status like "Qcache_inserts";
533
show status like "Qcache_hits";
536
-----------------------------------------------------
538
-----------------------------------------------------
539
show status like "Qcache_queries_in_cache";
541
Qcache_queries_in_cache 1
542
show status like "Qcache_inserts";
545
show status like "Qcache_hits";
558
show status like "Qcache_queries_in_cache";
560
Qcache_queries_in_cache 1
561
show status like "Qcache_inserts";
564
show status like "Qcache_hits";
567
-----------------------------------------------------
569
-----------------------------------------------------
570
show status like "Qcache_queries_in_cache";
572
Qcache_queries_in_cache 1
573
show status like "Qcache_inserts";
576
show status like "Qcache_hits";
589
show status like "Qcache_queries_in_cache";
591
Qcache_queries_in_cache 1
592
show status like "Qcache_inserts";
595
show status like "Qcache_hits";
598
-----------------------------------------------------
600
/* comment in the end */
601
-----------------------------------------------------
602
show status like "Qcache_queries_in_cache";
604
Qcache_queries_in_cache 1
605
show status like "Qcache_inserts";
608
show status like "Qcache_hits";
612
/* comment in the end */;
618
/* comment in the end */;
623
show status like "Qcache_queries_in_cache";
625
Qcache_queries_in_cache 1
626
show status like "Qcache_inserts";
629
show status like "Qcache_hits";
632
-----------------------------------------------------
635
-----------------------------------------------------
636
show status like "Qcache_queries_in_cache";
638
Qcache_queries_in_cache 1
639
show status like "Qcache_inserts";
642
show status like "Qcache_hits";
657
show status like "Qcache_queries_in_cache";
659
Qcache_queries_in_cache 1
660
show status like "Qcache_inserts";
663
show status like "Qcache_hits";
666
-----------------------------------------------------
668
/* comment in the end */
670
-----------------------------------------------------
671
show status like "Qcache_queries_in_cache";
673
Qcache_queries_in_cache 1
674
show status like "Qcache_inserts";
677
show status like "Qcache_hits";
681
/* comment in the end */
688
/* comment in the end */
694
show status like "Qcache_queries_in_cache";
696
Qcache_queries_in_cache 1
697
show status like "Qcache_inserts";
700
show status like "Qcache_hits";
703
-----------------------------------------------------
704
select * from t1 #comment in the end
705
-----------------------------------------------------
706
show status like "Qcache_queries_in_cache";
708
Qcache_queries_in_cache 1
709
show status like "Qcache_inserts";
712
show status like "Qcache_hits";
715
select * from t1 #comment in the end;
720
select * from t1 #comment in the end;
725
show status like "Qcache_queries_in_cache";
727
Qcache_queries_in_cache 1
728
show status like "Qcache_inserts";
731
show status like "Qcache_hits";
734
-----------------------------------------------------
735
select * from t1 #comment in the end
737
-----------------------------------------------------
738
show status like "Qcache_queries_in_cache";
740
Qcache_queries_in_cache 1
741
show status like "Qcache_inserts";
744
show status like "Qcache_hits";
747
select * from t1 #comment in the end
753
select * from t1 #comment in the end
759
show status like "Qcache_queries_in_cache";
761
Qcache_queries_in_cache 1
762
show status like "Qcache_inserts";
765
show status like "Qcache_hits";
768
-----------------------------------------------------
769
select * from t1 -- comment in the end
770
-----------------------------------------------------
771
show status like "Qcache_queries_in_cache";
773
Qcache_queries_in_cache 1
774
show status like "Qcache_inserts";
777
show status like "Qcache_hits";
780
select * from t1 -- comment in the end;
785
select * from t1 -- comment in the end;
790
show status like "Qcache_queries_in_cache";
792
Qcache_queries_in_cache 1
793
show status like "Qcache_inserts";
796
show status like "Qcache_hits";
799
-----------------------------------------------------
800
select * from t1 -- comment in the end
802
-----------------------------------------------------
803
show status like "Qcache_queries_in_cache";
805
Qcache_queries_in_cache 1
806
show status like "Qcache_inserts";
809
show status like "Qcache_hits";
812
select * from t1 -- comment in the end
818
select * from t1 -- comment in the end
824
show status like "Qcache_queries_in_cache";
826
Qcache_queries_in_cache 1
827
show status like "Qcache_inserts";
830
show status like "Qcache_hits";
833
-----------------------------------------------------
834
select ' \' ' from t1
835
-----------------------------------------------------
836
show status like "Qcache_queries_in_cache";
838
Qcache_queries_in_cache 1
839
show status like "Qcache_inserts";
842
show status like "Qcache_hits";
845
select ' \' ' from t1;
850
select ' \' ' from t1;
855
show status like "Qcache_queries_in_cache";
857
Qcache_queries_in_cache 2
858
show status like "Qcache_inserts";
861
show status like "Qcache_hits";
865
SET GLOBAL query_cache_size=default;
866
set global query_cache_strip_comments=OFF;