Commit fc0de68e authored by unknown's avatar unknown

Turn on --check-testcase by default

Don't log check_warnings to binlog


mysql-test/include/check-testcase.test:
  Change to use a stored pårocedure for check_testcase
mysql-test/include/mtr_warnings.sql:
  Don't log the check_warning procedure to binlog
mysql-test/mysql-test-run.pl:
  Turn on --check-testcase by default
mysql-test/include/mtr_check.sql:
  New BitKeeper file ``mysql-test/include/mtr_check.sql''
parent 9cd71f5c
...@@ -7,58 +7,9 @@ ...@@ -7,58 +7,9 @@
# In that way its possible to check that a testcase does not have # In that way its possible to check that a testcase does not have
# any unwanted side affects. # any unwanted side affects.
# #
--disable_query_log
# Dump all global variables except those call mtr.check_testcase();
# that are supposed to change --enable_query_log
show global variables where Variable_name != 'timestamp';
# Dump all databases, there should be none
# except those that was created during bootstrap
show databases;
# The test database should not contain any tables
show tables from test;
# Dump the "mysql" database and its tables
use mysql;
show tables;
show create table columns_priv;
show create table db;
show create table func;
show create table help_category;
show create table help_keyword;
show create table help_relation;
show create table help_relation;
show create table host;
show create table proc;
show create table procs_priv;
show create table tables_priv;
show create table time_zone;
show create table time_zone_leap_second;
show create table time_zone_name;
show create table time_zone_transition;
show create table time_zone_transition_type;
show create table user;
# Select data from system tables to make sure they have been properly
# restored after test
select * from columns_priv;
select * from db order by host, db, user;
select * from func;
select * from help_category;
select * from help_keyword;
select * from help_relation;
select * from help_relation;
select * from host;
select * from proc;
select * from procs_priv;
select * from tables_priv;
select * from time_zone;
select * from time_zone_leap_second;
select * from time_zone_name;
select * from time_zone_transition;
select * from time_zone_transition_type;
select * from user;
delimiter ||;
use mtr||
--
-- Procedure used to check if server has been properly
-- restored after testcase has been run
--
CREATE DEFINER=root@localhost PROCEDURE check_testcase()
BEGIN
-- Dump all global variables except those
-- that are supposed to change
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE variable_name != 'timestamp';
-- Dump all databases, there should be none
-- except those that was created during bootstrap
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA;
-- The test database should not contain any tables
SELECT table_name FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema='test';
-- Show "mysql" database, tables and columns
SELECT table_name, table_type, engine FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema='mysql';
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_schema='mysql';
-- Checksum system tables to make sure they have been properly
-- restored after test
checksum table
mysql.columns_priv,
mysql.db,
mysql.func,
mysql.help_category,
mysql.help_keyword,
mysql.help_relation,
mysql.host,
mysql.proc,
mysql.procs_priv,
mysql.tables_priv,
mysql.time_zone,
mysql.time_zone_leap_second,
mysql.time_zone_name,
mysql.time_zone_transition,
mysql.time_zone_transition_type,
mysql.user;
END||
...@@ -210,6 +210,9 @@ INSERT INTO global_supressions VALUES ...@@ -210,6 +210,9 @@ INSERT INTO global_supressions VALUES
-- --
CREATE DEFINER=root@localhost PROCEDURE check_warnings() CREATE DEFINER=root@localhost PROCEDURE check_warnings()
BEGIN BEGIN
-- Don't write these queries to binlog
SET SQL_LOG_BIN=0;
-- --
-- Load the server .err file into "error_log" table -- Load the server .err file into "error_log" table
-- --
......
...@@ -145,7 +145,7 @@ my $opt_mtr_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto"; ...@@ -145,7 +145,7 @@ my $opt_mtr_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
my $opt_record; my $opt_record;
my $opt_report_features; my $opt_report_features;
our $opt_check_testcases; our $opt_check_testcases= 1;
my $opt_mark_progress; my $opt_mark_progress;
my $opt_sleep; my $opt_sleep;
...@@ -2107,6 +2107,10 @@ sub mysql_install_db { ...@@ -2107,6 +2107,10 @@ sub mysql_install_db {
mtr_tofile($bootstrap_sql_file, mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap(mtr_grab_file("include/mtr_warnings.sql"))); sql_to_bootstrap(mtr_grab_file("include/mtr_warnings.sql")));
# Add procedures for checking server is restored after testcase
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql")));
# Log bootstrap command # Log bootstrap command
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log"; my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
mtr_tofile($path_bootstrap_log, mtr_tofile($path_bootstrap_log,
......
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