GIF89a; Mini Shell

Mini Shell

Direktori : /usr/share/mysql-test/suite/perfschema/r/
Upload File :
Current File : //usr/share/mysql-test/suite/perfschema/r/statement_digest.result

####################################
# SETUP
####################################
CREATE DATABASE statements_digest;
USE statements_digest;
CREATE TABLE t1(a int);
CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
CREATE TABLE t6(a int, b int, c int, d int);
CREATE TABLE t11 (c CHAR(4));
CREATE TABLE t12 (c CHAR(4));
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
####################################
# EXECUTION
####################################
SELECT 1 FROM t1;
1
SELECT 1 FROM `t1`;
1
SELECT 1,2 FROM t1;
1	2
SELECT 1, 2, 3, 4 FROM t1;
1	2	3	4
SELECT 1 FROM t2;
1
SELECT 1,2 FROM t2;
1	2
SELECT 1, 2, 3, 4 FROM t2;
1	2	3	4
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t3 VALUES (1, 2);
INSERT INTO t4 VALUES (1, 2);
INSERT INTO t5 VALUES (1, 2, 3);
INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
INSERT INTO t1 VALUES (NULL);
INSERT INTO t3 VALUES (NULL,NULL);
INSERT INTO t3 VALUES (1,NULL);
INSERT INTO t3 VALUES (NULL,1);
INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
INSERT INTO t6 VALUES (1, 2, 3, NULL);
INSERT INTO t6 VALUES (1, 2, NULL, 4);
SELECT                                          1           +        1;
1           +        1
2
SELECT 1;
1
1
SELECT 1 /* This is an inline comment */ + 1;
1 /* This is an inline comment */ + 1
2
SELECT 1+
/*
this is a
multiple-line comment
*/
1;
1+
/*
this is a
multiple-line comment
*/
1
2
CREATE SCHEMA statements_digest_temp;
DROP SCHEMA statements_digest_temp;
CREATE DATABASE statements_digest_temp;
DROP DATABASE statements_digest_temp;
SELECT 1 FROM no_such_table;
ERROR 42S02: Table 'statements_digest.no_such_table' doesn't exist
CREATE TABLE dup_table (c char(4));
CREATE TABLE dup_table (c char(4));
ERROR 42S01: Table 'dup_table' already exists
DROP TABLE dup_table;
INSERT INTO t11 VALUES("MySQL");
Warnings:
Warning	1265	Data truncated for column 'c' at row 1
PREPARE stmt FROM "SELECT * FROM t12";
EXECUTE stmt;
c
EXECUTE stmt;
c
DEALLOCATE PREPARE stmt;
CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
CALL p1();
c
CALL p1();
c
DROP PROCEDURE p1;
CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
select func(3,4);
func(3,4)
7
select func(13,42);
func(13,42)
55
DROP FUNCTION func;
CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
INSERT INTO t12 VALUES ("abc");
INSERT INTO t12 VALUES ("def");
DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
SCHEMA_NAME	DIGEST	DIGEST_TEXT	COUNT_STAR	SUM_ROWS_AFFECTED	SUM_WARNINGS	SUM_ERRORS
statements_digest	01cfd3c48ebe150803a02f0b32ab4f7b	TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 	1	0	0	0
statements_digest	4a958a8b2138b7ae3b65a0edde877dca	SELECT ? FROM `t1` 	2	0	0	0
statements_digest	1f346cc75586f18fdded6e2f518e7d25	SELECT ?, ... FROM `t1` 	2	0	0	0
statements_digest	9ed289e97245aee8872bd79573ff71dc	SELECT ? FROM `t2` 	1	0	0	0
statements_digest	ec5d6ae42b4292cce44168c701fde301	SELECT ?, ... FROM `t2` 	2	0	0	0
statements_digest	c689b670f102bc028f36273ed00244de	INSERT INTO `t1` VALUES (?) 	2	2	0	0
statements_digest	baf2d67435fc5a66f517bd655c9154a3	INSERT INTO `t2` VALUES (?) 	1	1	0	0
statements_digest	cba557f7a643fac3a34563f74c57f040	INSERT INTO `t3` VALUES (...) 	4	4	0	0
statements_digest	26f967699697844ef6757a283c0432e0	INSERT INTO `t4` VALUES (...) 	1	1	0	0
statements_digest	1565e5ec0755d0d212e84567fdb86500	INSERT INTO `t5` VALUES (...) 	1	1	0	0
statements_digest	931de69cfc4123c9f5ebeb8da2e6fb0e	INSERT INTO `t1` VALUES (?) /* , ... */ 	2	7	0	0
statements_digest	81d8a0e0212bb8e02ad8f5e84d8c819a	INSERT INTO `t3` VALUES (...) /* , ... */ 	1	3	0	0
statements_digest	793ba1cc016c6e3c45c63023531955ad	INSERT INTO `t5` VALUES (...) /* , ... */ 	1	3	0	0
statements_digest	d44b7d3c3f03b5b9605c9cffb537b083	INSERT INTO `t6` VALUES (...) 	5	5	0	0
statements_digest	f2d57cea9e78e7b37c4509c0564dd1cc	SELECT ? + ? 	3	0	0	0
statements_digest	02396199eed2345830efcf00e51107ee	SELECT ? 	1	0	0	0
statements_digest	d02f821e8ce0a27519c833324368696d	CREATE SCHEMA `statements_digest_temp` 	2	2	0	0
statements_digest	5ea9da83763ff4b01e34c408d865568f	DROP SCHEMA `statements_digest_temp` 	2	0	0	0
statements_digest	ac9dfca3fe35b0d4c43a6bf62a3489b5	SELECT ? FROM `no_such_table` 	1	0	0	1
statements_digest	9fd65056536a8d74ea107b68849cfd27	CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 	2	0	0	1
statements_digest	f259e984954d6d77a9f94230726e1c0f	DROP TABLE `dup_table` 	1	0	0	0
statements_digest	17c0f9e5abf747e425ae24b66d44cf01	INSERT INTO `t11` VALUES (?) 	1	1	1	0
statements_digest	cee5b131782212e0ba1cd76ba28485c4	SHOW WARNINGS 	1	0	0	0
statements_digest	44d441f36c0487f8b32b6cb1e37f7c3f	PREPARE `stmt` FROM ? 	1	0	0	0
statements_digest	73bf0dc38bbbc571613bdb78e85ddb18	EXECUTE `stmt` 	2	0	0	0
statements_digest	8a87274dfc2961861326c1591f0df4bc	DEALLOCATE PREPARE `stmt` 	1	0	0	0
statements_digest	639ff9b1728335f463d2ed4134c7ec26	CREATE PROCEDURE `p1` ( ) BEGIN SELECT * FROM `t12` ; END 	1	0	0	0
statements_digest	627bb08bd333aa83cb4bbad88ab6e6b8	CALL `p1` ( ) 	2	0	0	0
statements_digest	949464b6c55462d9d7ad3f0a7608db10	DROP PROCEDURE `p1` 	1	0	0	0
statements_digest	bfc5c562a60a60857a026a17434e77bb	CREATE FUNCTION `func` ( `a` INTEGER , `b` INTEGER ) RETURNS INTEGER (?) RETURN `a` + `b` 	1	0	0	0
statements_digest	cf6fe4a8895dabaf9c30615b49bce6db	SELECT `func` (...) 	2	0	0	0
statements_digest	4b2d4d67e2faa0b938156e60e1f2023b	DROP FUNCTION `func` 	1	0	0	0
statements_digest	b859e51c90bdd984a1226ecf25fd80de	CREATE TRIGGER `trg` BEFORE INSERT ON `t12` FOR EACH ROW SET @? := ? 	1	0	0	0
statements_digest	cb2f065274b3e03693cb7d5396d4d978	INSERT INTO `t12` VALUES (?) 	2	2	0	0
statements_digest	903b51b5db2d5393542a7fc2614049fd	DROP TRIGGER `trg` 	1	0	0	0
####################################
# CLEANUP
####################################
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
DROP TABLE IF EXISTS t6;
DROP TABLE IF EXISTS t11;
DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;

./BlackJoker Mini Shell 1.0