Debian Codegraph @

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

raw
1 ####################################################
2 # WL#9830 - PERFORMANCE_SCHEMA DIGEST QUERY SAMPLE #
3 ####################################################
4 # #
5 # Test Author - Mohit Joshi #
6 # Creation date - 18-Aug-2017 #
7 ####################################################
8
9 --source include/no_protocol.inc
10
11 --echo
12 --echo ##### TEST 1 - VERIFY QUERY_SAMPLE_TEXT LENGTH RETURNS NULL WHEN SQL TEXT LENGTH IS SET TO 0
13 --echo
14
15 --echo
16 --echo # Verify sql text length = 0
17 SELECT @@global.performance_schema_max_sql_text_length;
18 --echo
19 USE test;
20 --disable_warnings
21 DROP TABLE IF EXISTS t1;
22 --enable_warnings
23 CREATE TABLE t1 (s1 int);
24 INSERT INTO t1 values (100), (200), (300);
25 TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
26 UPDATE t1 SET s1 = 400;
27
28 --echo
29 --echo ## 1.3 Verify that QUERY_SAMPLE_TEXT has zero length
30 --echo
31 SELECT query_sample_text
32 FROM performance_schema.events_statements_summary_by_digest
33 WHERE digest_text = "UPDATE `t1` SET `s1` = ?";
34
35 --echo
36 --echo #### CLEANUP
37 --echo
38
39 DROP TABLE t1;