summaryrefslogtreecommitdiff
path: root/mysql-test/r/status.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/status.result')
-rw-r--r--mysql-test/r/status.result41
1 files changed, 35 insertions, 6 deletions
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index 55afd159053..60ec5d7dec3 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -2,6 +2,8 @@ set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
SET @old_log_output = @@global.log_output;
SET GLOBAL LOG_OUTPUT = 'FILE';
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
flush status;
show status like 'Table_lock%';
Variable_name Value
@@ -11,7 +13,7 @@ select * from information_schema.session_status where variable_name like 'Table_
VARIABLE_NAME VARIABLE_VALUE
TABLE_LOCKS_IMMEDIATE 0
TABLE_LOCKS_WAITED 0
-# Switched to connection: con1
+connection con1;
set sql_log_bin=0;
set @old_general_log = @@global.general_log;
set global general_log = 'OFF';
@@ -21,21 +23,23 @@ insert into t1 values(1);
select 1;
1
1
-# Switched to connection: con2
+connection con2;
lock tables t1 read;
unlock tables;
lock tables t1 read;
-# Switched to connection: con1
+connection con1;
update t1 set n = 3;
-# Switched to connection: con2
+connection con2;
unlock tables;
-# Switched to connection: con1
+connection con1;
show status like 'Table_locks_waited';
Variable_name Value
Table_locks_waited 1
drop table t1;
set global general_log = @old_general_log;
-# Switched to connection: default
+disconnect con2;
+disconnect con1;
+connection default;
select 1;
1
1
@@ -77,6 +81,10 @@ VARIABLE_NAME VARIABLE_VALUE
MAX_USED_CONNECTIONS 1
SET @save_thread_cache_size=@@thread_cache_size;
SET GLOBAL thread_cache_size=3;
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
+connection con1;
+disconnect con2;
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 3
@@ -90,19 +98,25 @@ Max_used_connections 2
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
VARIABLE_NAME VARIABLE_VALUE
MAX_USED_CONNECTIONS 2
+connect con2,localhost,root,,;
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 3
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
VARIABLE_NAME VARIABLE_VALUE
MAX_USED_CONNECTIONS 3
+connect con3,localhost,root,,;
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 4
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
VARIABLE_NAME VARIABLE_VALUE
MAX_USED_CONNECTIONS 4
+connection default;
SET GLOBAL thread_cache_size=@save_thread_cache_size;
+disconnect con3;
+disconnect con2;
+disconnect con1;
CREATE TABLE t1 ( a INT );
INSERT INTO t1 VALUES (1), (2);
SELECT a FROM t1 LIMIT 1;
@@ -151,6 +165,7 @@ SHOW SESSION STATUS LIKE 'Last_query_cost';
Variable_name Value
Last_query_cost 5.205836
DROP TABLE t1;
+connect con1,localhost,root,,;
show status like 'com_show_status';
Variable_name Value
Com_show_status 3
@@ -183,6 +198,8 @@ Variable_name Value
Com_show_status 8
rnd_diff tmp_table_diff
28 8
+disconnect con1;
+connection default;
flush status;
show status like 'Com%function';
Variable_name Value
@@ -201,6 +218,8 @@ Variable_name Value
Com_alter_function 0
Com_create_function 1
Com_drop_function 1
+connect root, localhost, root,,test;
+connection root;
create database db37908;
create table db37908.t1(f1 int);
insert into db37908.t1 values(1);
@@ -209,6 +228,8 @@ grant usage,execute on test.* to mysqltest_1@localhost;
create procedure proc37908() begin select 1; end |
create function func37908() returns int sql security invoker
return (select * from db37908.t1 limit 1)|
+connect user1,localhost,mysqltest_1,,test;
+connection user1;
select * from db37908.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
show status where variable_name ='uptime' and 2 in (select * from db37908.t1);
@@ -217,11 +238,16 @@ show procedure status where name ='proc37908' and 1 in (select f1 from db37908.t
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
show function status where name ='func37908' and 1 in (select func37908());
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
+connection default;
+disconnect user1;
+disconnect root;
drop database db37908;
drop procedure proc37908;
drop function func37908;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
DROP USER mysqltest_1@localhost;
+connect con1,localhost,root,,;
+connection con1;
DROP PROCEDURE IF EXISTS p1;
DROP FUNCTION IF EXISTS f1;
CREATE FUNCTION f1() RETURNS INTEGER
@@ -245,6 +271,8 @@ CALL p1();
SELECT 9;
9
9
+disconnect con1;
+connection default;
DROP PROCEDURE p1;
DROP FUNCTION f1;
flush status;
@@ -341,5 +369,6 @@ Handler_tmp_write 2
Handler_update 0
Handler_write 0
drop table t1;
+connection default;
set @@global.concurrent_insert= @old_concurrent_insert;
SET GLOBAL log_output = @old_log_output;