2012-03-28 01:04:46 +02:00
|
|
|
-- Copyright (c) 2008, 2011, Oracle and/or its affiliates
|
2011-07-04 09:33:16 +02:00
|
|
|
--
|
|
|
|
-- 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
|
|
|
|
-- 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,
|
|
|
|
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2011-06-30 17:37:13 +02:00
|
|
|
|
2008-04-09 12:27:39 +02:00
|
|
|
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
|
2011-10-05 15:14:14 +02:00
|
|
|
WHERE variable_name NOT IN ('timestamp', 'innodb_file_format_max')
|
2011-03-08 13:55:36 +01:00
|
|
|
AND variable_name not like "Last_IO_Err*"
|
2012-01-13 15:50:02 +01:00
|
|
|
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
|
2012-06-27 16:13:12 +02:00
|
|
|
AND variable_name != 'INNODB_USE_NATIVE_AIO'
|
2009-06-22 10:06:35 +02:00
|
|
|
ORDER BY variable_name;
|
2008-04-09 12:27:39 +02:00
|
|
|
|
|
|
|
-- 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
|
2008-04-09 14:38:42 +02:00
|
|
|
SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES
|
2008-04-09 12:27:39 +02:00
|
|
|
WHERE table_schema='test';
|
|
|
|
|
|
|
|
-- Show "mysql" database, tables and columns
|
2008-04-09 22:06:02 +02:00
|
|
|
SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql
|
|
|
|
FROM INFORMATION_SCHEMA.TABLES
|
|
|
|
WHERE table_schema='mysql' AND table_name != 'ndb_apply_status'
|
|
|
|
ORDER BY tables_in_mysql;
|
|
|
|
SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql,
|
|
|
|
column_name, ordinal_position, column_default, is_nullable,
|
|
|
|
data_type, character_maximum_length, character_octet_length,
|
|
|
|
numeric_precision, numeric_scale, character_set_name,
|
|
|
|
collation_name, column_type, column_key, extra, column_comment
|
|
|
|
FROM INFORMATION_SCHEMA.COLUMNS
|
|
|
|
WHERE table_schema='mysql' AND table_name != 'ndb_apply_status'
|
|
|
|
ORDER BY columns_in_mysql;
|
2008-04-09 12:27:39 +02:00
|
|
|
|
|
|
|
-- 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;
|
|
|
|
|
2012-02-23 07:50:11 +01:00
|
|
|
-- verify that no plugin changed its disabled/enabled state
|
|
|
|
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
|
|
|
|
|
2013-09-26 21:54:16 +02:00
|
|
|
show status like 'slave_open_temp_tables';
|
|
|
|
|
2008-04-09 12:27:39 +02:00
|
|
|
END||
|
2011-08-17 14:42:18 +02:00
|
|
|
|