Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d348362d
Commit
d348362d
authored
Apr 09, 2008
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn on --check-testcase by default
Don't log check_warnings to binlog
parent
eee737d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
53 deletions
+62
-53
mysql-test/include/check-testcase.test
mysql-test/include/check-testcase.test
+3
-52
mysql-test/include/mtr_check.sql
mysql-test/include/mtr_check.sql
+51
-0
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+3
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+5
-1
No files found.
mysql-test/include/check-testcase.test
View file @
d348362d
...
...
@@ -7,58 +7,9 @@
# In that way its possible to check that a testcase does not have
# any unwanted side affects.
#
# Dump all global variables except those
# that are supposed to change
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
;
--
disable_query_log
call
mtr
.
check_testcase
();
--
enable_query_log
mysql-test/include/mtr_check.sql
0 → 100644
View file @
d348362d
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
||
mysql-test/include/mtr_warnings.sql
View file @
d348362d
...
...
@@ -210,6 +210,9 @@ INSERT INTO global_supressions VALUES
--
CREATE
DEFINER
=
root
@
localhost
PROCEDURE
check_warnings
()
BEGIN
-- Don't write these queries to binlog
SET
SQL_LOG_BIN
=
0
;
--
-- Load the server .err file into "error_log" table
--
...
...
mysql-test/mysql-test-run.pl
View file @
d348362d
...
...
@@ -145,7 +145,7 @@ my $opt_mtr_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
my
$opt_record
;
my
$opt_report_features
;
our
$opt_check_testcases
;
our
$opt_check_testcases
=
1
;
my
$opt_mark_progress
;
my
$opt_sleep
;
...
...
@@ -2107,6 +2107,10 @@ sub mysql_install_db {
mtr_tofile
(
$bootstrap_sql_file
,
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
my
$path_bootstrap_log
=
"
$opt_vardir
/log/bootstrap.log
";
mtr_tofile
(
$path_bootstrap_log
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment