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:
@ -1,25 +1,32 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
# 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 the Free Software Foundation; version 2 of
|
||||
# the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# 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
|
||||
|
||||
update performance_schema.setup_instruments set enabled='YES';
|
||||
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection con3;
|
||||
disconnect con3;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2010, 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
|
||||
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2008, 2010, 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
|
||||
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 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
|
||||
@ -11,14 +11,16 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
# Routine to be called by pfs_upgrade.test
|
||||
# $out_file and $err_file must be set within pfs_upgrade.test.
|
||||
#
|
||||
|
||||
--source include/count_sessions.inc
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose --force > $out_file 2> $err_file
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $err_file
|
||||
|
@ -1,5 +1,5 @@
|
||||
use performance_schema;
|
||||
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;
|
||||
name
|
||||
wait/synch/mutex/archive/archive_mutex
|
||||
wait/synch/mutex/aria/LOCK_trn_list
|
||||
@ -32,7 +32,6 @@ wait/synch/mutex/mysys/THR_LOCK_open
|
||||
wait/synch/mutex/mysys/THR_LOCK_threads
|
||||
wait/synch/mutex/mysys/TMPDIR_mutex
|
||||
wait/synch/mutex/sql/Cversion_lock
|
||||
wait/synch/mutex/sql/DEBUG_SYNC::mutex
|
||||
wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state
|
||||
wait/synch/mutex/sql/hash_filo::lock
|
||||
wait/synch/mutex/sql/LOCK_active_mi
|
||||
@ -43,7 +42,6 @@ wait/synch/mutex/sql/LOCK_crypt
|
||||
wait/synch/mutex/sql/LOCK_delayed_create
|
||||
wait/synch/mutex/sql/LOCK_delayed_insert
|
||||
wait/synch/mutex/sql/LOCK_delayed_status
|
||||
wait/synch/mutex/sql/LOCK_des_key_file
|
||||
wait/synch/mutex/sql/LOCK_error_log
|
||||
wait/synch/mutex/sql/LOCK_error_messages
|
||||
wait/synch/mutex/sql/LOCK_event_queue
|
||||
@ -100,7 +98,7 @@ wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for
|
||||
wait/synch/rwlock/sql/MDL_lock::rwlock
|
||||
wait/synch/rwlock/sql/THR_LOCK_servers
|
||||
wait/synch/rwlock/sql/THR_LOCK_udf
|
||||
select name from cond_instances group by name;
|
||||
select name from cond_instances where name not rlike '/(DEBUG_SYNC::cond)$' group by name;
|
||||
name
|
||||
wait/synch/cond/aria/SERVICE_THREAD_CONTROL::COND_control
|
||||
wait/synch/cond/aria/TRANSLOG_BUFFER::prev_sent_to_disk_cond
|
||||
@ -117,7 +115,6 @@ wait/synch/cond/sql/COND_rpl_status
|
||||
wait/synch/cond/sql/COND_server_started
|
||||
wait/synch/cond/sql/COND_thread_cache
|
||||
wait/synch/cond/sql/COND_thread_count
|
||||
wait/synch/cond/sql/DEBUG_SYNC::cond
|
||||
wait/synch/cond/sql/Event_scheduler::COND_state
|
||||
wait/synch/cond/sql/Master_info::data_cond
|
||||
wait/synch/cond/sql/Master_info::start_cond
|
||||
|
@ -52,10 +52,11 @@ 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;
|
||||
EVENT_NAME COUNT_STAR
|
||||
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
|
||||
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond MANY
|
||||
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
|
||||
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
|
||||
"Expect no slave relay log"
|
||||
@ -68,9 +69,10 @@ EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_W
|
||||
wait/io/file/sql/relaylog 0 0 0 0
|
||||
wait/io/file/sql/relaylog_index 0 0 0 0
|
||||
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;
|
||||
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
|
||||
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond 0 0 0 0 0
|
||||
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
|
||||
"============ Performance schema on slave ============"
|
||||
select * from performance_schema.file_summary_by_instance
|
||||
@ -123,10 +125,11 @@ 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;
|
||||
EVENT_NAME COUNT_STAR
|
||||
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
|
||||
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond NONE
|
||||
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
|
||||
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
|
||||
"Expect a slave relay log"
|
||||
@ -162,8 +165,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;
|
||||
EVENT_NAME COUNT_STAR
|
||||
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond MANY
|
||||
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index MANY
|
||||
include/stop_slave.inc
|
||||
|
@ -62,6 +62,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
|
||||
@ -106,5 +107,6 @@ EVENT_ID
|
||||
[EVENT_ID]
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
DROP EVENT t_ps_event;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_event;
|
||||
|
@ -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