Fix for
Bug 12430414 - THE TEST PERFSCHEMA.SELECTS.TEST CAN AFFECT SUCCEEDING TESTS Bug 12430599 - THE TEST PERFSCHEMA.ONE_THREAD_PER_CON. CAN AFFECT SUCCEEDING TESTS Bug 12431153 - THE TEST PERFSCHEMA.PFS_UPGRADE CAN AFFECT SUCCEEDING TEST
This commit is contained in:
parent
db114007eb
commit
f6fb732f1a
@ -1,25 +1,33 @@
|
|||||||
# 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
|
# This program is free software; you can redistribute it and/or
|
||||||
# it under the terms of the GNU General Public License as published by
|
# modify it under the terms of the GNU General Public License
|
||||||
# the Free Software Foundation; version 2 of the 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,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# 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.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# 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
|
# Tests for PERFORMANCE_SCHEMA
|
||||||
|
|
||||||
update performance_schema.setup_instruments set enabled='YES';
|
update performance_schema.setup_instruments set enabled='YES';
|
||||||
|
|
||||||
|
connection con1;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
|
connection con2;
|
||||||
disconnect con2;
|
disconnect con2;
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
|
connection con3;
|
||||||
disconnect con3;
|
disconnect con3;
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
|
||||||
|
@ -17,8 +17,10 @@
|
|||||||
# $out_file and $err_file must be set within pfs_upgrade.test.
|
# $out_file and $err_file must be set within pfs_upgrade.test.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--source include/count_sessions.inc
|
||||||
--error 1
|
--error 1
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force > $out_file 2> $err_file
|
--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
|
# Verify that mysql_upgrade complained about the performance_schema
|
||||||
--cat_file $err_file
|
--cat_file $err_file
|
||||||
|
@ -62,6 +62,7 @@ SELECT EVENT_ID FROM performance_schema.events_waits_current
|
|||||||
WHERE 1 = 2;
|
WHERE 1 = 2;
|
||||||
CREATE EVENT t_ps_event
|
CREATE EVENT t_ps_event
|
||||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||||
|
ON COMPLETION PRESERVE
|
||||||
DO INSERT INTO t_event
|
DO INSERT INTO t_event
|
||||||
SELECT DISTINCT EVENT_ID
|
SELECT DISTINCT EVENT_ID
|
||||||
FROM performance_schema.events_waits_current
|
FROM performance_schema.events_waits_current
|
||||||
@ -106,5 +107,6 @@ EVENT_ID
|
|||||||
[EVENT_ID]
|
[EVENT_ID]
|
||||||
DROP PROCEDURE t_ps_proc;
|
DROP PROCEDURE t_ps_proc;
|
||||||
DROP FUNCTION t_ps_func;
|
DROP FUNCTION t_ps_func;
|
||||||
|
DROP EVENT t_ps_event;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t_event;
|
DROP TABLE t_event;
|
||||||
|
@ -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
|
# 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
|
# 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;
|
WHERE 1 = 2;
|
||||||
CREATE EVENT t_ps_event
|
CREATE EVENT t_ps_event
|
||||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||||
|
ON COMPLETION PRESERVE
|
||||||
DO INSERT INTO t_event
|
DO INSERT INTO t_event
|
||||||
SELECT DISTINCT EVENT_ID
|
SELECT DISTINCT EVENT_ID
|
||||||
FROM performance_schema.events_waits_current
|
FROM performance_schema.events_waits_current
|
||||||
@ -168,7 +169,7 @@ delimiter ;|
|
|||||||
SELECT t_ps_func(connection_id()) = @p_id;
|
SELECT t_ps_func(connection_id()) = @p_id;
|
||||||
|
|
||||||
# We might reach this point too early which means the event scheduler has not
|
# 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.
|
# and run our test statement afterwards.
|
||||||
let $wait_timeout= 20;
|
let $wait_timeout= 20;
|
||||||
let $wait_condition= SELECT COUNT(*) = 1 FROM t_event;
|
let $wait_condition= SELECT COUNT(*) = 1 FROM t_event;
|
||||||
@ -179,5 +180,6 @@ SELECT * FROM t_event;
|
|||||||
# Clean up
|
# Clean up
|
||||||
DROP PROCEDURE t_ps_proc;
|
DROP PROCEDURE t_ps_proc;
|
||||||
DROP FUNCTION t_ps_func;
|
DROP FUNCTION t_ps_func;
|
||||||
|
DROP EVENT t_ps_event;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t_event;
|
DROP TABLE t_event;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user