mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
mysql-5.5.18 merge
This commit is contained in:
@ -15,8 +15,8 @@ use performance_schema;
|
||||
# "where" filters out instances that can be conditionally compiled out
|
||||
#
|
||||
|
||||
select name from mutex_instances group by name;
|
||||
select name from mutex_instances where name not rlike '/(DEBUG_SYNC::mutex|LOCK_des_key_file)$' group by name;
|
||||
select name from rwlock_instances group by name;
|
||||
select name from cond_instances group by name;
|
||||
select name from cond_instances where name not rlike '/(DEBUG_SYNC::cond)$' group by name;
|
||||
select event_name from file_instances group by event_name;
|
||||
select name from threads group by name;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -11,7 +11,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check server start options, read from a .cnf file
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -11,7 +11,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
|
@ -41,6 +41,8 @@ drop table test.t1;
|
||||
# To ensure robustness:
|
||||
# - log file rotation is limited to file .000001 and .000002
|
||||
# - statistics are normalized to "NONE" or "MANY"
|
||||
# - statistics on ::update_cond conditions are not collected,
|
||||
# since this is too much dependent on execution.
|
||||
#
|
||||
|
||||
connection master;
|
||||
@ -84,7 +86,9 @@ select
|
||||
EVENT_NAME,
|
||||
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
|
||||
from performance_schema.events_waits_summary_global_by_event_name
|
||||
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
|
||||
where event_name like "%MYSQL_BIN_LOG%"
|
||||
and event_name not like "%MYSQL_BIN_LOG::update_cond"
|
||||
order by event_name;
|
||||
|
||||
-- echo "Expect no slave relay log"
|
||||
|
||||
@ -95,7 +99,9 @@ select * from performance_schema.file_summary_by_event_name
|
||||
where event_name like "%relaylog%" order by event_name;
|
||||
|
||||
select * from performance_schema.events_waits_summary_global_by_event_name
|
||||
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
|
||||
where event_name like "%MYSQL_RELAY_LOG%"
|
||||
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
|
||||
order by event_name;
|
||||
|
||||
sync_slave_with_master;
|
||||
-- echo "============ Performance schema on slave ============"
|
||||
@ -142,7 +148,9 @@ select
|
||||
EVENT_NAME,
|
||||
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
|
||||
from performance_schema.events_waits_summary_global_by_event_name
|
||||
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
|
||||
where event_name like "%MYSQL_BIN_LOG%"
|
||||
and event_name not like "%MYSQL_BIN_LOG::update_cond"
|
||||
order by event_name;
|
||||
|
||||
-- echo "Expect a slave relay log"
|
||||
|
||||
@ -173,7 +181,9 @@ select
|
||||
EVENT_NAME,
|
||||
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
|
||||
from performance_schema.events_waits_summary_global_by_event_name
|
||||
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
|
||||
where event_name like "%MYSQL_RELAY_LOG%"
|
||||
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
|
||||
order by event_name;
|
||||
|
||||
--source include/stop_slave.inc
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -97,6 +97,7 @@ SELECT EVENT_ID FROM performance_schema.events_waits_current
|
||||
WHERE 1 = 2;
|
||||
CREATE EVENT t_ps_event
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||
ON COMPLETION PRESERVE
|
||||
DO INSERT INTO t_event
|
||||
SELECT DISTINCT EVENT_ID
|
||||
FROM performance_schema.events_waits_current
|
||||
@ -168,7 +169,7 @@ delimiter ;|
|
||||
SELECT t_ps_func(connection_id()) = @p_id;
|
||||
|
||||
# We might reach this point too early which means the event scheduler has not
|
||||
# execute our "t_ps_event". Therefore we poll till the record was inserted
|
||||
# executed our "t_ps_event". Therefore we poll till the record was inserted
|
||||
# and run our test statement afterwards.
|
||||
let $wait_timeout= 20;
|
||||
let $wait_condition= SELECT COUNT(*) = 1 FROM t_event;
|
||||
@ -179,5 +180,6 @@ SELECT * FROM t_event;
|
||||
# Clean up
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
DROP EVENT t_ps_event;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_event;
|
||||
|
Reference in New Issue
Block a user