2014-09-24 22:52:17 +02:00
|
|
|
set @@session.max_heap_table_size=16*1024*1024;
|
2014-06-20 11:34:24 +02:00
|
|
|
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
|
|
|
|
create temporary table t2 (a int) engine=memory;
|
|
|
|
select variable_name, session_status.variable_value - t1.variable_value
|
|
|
|
from information_schema.session_status join t1 using (variable_name);
|
|
|
|
variable_name session_status.variable_value - t1.variable_value
|
|
|
|
OPENED_FILES 0
|
|
|
|
OPENED_PLUGIN_LIBRARIES 0
|
|
|
|
OPENED_TABLE_DEFINITIONS 2
|
2015-03-07 13:21:02 +01:00
|
|
|
OPENED_TABLES 1
|
2014-06-20 11:34:24 +02:00
|
|
|
OPENED_VIEWS 0
|
|
|
|
truncate table t2;
|
|
|
|
select variable_name, session_status.variable_value - t1.variable_value
|
|
|
|
from information_schema.session_status join t1 using (variable_name);
|
|
|
|
variable_name session_status.variable_value - t1.variable_value
|
|
|
|
OPENED_FILES 0
|
|
|
|
OPENED_PLUGIN_LIBRARIES 0
|
|
|
|
OPENED_TABLE_DEFINITIONS 2
|
2015-03-07 13:21:02 +01:00
|
|
|
OPENED_TABLES 1
|
2014-06-20 11:34:24 +02:00
|
|
|
OPENED_VIEWS 0
|
|
|
|
drop table t1;
|