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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7feb6c1a
Commit
7feb6c1a
authored
Dec 19, 2007
by
msvensson@pilot.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve --check-testcase
parent
f4d93f41
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
24 deletions
+46
-24
mysql-test/include/check-testcase.test
mysql-test/include/check-testcase.test
+34
-21
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+12
-3
No files found.
mysql-test/include/check-testcase.test
View file @
7feb6c1a
#
#
# This test is executed twice for each test case if mysql-test-run is passed
# This test is executed twice for each test case if mysql-test-run is passed
# the flag --check-testcase.
# the flag --check-testcase. Before every testcase it is run with mysqltest
# Before every testcase it's run with mysqltest in record mode and will
# in record mode and will thus produce an output file that can be compared
# thus produce an output file
# to output from after the tescase.
# that can be compared to output from after the tescase.
# In that way its possible to check that a testcase does not have
# In that way it's possible to check that a testcase does not have
# any unwanted side affects.
# any unwanted side affects.
#
#
#
# Dump all global variables except those
# Dump all global variables
# that are supposed to change
#
show
global
variables
where
Variable_name
!=
'timestamp'
;
show
global
variables
;
#
# Dump all databases, there should be none
# Dump all databases
# except mysql, test and information_schema
#
show
databases
;
show
databases
;
#
# The test database should not contain any tables
# Dump the "test" database, all it's tables and their data
show
tables
from
test
;
#
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
skip
-
lock
-
tables
test
#
# Dump the "mysql" database and its tables
# Dump the "mysql" database and it's tables
# Select data separately to add "order by"
#
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
skip
-
lock
-
tables
--
no
-
data
mysql
use
mysql
;
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
columns_priv
;
select
*
from
db
order
by
host
,
db
,
user
;
select
*
from
db
order
by
host
,
db
,
user
;
select
*
from
func
;
select
*
from
func
;
...
...
mysql-test/mysql-test-run.pl
View file @
7feb6c1a
...
@@ -149,7 +149,7 @@ my $opt_mtr_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
...
@@ -149,7 +149,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
;
my
$opt_check_testcases
;
our
$opt_check_testcases
;
my
$opt_mark_progress
;
my
$opt_mark_progress
;
my
$opt_sleep
;
my
$opt_sleep
;
...
@@ -2123,6 +2123,7 @@ sub do_before_run_mysqltest($)
...
@@ -2123,6 +2123,7 @@ sub do_before_run_mysqltest($)
sub
run_check_testcase_all
($$)
sub
run_check_testcase_all
($$)
{
{
my
(
$tinfo
,
$mode
)
=
@_
;
my
(
$tinfo
,
$mode
)
=
@_
;
my
$result
;
foreach
my
$mysqld
(
mysqlds
()
)
foreach
my
$mysqld
(
mysqlds
()
)
{
{
...
@@ -2132,9 +2133,11 @@ sub run_check_testcase_all($$)
...
@@ -2132,9 +2133,11 @@ sub run_check_testcase_all($$)
{
{
# Check failed, mark the test case with that info
# Check failed, mark the test case with that info
$tinfo
->
{'
check_testcase_failed
'}
=
1
;
$tinfo
->
{'
check_testcase_failed
'}
=
1
;
$result
=
1
;
}
}
}
}
}
}
return
$result
;
}
}
...
@@ -2323,7 +2326,12 @@ sub run_testcase ($) {
...
@@ -2323,7 +2326,12 @@ sub run_testcase ($) {
if
(
$opt_check_testcases
)
if
(
$opt_check_testcases
)
{
{
run_check_testcase_all
(
$tinfo
,
"
after
");
if
(
run_check_testcase_all
(
$tinfo
,
"
after
"))
{
# Stop all servers that are known to be running
stop_all_servers
();
mtr_report
("
Resuming tests...
\n
");
}
}
}
}
}
elsif
(
$res
==
62
)
elsif
(
$res
==
62
)
...
@@ -2602,7 +2610,8 @@ sub mysqld_arguments ($$$) {
...
@@ -2602,7 +2610,8 @@ sub mysqld_arguments ($$$) {
}
}
# Check if "extra_opt" contains skip-log-bin
# Check if "extra_opt" contains skip-log-bin
my
$skip_binlog
=
grep
(
/^(--|--loose-)skip-log-bin/
,
@$extra_opt
,
@opt_extra_mysqld_opt
);
my
$skip_binlog
=
grep
(
/^(--|--loose-)skip-log-bin/
,
@$extra_opt
,
@opt_extra_mysqld_opt
);
if
(
$opt_debug
)
if
(
$opt_debug
)
{
{
...
...
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