diff options
author | Matthias Leich <matthias.leich@oracle.com> | 2011-06-16 22:35:01 +0200 |
---|---|---|
committer | Matthias Leich <matthias.leich@oracle.com> | 2011-06-16 22:35:01 +0200 |
commit | 699f0c067f82c07d6b495b594f6777995ceb6a6c (patch) | |
tree | b39c2cdbc1bc4f21e987f3c6d365c7ead5914233 /mysql-test/suite/perfschema | |
parent | 5b225518ff2193834804ddb403ac6c0f9a265884 (diff) | |
download | mariadb-git-699f0c067f82c07d6b495b594f6777995ceb6a6c.tar.gz |
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
Diffstat (limited to 'mysql-test/suite/perfschema')
4 files changed, 22 insertions, 8 deletions
diff --git a/mysql-test/suite/perfschema/include/cleanup_helper.inc b/mysql-test/suite/perfschema/include/cleanup_helper.inc index b7e37849f78..2c2d73f5fca 100644 --- a/mysql-test/suite/perfschema/include/cleanup_helper.inc +++ b/mysql-test/suite/perfschema/include/cleanup_helper.inc @@ -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 -# 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; diff --git a/mysql-test/suite/perfschema/include/upgrade_check.inc b/mysql-test/suite/perfschema/include/upgrade_check.inc index 3620e80002f..1e3ea43e689 100644 --- a/mysql-test/suite/perfschema/include/upgrade_check.inc +++ b/mysql-test/suite/perfschema/include/upgrade_check.inc @@ -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 diff --git a/mysql-test/suite/perfschema/r/selects.result b/mysql-test/suite/perfschema/r/selects.result index a3d0931cf4c..4c59cc3338e 100644 --- a/mysql-test/suite/perfschema/r/selects.result +++ b/mysql-test/suite/perfschema/r/selects.result @@ -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; diff --git a/mysql-test/suite/perfschema/t/selects.test b/mysql-test/suite/perfschema/t/selects.test index e8fd0827c53..e4541d6c6fc 100644 --- a/mysql-test/suite/perfschema/t/selects.test +++ b/mysql-test/suite/perfschema/t/selects.test @@ -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; |