Commit 4f4fccec authored by Marko Mäkelä's avatar Marko Mäkelä

Fix perfschema.statement_program_concurrency

parent 0e04beb2
This diff is collapsed.
...@@ -4,6 +4,7 @@ TRUNCATE TABLE performance_schema.events_statements_history; ...@@ -4,6 +4,7 @@ TRUNCATE TABLE performance_schema.events_statements_history;
CREATE DATABASE db1; CREATE DATABASE db1;
CREATE DATABASE db2; CREATE DATABASE db2;
CREATE DATABASE db3; CREATE DATABASE db3;
connect con1,localhost,root,,db1;
USE db1; USE db1;
CREATE TABLE t1( CREATE TABLE t1(
i INT NOT NULL i INT NOT NULL
...@@ -14,6 +15,7 @@ BEGIN ...@@ -14,6 +15,7 @@ BEGIN
INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1;
END| END|
CALL proc();; CALL proc();;
connect con2,localhost,root,,db2;
USE db2; USE db2;
CREATE TABLE t2( CREATE TABLE t2(
i INT NOT NULL i INT NOT NULL
...@@ -25,6 +27,7 @@ INSERT INTO t2 SELECT * FROM t2; ...@@ -25,6 +27,7 @@ INSERT INTO t2 SELECT * FROM t2;
RETURN x+y; RETURN x+y;
END| END|
SELECT addition(1234,9876);; SELECT addition(1234,9876);;
connect con3,localhost,root,,db3;
USE db3; USE db3;
CREATE TABLE t( CREATE TABLE t(
i INT NOT NULL, i INT NOT NULL,
...@@ -38,8 +41,12 @@ INSERT INTO t VALUES ( 10,1000 ); ...@@ -38,8 +41,12 @@ INSERT INTO t VALUES ( 10,1000 );
CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW
INSERT INTO t3 SELECT * FROM t3; INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t VALUES ( 20,2000);; INSERT INTO t VALUES ( 20,2000);;
connection con1;
connection con2;
addition(1234,9876) addition(1234,9876)
11110 11110
connection con3;
connection default;
SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
FROM performance_schema.events_statements_summary_by_program FROM performance_schema.events_statements_summary_by_program
WHERE OBJECT_SCHEMA='db1' OR OBJECT_SCHEMA='db2' OR OBJECT_SCHEMA='db3' WHERE OBJECT_SCHEMA='db1' OR OBJECT_SCHEMA='db2' OR OBJECT_SCHEMA='db3'
...@@ -76,8 +83,8 @@ INSERT INTO t2 SELECT * FROM t2; ...@@ -76,8 +83,8 @@ INSERT INTO t2 SELECT * FROM t2;
RETURN x+y; RETURN x+y;
END db2 NULL NULL NULL NULL 0 END db2 NULL NULL NULL NULL 0
statement/sql/select SELECT addition(1234,9876) db2 NULL NULL NULL NULL 0 statement/sql/select SELECT addition(1234,9876) db2 NULL NULL NULL NULL 0
statement/sp/stmt INSERT INTO t2 SELECT * FROM t2 db2 FUNCTION db2 addition TRANSACTION 1 statement/sp/stmt INSERT INTO t2 SELECT * FROM t2 db2 FUNCTION db2 addition STATEMENT 1
statement/sp/freturn NULL db2 FUNCTION db2 addition TRANSACTION 1 statement/sp/freturn NULL db2 FUNCTION db2 addition STATEMENT 1
statement/sql/change_db USE db3 db3 NULL NULL NULL NULL 0 statement/sql/change_db USE db3 db3 NULL NULL NULL NULL 0
statement/sql/create_table CREATE TABLE t( statement/sql/create_table CREATE TABLE t(
i INT NOT NULL, i INT NOT NULL,
...@@ -91,7 +98,7 @@ statement/sql/insert INSERT INTO t VALUES ( 10,1000 ) db3 NULL NULL NULL NULL 0 ...@@ -91,7 +98,7 @@ statement/sql/insert INSERT INTO t VALUES ( 10,1000 ) db3 NULL NULL NULL NULL 0
statement/sql/create_trigger CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW statement/sql/create_trigger CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW
INSERT INTO t3 SELECT * FROM t3 db3 NULL NULL NULL NULL 0 INSERT INTO t3 SELECT * FROM t3 db3 NULL NULL NULL NULL 0
statement/sql/insert INSERT INTO t VALUES ( 20,2000) db3 NULL NULL NULL NULL 0 statement/sql/insert INSERT INTO t VALUES ( 20,2000) db3 NULL NULL NULL NULL 0
statement/sp/stmt INSERT INTO t3 SELECT * FROM t3 db3 TRIGGER db3 trg TRANSACTION 1 statement/sp/stmt INSERT INTO t3 SELECT * FROM t3 db3 TRIGGER db3 trg STATEMENT 1
TRUNCATE TABLE performance_schema.events_statements_summary_by_program; TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
TRUNCATE TABLE performance_schema.events_statements_history; TRUNCATE TABLE performance_schema.events_statements_history;
# Clean-up # Clean-up
...@@ -105,3 +112,6 @@ DROP TABLE db3.t; ...@@ -105,3 +112,6 @@ DROP TABLE db3.t;
DROP DATABASE db1; DROP DATABASE db1;
DROP DATABASE db2; DROP DATABASE db2;
DROP DATABASE db3; DROP DATABASE db3;
disconnect con1;
disconnect con2;
disconnect con3;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment