Commit bbf0c9d4 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: pfs_upgrade* tests

parent 386ef087
......@@ -3,16 +3,14 @@
#
--source include/count_sessions.inc
--exec $MYSQL_UPGRADE --skip-verbose --force > $out_file 2> $err_file
--exec $MYSQL_UPGRADE --skip-verbose --force > $MYSQLTEST_VARDIR/tmp/out_file 2> $MYSQLTEST_VARDIR/tmp/err_file
--source include/wait_until_count_sessions.inc
# Verify that mysql_upgrade does not complain about the performance_schema
--replace_regex /at line [0-9]+/at line ###/
--cat_file $err_file
--error 0,1
--remove_file $out_file
--error 0,1
--remove_file $err_file
--cat_file $MYSQLTEST_VARDIR/tmp/err_file
--remove_file $MYSQLTEST_VARDIR/tmp/out_file
--remove_file $MYSQLTEST_VARDIR/tmp/err_file
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
drop event if exists test.user_event;
"Testing mysql_upgrade with EVENT performance_schema.user_event"
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
......
drop function if exists test.user_func;
"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
create function test.user_func() returns integer
return 0;
......
drop procedure if exists test.user_proc;
"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
create procedure test.user_proc()
select "Not supposed to be here";
......
drop table if exists test.user_table;
"Testing mysql_upgrade with TABLE performance_schema.user_table"
create table test.user_table(a int);
use performance_schema;
......
drop view if exists test.user_view;
"Testing mysql_upgrade with VIEW performance_schema.user_view"
create view test.user_view as select "Not supposed to be here";
use performance_schema;
......
......@@ -7,18 +7,7 @@
--source include/have_perfschema.inc
--source include/have_innodb.inc
# Some initial settings + Preemptive cleanup
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_event.err;
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_event.out;
--error 0,1
--remove_file $out_file
--error 0,1
--remove_file $err_file
--disable_warnings
drop event if exists test.user_event;
--enable_warnings
--echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
......@@ -33,4 +22,3 @@ select name from mysql.event where db='performance_schema';
update mysql.event set db='test' where name='user_event';
drop event test.user_event;
......@@ -7,18 +7,7 @@
--source include/have_perfschema.inc
--source include/have_innodb.inc
# Some initial settings + Preemptive cleanup
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_func.err;
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_func.out;
--error 0,1
--remove_file $out_file
--error 0,1
--remove_file $err_file
--disable_warnings
drop function if exists test.user_func;
--enable_warnings
--echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
......@@ -33,4 +22,3 @@ select name from mysql.proc where db='performance_schema';
update mysql.proc set db='test' where name='user_func';
drop function test.user_func;
......@@ -7,18 +7,7 @@
--source include/have_perfschema.inc
--source include/have_innodb.inc
# Some initial settings + Preemptive cleanup
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_proc.err;
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_proc.out;
--error 0,1
--remove_file $out_file
--error 0,1
--remove_file $err_file
--disable_warnings
drop procedure if exists test.user_proc;
--enable_warnings
--echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
......@@ -33,4 +22,3 @@ select name from mysql.proc where db='performance_schema';
update mysql.proc set db='test' where name='user_proc';
drop procedure test.user_proc;
......@@ -7,25 +7,12 @@
--source include/have_perfschema.inc
--source include/have_innodb.inc
# Some initial settings + Preemptive cleanup
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_table.err;
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_table.out;
--error 0,1
--remove_file $out_file
--error 0,1
--remove_file $err_file
--disable_warnings
drop table if exists test.user_table;
--enable_warnings
--echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
create table test.user_table(a int);
--error 0,1
--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
--copy_file $MYSQLD_DATADIR/test/user_table.frm $MYSQLD_DATADIR/performance_schema/user_table.frm
# Make sure the table is visible
......@@ -41,4 +28,3 @@ use test;
--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
drop table test.user_table;
......@@ -7,25 +7,12 @@
--source include/have_perfschema.inc
--source include/have_innodb.inc
# Some initial settings + Preemptive cleanup
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_view.err;
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_view.out;
--error 0,1
--remove_file $out_file
--error 0,1
--remove_file $err_file
--disable_warnings
drop view if exists test.user_view;
--enable_warnings
--echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
create view test.user_view as select "Not supposed to be here";
--error 0,1
--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
--copy_file $MYSQLD_DATADIR/test/user_view.frm $MYSQLD_DATADIR/performance_schema/user_view.frm
# Make sure the view is visible
......@@ -41,4 +28,3 @@ use test;
--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
drop view test.user_view;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment