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
8d6d318c
Commit
8d6d318c
authored
Feb 25, 2008
by
msvensson@pilot.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only uise one file for current test
Don't retry by default Fixes for --embedded
parent
0b547b26
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
36 deletions
+54
-36
mysql-test/lib/My/ConfigFactory.pm
mysql-test/lib/My/ConfigFactory.pm
+12
-4
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+11
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+22
-23
mysql-test/t/csv.test
mysql-test/t/csv.test
+1
-1
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+6
-6
mysql-test/t/ps_1general.test
mysql-test/t/ps_1general.test
+1
-1
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+1
-1
No files found.
mysql-test/lib/My/ConfigFactory.pm
View file @
8d6d318c
...
...
@@ -359,7 +359,15 @@ sub post_check_embedded_group {
my
$first_mysqld
=
$config
->
first_like
('
mysqld.
')
or
croak
"
Can't run with embedded, config has no mysqld
";
my
@no_copy
=
(
'
log-error
',
# Embedded server writes stderr to mysqltest's log file
);
foreach
my
$option
(
$first_mysqld
->
options
()
)
{
# Don't copy options whose name is in "no_copy" list
next
if
grep
(
$option
->
name
()
eq
$_
,
@no_copy
);
$config
->
insert
('
embedded
',
$option
->
name
(),
$option
->
value
())
}
...
...
mysql-test/lib/mtr_cases.pm
View file @
8d6d318c
...
...
@@ -891,6 +891,16 @@ sub collect_one_test_case {
}
}
if
(
$::opt_embedded_server
)
{
if
(
$tinfo
->
{'
not_embedded
'}
)
{
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
Not run for embedded server
";
return
$tinfo
;
}
}
# ----------------------------------------------------------------------
# Find config file to use if not already selected in <testname>.opt file
# ----------------------------------------------------------------------
...
...
@@ -960,6 +970,7 @@ my @tags=
["
include/master-slave.inc
",
"
rpl_test
",
1
],
["
include/ndb_master-slave.inc
",
"
rpl_test
",
1
],
["
include/federated.inc
",
"
federated_test
",
1
],
["
include/not_embedded.inc
",
"
not_embedded
",
1
],
);
...
...
mysql-test/mysql-test-run.pl
View file @
8d6d318c
...
...
@@ -66,8 +66,9 @@ our $basedir;
our
$path_charsetsdir
;
our
$path_client_bindir
;
our
$path_language
;
our
$path_timefile
;
our
$path_current_test_log
;
our
$path_current_testlog
;
our
$path_testlog
;
our
$default_vardir
;
our
$opt_vardir
;
# Path to use for var/ dir
...
...
@@ -112,7 +113,7 @@ our $opt_view_protocol;
our
$opt_debug
;
our
@opt_cases
;
# The test cases names in argv
my
$opt_embedded_server
;
our
$opt_embedded_server
;
# Options used when connecting to an already running server
my
%
opts_extern
;
...
...
@@ -735,8 +736,8 @@ sub command_line_setup {
# socket path names.
$sockdir
=
tempdir
(
CLEANUP
=>
0
)
if
(
length
(
$sockdir
)
>=
70
);
$path_t
imefile
=
"
$opt_vardir
/log/mysqltest-time
";
$path_current_test
_
log
=
"
$opt_vardir
/log/current_test
";
$path_t
estlog
=
"
$opt_vardir
/log/mysqltest.log
";
$path_current_testlog
=
"
$opt_vardir
/log/current_test
";
$path_ndb_testrun_log
=
"
$opt_vardir
/log/ndb_testrun.log
";
}
...
...
@@ -1753,7 +1754,7 @@ sub run_tests {
{
# Testcase failed, enter retry mode
my
$retries
=
1
;
while
(
$retries
<
=
$opt_retry
){
while
(
$retries
<
$opt_retry
){
mtr_report
("
\n
Retrying, attempt(
$retries
/
$opt_retry
)...
\n
");
if
(
run_testcase
(
$tinfo
)
<=
0
)
...
...
@@ -2097,6 +2098,8 @@ sub run_testcase_check_skip_test($)
}
}
return
0
;
}
...
...
@@ -2183,8 +2186,8 @@ sub find_testcase_skipped_reason($)
# Set default message
$tinfo
->
{'
comment
'}
=
"
Detected by testcase(no log file)
";
# Open
mysqltest-time(the mysqltest log file)
my
$F
=
IO::
File
->
new
(
$path_
timefile
)
# Open
the test log file
my
$F
=
IO::
File
->
new
(
$path_
current_testlog
)
or
return
;
my
$reason
;
...
...
@@ -2199,7 +2202,7 @@ sub find_testcase_skipped_reason($)
if
(
!
$reason
)
{
mtr_warning
("
Could not find reason for skipping test in
$path_
timefile
");
mtr_warning
("
Could not find reason for skipping test in
$path_
current_testlog
");
$reason
=
"
Detected by testcase(reason unknown)
";
}
$tinfo
->
{'
comment
'}
=
$reason
;
...
...
@@ -2297,7 +2300,7 @@ sub run_testcase ($) {
}
# Write start of testcase to log
mark_log
(
$path_current_test
_
log
,
$tinfo
);
mark_log
(
$path_current_testlog
,
$tinfo
);
if
(
start_servers
(
$tinfo
))
{
...
...
@@ -2368,7 +2371,7 @@ sub run_testcase ($) {
{
# Testcase itself tell us to skip this one
$tinfo
->
{
skip_detected_by_test
}
=
1
;
# Try to get reason from
mysqltest.log
# Try to get reason from
test log file
find_testcase_skipped_reason
(
$tinfo
);
mtr_report_test_skipped
(
$tinfo
);
}
...
...
@@ -2393,16 +2396,11 @@ sub run_testcase ($) {
}
# Save info from this testcase run to mysqltest.log
my
$path_mysqltest_log
=
"
$opt_vardir
/log/mysqltest.log
";
mtr_appendfile_to_file
(
$path_current_test_log
,
$path_mysqltest_log
)
if
-
f
$path_current_test_log
;
mtr_appendfile_to_file
(
$path_timefile
,
$path_mysqltest_log
)
if
-
f
$path_timefile
;
# Remove the file that mysqltest writes info to
unlink
(
$path_timefile
);
# Remove the file that mysql-test-run writes info to
unlink
(
$path_current_test_log
);
if
(
-
f
$path_current_testlog
)
{
mtr_appendfile_to_file
(
$path_current_testlog
,
$path_testlog
);
unlink
(
$path_current_testlog
);
}
return
(
$res
==
62
)
?
0
:
$res
;
...
...
@@ -2548,7 +2546,7 @@ sub after_test_failure ($) {
sub
report_failure_and_restart
($)
{
my
$tinfo
=
shift
;
mtr_report_test_failed
(
$tinfo
,
$path_
timefile
);
mtr_report_test_failed
(
$tinfo
,
$path_
current_testlog
);
print
"
\n
";
if
(
$opt_force
)
{
...
...
@@ -3321,7 +3319,8 @@ sub start_mysqltest ($) {
name
=>
"
mysqltest
",
path
=>
$exe
,
args
=>
\
$args
,
error
=>
$path_timefile
,
append
=>
1
,
error
=>
$path_current_testlog
,
verbose
=>
$opt_verbose
,
);
mtr_verbose
("
Started
$proc
");
...
...
mysql-test/t/csv.test
View file @
8d6d318c
...
...
@@ -1588,7 +1588,7 @@ create table bug15205 (val int(11) not null) engine=csv;
create table bug15205_2 (val int(11) not null) engine=csv;
--remove_file
$MYSQLD_DATADIR
/test/bug15205.CSV
# system error (can't open the datafile)
--replace_result
$MYSQLTEST_VARDIR
. m
aster-
data/ ''
--replace_result
$MYSQLTEST_VARDIR
. m
ysqld.1/
data/ ''
--error 13
select * from bug15205;
select * from bug15205_2;
...
...
mysql-test/t/innodb.test
View file @
8d6d318c
...
...
@@ -1130,7 +1130,7 @@ drop table t2;
# Test error handling
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
--
error
ER_WRONG_FK_DEF
create
table
t2
(
id
int
(
11
)
not
null
,
id2
int
(
11
)
not
null
,
constraint
t1_id_fk
foreign
key
(
id2
,
id
)
references
t1
(
id
))
engine
=
innodb
;
...
...
@@ -1323,7 +1323,7 @@ source include/varchar.inc;
#
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
create
table
t1
(
v
varchar
(
65530
),
key
(
v
));
drop
table
t1
;
create
table
t1
(
v
varchar
(
65536
));
...
...
@@ -1598,7 +1598,7 @@ disconnect b;
set
foreign_key_checks
=
0
;
create
table
t2
(
a
int
primary
key
,
b
int
,
foreign
key
(
b
)
references
t1
(
a
))
engine
=
innodb
;
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
--
error
1005
create
table
t1
(
a
char
(
10
)
primary
key
,
b
varchar
(
20
))
engine
=
innodb
;
set
foreign_key_checks
=
1
;
...
...
@@ -1610,7 +1610,7 @@ drop table t2;
set
foreign_key_checks
=
0
;
create
table
t1
(
a
varchar
(
10
)
primary
key
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
--
error
1005
create
table
t2
(
a
varchar
(
10
),
foreign
key
(
a
)
references
t1
(
a
))
engine
=
innodb
DEFAULT
CHARSET
=
utf8
;
set
foreign_key_checks
=
1
;
...
...
@@ -1641,7 +1641,7 @@ set foreign_key_checks=0;
create
table
t2
(
a
varchar
(
10
),
foreign
key
(
a
)
references
t1
(
a
))
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
create
table
t3
(
a
varchar
(
10
)
primary
key
)
engine
=
innodb
DEFAULT
CHARSET
=
utf8
;
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
--
error
1025
rename
table
t3
to
t1
;
set
foreign_key_checks
=
1
;
...
...
@@ -2269,7 +2269,7 @@ ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
# mysqltest first does replace_regex, then replace_result
--
replace_regex
/
'[^'
]
*
test
\
/
#sql-[0-9a-f_]*'/'#sql-temporary'/
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
--
error
1025
ALTER
TABLE
t2
MODIFY
a
INT
NOT
NULL
;
DELETE
FROM
t1
;
...
...
mysql-test/t/ps_1general.test
View file @
8d6d318c
...
...
@@ -577,7 +577,7 @@ prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create
table
t5
(
a
int
)
;
# rename must fail, t7 does not exist
# Clean up the filename here because embedded server reports whole path
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
t7
.
frm
t7
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
t7
.
frm
t7
--
error
1017
execute
stmt1
;
create
table
t7
(
a
int
)
;
...
...
mysql-test/t/trigger.test
View file @
8d6d318c
...
...
@@ -1148,7 +1148,7 @@ dummy
EOF
chmod
0000
$MYSQLD_DATADIR
/
test
/
t1_ai
.
TRN
~
;
# Normalize the datadir path; the embedded server doesn't chdir to datadir
--
replace_result
$MYSQLTEST_VARDIR
.
m
aster
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
m
ysqld
.
1
/
data
/
''
--
error
1
rename
table
t1
to
t2
;
# 't1' should be still there and triggers should work correctly
...
...
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