mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Updated/added copyright headers
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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
|
||||
@ -17,9 +18,15 @@
|
||||
|
||||
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;
|
||||
|
||||
|
@ -17,8 +17,10 @@
|
||||
# $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
|
||||
|
@ -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;
|
||||
|
@ -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