Skip to content

Commit 5522723

Browse files
authored
MDEV-26872 perfschema.prepared_statements non-deterministic test failure (#2290)
Correct by ORDER BY in the output.
1 parent 6b8c43b commit 5522723

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

mysql-test/suite/perfschema/r/prepared_statements.result

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PREPARE st2 FROM @s;
1111
PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
1212
PREPARE st4 FROM
1313
'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
14-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
14+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
1515
STATEMENT_NAME st1
1616
SQL_TEXT SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse
1717
COUNT_REPREPARE 0
@@ -88,7 +88,7 @@ OBJECT_TYPE NULL
8888
OBJECT_SCHEMA NULL
8989
OBJECT_NAME NULL
9090
EVENT_NAME statement/sql/select
91-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
91+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
9292
OBJECT_TYPE NULL
9393
OBJECT_SCHEMA NULL
9494
OBJECT_NAME NULL
@@ -118,7 +118,7 @@ a
118118
42
119119
80
120120
90
121-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
121+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
122122
STATEMENT_NAME st1
123123
SQL_TEXT SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse
124124
COUNT_REPREPARE 0
@@ -195,7 +195,7 @@ OBJECT_TYPE NULL
195195
OBJECT_SCHEMA NULL
196196
OBJECT_NAME NULL
197197
EVENT_NAME statement/sql/select
198-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
198+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
199199
OBJECT_TYPE NULL
200200
OBJECT_SCHEMA NULL
201201
OBJECT_NAME NULL
@@ -240,12 +240,12 @@ OBJECT_TYPE NULL
240240
OBJECT_SCHEMA NULL
241241
OBJECT_NAME NULL
242242
EVENT_NAME statement/sql/select
243-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
243+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
244244
OBJECT_TYPE NULL
245245
OBJECT_SCHEMA NULL
246246
OBJECT_NAME NULL
247247
TRUNCATE TABLE performance_schema.prepared_statements_instances ;
248-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
248+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
249249
STATEMENT_NAME st1
250250
SQL_TEXT SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse
251251
COUNT_REPREPARE 0
@@ -279,7 +279,7 @@ DEALLOCATE PREPARE st2;
279279
DEALLOCATE PREPARE st3;
280280
DEALLOCATE PREPARE st4;
281281
DROP TABLE t1;
282-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
282+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
283283
SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
284284
EVENT_NAME statement/sql/truncate
285285
SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
@@ -328,7 +328,7 @@ OBJECT_TYPE NULL
328328
OBJECT_SCHEMA NULL
329329
OBJECT_NAME NULL
330330
EVENT_NAME statement/sql/select
331-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
331+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
332332
OBJECT_TYPE NULL
333333
OBJECT_SCHEMA NULL
334334
OBJECT_NAME NULL
@@ -373,7 +373,7 @@ OBJECT_TYPE NULL
373373
OBJECT_SCHEMA NULL
374374
OBJECT_NAME NULL
375375
EVENT_NAME statement/sql/select
376-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
376+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
377377
OBJECT_TYPE NULL
378378
OBJECT_SCHEMA NULL
379379
OBJECT_NAME NULL
@@ -388,7 +388,7 @@ OBJECT_TYPE NULL
388388
OBJECT_SCHEMA NULL
389389
OBJECT_NAME NULL
390390
EVENT_NAME statement/sql/select
391-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
391+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
392392
OBJECT_TYPE NULL
393393
OBJECT_SCHEMA NULL
394394
OBJECT_NAME NULL
@@ -418,7 +418,7 @@ OBJECT_TYPE NULL
418418
OBJECT_SCHEMA NULL
419419
OBJECT_NAME NULL
420420
EVENT_NAME statement/sql/select
421-
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
421+
SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
422422
OBJECT_TYPE NULL
423423
OBJECT_SCHEMA NULL
424424
OBJECT_NAME NULL
@@ -433,7 +433,7 @@ PREPARE st2 FROM @s;
433433
PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
434434
PREPARE st4 FROM
435435
'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
436-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
436+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
437437
SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
438438
EVENT_NAME statement/sql/truncate
439439
SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
@@ -466,7 +466,7 @@ a
466466
42
467467
80
468468
90
469-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
469+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
470470
SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
471471
EVENT_NAME statement/sql/truncate
472472
SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
@@ -478,7 +478,7 @@ DEALLOCATE PREPARE st2;
478478
DEALLOCATE PREPARE st3;
479479
DEALLOCATE PREPARE st4;
480480
DROP TABLE t1;
481-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
481+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
482482
SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
483483
EVENT_NAME statement/sql/truncate
484484
SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
@@ -488,7 +488,7 @@ OBJECT_NAME NULL
488488
TRUNCATE TABLE performance_schema.events_statements_history_long ;
489489
UPDATE performance_schema.setup_consumers SET ENABLED = 'YES';
490490
PREPARE st FROM 'SELECT SUM(1000 + ?) AS total';
491-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
491+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
492492
STATEMENT_NAME st
493493
SQL_TEXT SELECT SUM(1000 + ?) AS total
494494
COUNT_REPREPARE 0
@@ -500,7 +500,7 @@ SET @d=100;
500500
EXECUTE st USING @d;
501501
total
502502
1100
503-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
503+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
504504
STATEMENT_NAME st
505505
SQL_TEXT SELECT SUM(1000 + ?) AS total
506506
COUNT_REPREPARE 0
@@ -512,7 +512,7 @@ SET @d = @d + 100;
512512
EXECUTE st USING @d;
513513
total
514514
1200
515-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
515+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
516516
STATEMENT_NAME st
517517
SQL_TEXT SELECT SUM(1000 + ?) AS total
518518
COUNT_REPREPARE 0
@@ -524,7 +524,7 @@ SET @d = @d + 100;
524524
EXECUTE st USING @d;
525525
total
526526
1300
527-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
527+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
528528
STATEMENT_NAME st
529529
SQL_TEXT SELECT SUM(1000 + ?) AS total
530530
COUNT_REPREPARE 0
@@ -536,7 +536,7 @@ SET @d = @d + 100;
536536
EXECUTE st USING @d;
537537
total
538538
1400
539-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
539+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
540540
STATEMENT_NAME st
541541
SQL_TEXT SELECT SUM(1000 + ?) AS total
542542
COUNT_REPREPARE 0
@@ -548,7 +548,7 @@ SET @d = @d + 100;
548548
EXECUTE st USING @d;
549549
total
550550
1500
551-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
551+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
552552
STATEMENT_NAME st
553553
SQL_TEXT SELECT SUM(1000 + ?) AS total
554554
COUNT_REPREPARE 0
@@ -560,7 +560,7 @@ SET @d = @d + 100;
560560
EXECUTE st USING @d;
561561
total
562562
1600
563-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
563+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
564564
STATEMENT_NAME st
565565
SQL_TEXT SELECT SUM(1000 + ?) AS total
566566
COUNT_REPREPARE 0
@@ -569,7 +569,7 @@ SUM_ROWS_SENT 6
569569
SUM_SELECT_SCAN 0
570570
SUM_NO_INDEX_USED 0
571571
TRUNCATE TABLE performance_schema.prepared_statements_instances ;
572-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
572+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
573573
STATEMENT_NAME st
574574
SQL_TEXT SELECT SUM(1000 + ?) AS total
575575
COUNT_REPREPARE 0
@@ -583,7 +583,7 @@ SET @d=3274;
583583
EXECUTE st USING @d;
584584
total
585585
4274
586-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
586+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
587587
STATEMENT_NAME st
588588
SQL_TEXT SELECT SUM(1000 + ?) AS total
589589
COUNT_REPREPARE 0
@@ -594,7 +594,7 @@ SUM_NO_INDEX_USED 0
594594
UPDATE performance_schema.setup_instruments SET ENABLED = 'NO'
595595
WHERE NAME like "statement/sql/prepare%";
596596
DEALLOCATE PREPARE st;
597-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
597+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
598598
UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
599599
WHERE NAME like "statement/sql/prepare%";
600600
UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
@@ -606,7 +606,7 @@ age INT
606606
);
607607
INSERT INTO tab VALUES(1,"Nakshatr",25),(2,"chanda",24),(3,"tejas",78);
608608
PREPARE st FROM 'SELECT * FROM tab';
609-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
609+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
610610
STATEMENT_NAME st
611611
SQL_TEXT SELECT * FROM tab
612612
COUNT_REPREPARE 0
@@ -619,7 +619,7 @@ Id name age
619619
1 Nakshatr 25
620620
2 chanda 24
621621
3 tejas 78
622-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
622+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
623623
STATEMENT_NAME st
624624
SQL_TEXT SELECT * FROM tab
625625
COUNT_REPREPARE 0
@@ -633,7 +633,7 @@ Id name
633633
1 Nakshatr
634634
2 chanda
635635
3 tejas
636-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
636+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
637637
STATEMENT_NAME st
638638
SQL_TEXT SELECT * FROM tab
639639
COUNT_REPREPARE 1
@@ -647,7 +647,7 @@ Id name age
647647
1 Nakshatr NULL
648648
2 chanda NULL
649649
3 tejas NULL
650-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
650+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
651651
STATEMENT_NAME st
652652
SQL_TEXT SELECT * FROM tab
653653
COUNT_REPREPARE 2
@@ -656,7 +656,7 @@ SUM_ROWS_SENT 9
656656
SUM_SELECT_SCAN 3
657657
SUM_NO_INDEX_USED 3
658658
TRUNCATE TABLE performance_schema.prepared_statements_instances ;
659-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
659+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
660660
STATEMENT_NAME st
661661
SQL_TEXT SELECT * FROM tab
662662
COUNT_REPREPARE 0
@@ -665,7 +665,7 @@ SUM_ROWS_SENT 0
665665
SUM_SELECT_SCAN 0
666666
SUM_NO_INDEX_USED 0
667667
DEALLOCATE PREPARE st;
668-
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
668+
SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT;
669669
TRUNCATE TABLE performance_schema.prepared_statements_instances ;
670670
TRUNCATE TABLE performance_schema.events_statements_history_long ;
671671
DROP TABLE tab;

mysql-test/suite/perfschema/t/prepared_statements.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
CREATE DATABASE db;
88
USE db;
99

10-
--let $psi_select = SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
10+
--let $psi_select = SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ORDER BY STATEMENT_NAME, SQL_TEXT
1111
--let $psi_truncate = TRUNCATE TABLE performance_schema.prepared_statements_instances
1212
--let $eshl_select = SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db'
1313
--let $eshl_truncate = TRUNCATE TABLE performance_schema.events_statements_history_long

0 commit comments

Comments
 (0)