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
88084d67
Commit
88084d67
authored
Oct 23, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merged 5.1-main-> 5.1-bugteam
parents
24367555
20674b1a
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
129 additions
and
37 deletions
+129
-37
client/mysqltest.cc
client/mysqltest.cc
+1
-0
mysql-test/collections/default.experimental
mysql-test/collections/default.experimental
+3
-0
mysql-test/include/check-warnings.test
mysql-test/include/check-warnings.test
+1
-1
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+2
-2
mysql-test/include/not_windows_embedded.inc
mysql-test/include/not_windows_embedded.inc
+11
-0
mysql-test/lib/My/SafeProcess/safe_kill_win.cc
mysql-test/lib/My/SafeProcess/safe_kill_win.cc
+22
-6
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+14
-2
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_report.pm
+1
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+68
-26
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+1
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+3
-0
mysql-test/t/plugin.test
mysql-test/t/plugin.test
+1
-0
mysql-test/t/plugin_load.test
mysql-test/t/plugin_load.test
+1
-0
No files found.
client/mysqltest.cc
View file @
88084d67
...
...
@@ -7720,6 +7720,7 @@ int main(int argc, char **argv)
if
(
!
ok_to_do
)
{
if
(
command
->
type
==
Q_SOURCE
||
command
->
type
==
Q_ERROR
||
command
->
type
==
Q_WRITE_FILE
||
command
->
type
==
Q_APPEND_FILE
||
command
->
type
==
Q_PERL
)
...
...
mysql-test/collections/default.experimental
View file @
88084d67
# For easier human reading (MTR doesn't care), please keep entries
# in alphabetical order. This also helps with merge conflict resolution.
binlog.binlog_multi_engine # joro : NDB tests marked as experimental as agreed with bochklin
funcs_1.charset_collation_1 # depends on compile-time decisions
...
...
mysql-test/include/check-warnings.test
View file @
88084d67
...
...
@@ -57,5 +57,5 @@ if (`select @result = 0`){
skip
OK
;
}
--
enable_query_log
echo
^
Found
warnings
!!
;
echo
^
Found
warnings
in
$log_error
;
exit
;
mysql-test/include/mtr_warnings.sql
View file @
88084d67
...
...
@@ -162,7 +162,7 @@ INSERT INTO global_suppressions VALUES
(
"Slave: Unknown column 'c7' in 't15' Error_code: 1054"
),
(
"Slave: Can't DROP 'c7'.* 1091"
),
(
"Slave: Key column 'c6'.* 1072"
),
(
"
Slave I/O: The slave I/
O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."
),
(
"
The slave I.
O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."
),
(
".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"
),
/* Test case for Bug#31590 in order_by.test produces the following error */
...
...
@@ -210,7 +210,7 @@ BEGIN
WHERE
suspicious
=
1
;
IF
@
num_warnings
>
0
THEN
SELECT
file_name
,
line
SELECT
line
FROM
error_log
WHERE
suspicious
=
1
;
--SELECT * FROM test_suppressions;
-- Return 2 -> check failed
...
...
mysql-test/include/not_windows_embedded.inc
0 → 100644
View file @
88084d67
let
$is_win
=
`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows")`
;
let
$is_embedded
=
`select version() like '%embedded%'`
;
#echo is_win: $is_win;
#echo is_embedded: $is_embedded;
if
(
$is_win
)
{
if
(
$is_embedded
)
{
skip
Not
supported
with
embedded
on
windows
;
}
}
mysql-test/lib/My/SafeProcess/safe_kill_win.cc
View file @
88084d67
...
...
@@ -30,7 +30,7 @@ int main(int argc, const char** argv )
DWORD
pid
=
-
1
;
HANDLE
shutdown_event
;
char
safe_process_name
[
32
]
=
{
0
};
int
retry_open_event
=
100
;
int
retry_open_event
=
2
;
/* Ignore any signals */
signal
(
SIGINT
,
SIG_IGN
);
signal
(
SIGBREAK
,
SIG_IGN
);
...
...
@@ -51,15 +51,31 @@ int main(int argc, const char** argv )
{
/*
Check if the process is alive, otherwise there is really
no
idea
to retry the open of the event
no
sense
to retry the open of the event
*/
HANDLE
process
;
if
((
process
=
OpenProcess
(
SYNCHRONIZE
,
FALSE
,
pid
))
==
NULL
)
DWORD
exit_code
;
process
=
OpenProcess
(
SYNCHRONIZE
|
PROCESS_QUERY_INFORMATION
,
FALSE
,
pid
);
if
(
!
process
)
{
fprintf
(
stderr
,
"Could not open event or process %d, error: %d
\n
"
,
pid
,
GetLastError
());
exit
(
3
);
/* Already died */
exit
(
1
);
}
if
(
!
GetExitCodeProcess
(
process
,
&
exit_code
))
{
fprintf
(
stderr
,
"GetExitCodeProcess failed, pid= %d, err= %d
\n
"
,
pid
,
GetLastError
());
exit
(
1
);
}
if
(
exit_code
!=
STILL_ACTIVE
)
{
/* Already died */
CloseHandle
(
process
);
exit
(
2
);
}
CloseHandle
(
process
);
if
(
retry_open_event
--
)
...
...
mysql-test/lib/mtr_cases.pm
View file @
88084d67
...
...
@@ -545,11 +545,11 @@ sub collect_one_suite($)
push
(
@
{
$new_test
->
{
slave_opt
}},
"
--plugin_load=
$plugin_list
");
if
(
$new_test
->
{
combination
})
{
$new_test
->
{
combination
}
.=
'
+ InnoDB
plugin
';
$new_test
->
{
combination
}
.=
'
+innodb_
plugin
';
}
else
{
$new_test
->
{
combination
}
=
'
InnoDB
plugin
';
$new_test
->
{
combination
}
=
'
innodb_
plugin
';
}
push
(
@new_cases
,
$new_test
);
}
...
...
@@ -1042,6 +1042,17 @@ sub collect_one_test_case {
}
}
if
(
$tinfo
->
{'
need_ssl
'}
)
{
# This is a test that needs ssl
if
(
!
$::opt_ssl_supported
)
{
# SSL is not supported, skip it
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
No SSL support
";
return
$tinfo
;
}
}
# ----------------------------------------------------------------------
# Find config file to use if not already selected in <testname>.opt file
# ----------------------------------------------------------------------
...
...
@@ -1122,6 +1133,7 @@ my @tags=
["
include/ndb_master-slave.inc
",
"
ndb_test
",
1
],
["
federated.inc
",
"
federated_test
",
1
],
["
include/not_embedded.inc
",
"
not_embedded
",
1
],
["
include/have_ssl.inc
",
"
need_ssl
",
1
],
);
...
...
mysql-test/lib/mtr_report.pm
View file @
88084d67
...
...
@@ -146,6 +146,7 @@ sub mtr_report_test ($) {
}
}
$fail
=
"
exp-fail
";
$tinfo
->
{
exp_fail
}
=
1
;
last
;
}
}
...
...
mysql-test/mysql-test-run.pl
View file @
88084d67
...
...
@@ -144,7 +144,7 @@ our @opt_extra_mysqld_opt;
my
$opt_compress
;
my
$opt_ssl
;
my
$opt_skip_ssl
;
my
$opt_ssl_supported
;
our
$opt_ssl_supported
;
my
$opt_ps_protocol
;
my
$opt_sp_protocol
;
my
$opt_cursor_protocol
;
...
...
@@ -323,7 +323,8 @@ sub main {
for
my
$limit
(
2000
,
1500
,
1000
,
500
){
$opt_parallel
--
if
(
$sys_info
->
min_bogomips
()
<
$limit
);
}
$opt_parallel
=
8
if
(
$opt_parallel
>
8
);
my
$max_par
=
$ENV
{
MTR_MAX_PARALLEL
}
||
8
;
$opt_parallel
=
$max_par
if
(
$opt_parallel
>
$max_par
);
$opt_parallel
=
$num_tests
if
(
$opt_parallel
>
$num_tests
);
$opt_parallel
=
1
if
(
IS_WINDOWS
and
$sys_info
->
isvm
());
$opt_parallel
=
1
if
(
$opt_parallel
<
1
);
...
...
@@ -519,7 +520,8 @@ sub run_test_server ($$$) {
}
}
$num_saved_datadir
++
;
$num_failed_test
++
unless
$result
->
{
retries
};
$num_failed_test
++
unless
(
$result
->
{
retries
}
||
$result
->
{
exp_fail
});
if
(
!
$opt_force
)
{
# Test has failed, force is off
...
...
@@ -738,6 +740,7 @@ sub run_worker ($) {
}
elsif
(
$line
eq
'
BYE
'){
mtr_report
("
Server said BYE
");
stop_all_servers
(
$opt_shutdown_timeout
);
exit
(
0
);
}
else
{
...
...
@@ -1337,6 +1340,9 @@ sub command_line_setup {
push
(
@valgrind_args
,
@default_valgrind_args
)
unless
@valgrind_args
;
# Make valgrind run in quiet mode so it only print errors
push
(
@valgrind_args
,
"
--quiet
"
);
mtr_report
("
Running valgrind with options
\"
",
join
("
",
@valgrind_args
),
"
\"
");
}
...
...
@@ -1794,7 +1800,7 @@ sub environment_setup {
# --------------------------------------------------------------------------
# Add the path where mysqld will find ha_example.so
# --------------------------------------------------------------------------
if
(
$mysql_version_id
>=
50100
&&
!
(
IS_WINDOWS
&&
$opt_embedded_server
)
)
{
if
(
$mysql_version_id
>=
50100
)
{
my
$plugin_filename
;
if
(
IS_WINDOWS
)
{
...
...
@@ -3012,7 +3018,8 @@ test case was executed:\n";
# Unknown process returned, most likley a crash, abort everything
$tinfo
->
{
comment
}
=
"
The server
$proc
crashed while running
"
.
"
'check testcase
$mode
test'
";
"
'check testcase
$mode
test'
"
.
get_log_from_proc
(
$proc
,
$tinfo
->
{
name
});
$result
=
3
;
}
...
...
@@ -3130,7 +3137,8 @@ sub run_on_all($$)
else
{
# Unknown process returned, most likley a crash, abort everything
$tinfo
->
{
comment
}
.=
"
The server
$proc
crashed while running '
$run
'
";
"
The server
$proc
crashed while running '
$run
'
"
.
get_log_from_proc
(
$proc
,
$tinfo
->
{
name
});
}
# Kill any check processes still running
...
...
@@ -3244,6 +3252,12 @@ sub run_testcase ($) {
mtr_verbose
("
Running test:
",
$tinfo
->
{
name
});
# Allow only alpanumerics pluss _ - + . in combination names
my
$combination
=
$tinfo
->
{
combination
};
if
(
$combination
&&
$combination
!~
/^\w[-\w\.\+]+$/
)
{
mtr_error
("
Combination '
$combination
' contains illegal characters
");
}
# -------------------------------------------------------
# Init variables that can change between each test case
# -------------------------------------------------------
...
...
@@ -3436,14 +3450,14 @@ sub run_testcase ($) {
my
$check_res
;
if
(
restart_forced_by_test
()
)
{
stop_all_servers
();
stop_all_servers
(
$opt_shutdown_timeout
);
}
elsif
(
$opt_check_testcases
and
$check_res
=
check_testcase
(
$tinfo
,
"
after
"))
{
if
(
$check_res
==
1
)
{
# Test case had sideeffects, not fatal error, just continue
stop_all_servers
();
stop_all_servers
(
$opt_shutdown_timeout
);
mtr_report
("
Resuming tests...
\n
");
}
else
{
...
...
@@ -3524,7 +3538,8 @@ sub run_testcase ($) {
{
# Server failed, probably crashed
$tinfo
->
{
comment
}
=
"
Server
$proc
failed during test run
";
"
Server
$proc
failed during test run
"
.
get_log_from_proc
(
$proc
,
$tinfo
->
{
name
});
# ----------------------------------------------------
# It's not mysqltest that has exited, kill it
...
...
@@ -3579,12 +3594,11 @@ sub run_testcase ($) {
}
# Extract server log from after the last occurrence of named test
# Return as an array of lines
#
# Perform a rough examination of the servers
# error log and write all lines that look
# suspicious into $error_log.warnings
#
sub
extract_warning_lines
($$)
{
sub
extract_server_log
($$)
{
my
(
$error_log
,
$tname
)
=
@_
;
# Open the servers .err log file and read all lines
...
...
@@ -3636,8 +3650,37 @@ sub extract_warning_lines ($$) {
}
}
}
return
@lines
;
}
# Write all suspicious lines to $error_log.warnings file
# Get log from server identified from its $proc object, from named test
# Return as a single string
#
sub
get_log_from_proc
($$)
{
my
(
$proc
,
$name
)
=
@_
;
my
$srv_log
=
"";
foreach
my
$mysqld
(
mysqlds
())
{
if
(
$mysqld
->
{
proc
}
eq
$proc
)
{
my
@srv_lines
=
extract_server_log
(
$mysqld
->
value
('
#log-error
'),
$name
);
$srv_log
=
"
\n
Server log from this test:
\n
"
.
join
("",
@srv_lines
);
last
;
}
}
return
$srv_log
;
}
# Perform a rough examination of the servers
# error log and write all lines that look
# suspicious into $error_log.warnings
#
sub
extract_warning_lines
($$)
{
my
(
$error_log
,
$tname
)
=
@_
;
my
@lines
=
extract_server_log
(
$error_log
,
$tname
);
# Write all suspicious lines to $error_log.warnings file
my
$warning_log
=
"
$error_log
.warnings
";
my
$Fwarn
=
IO::
File
->
new
(
$warning_log
,
"
w
")
or
die
("
Could not open file '
$warning_log
' for writing: $!
");
...
...
@@ -3645,14 +3688,9 @@ sub extract_warning_lines ($$) {
my
@patterns
=
(
# The patterns for detection of [Warning] and [ERROR]
# in the server log files have been faulty for a longer period
# and correcting them shows a few additional harmless warnings.
# Thus those patterns are temporarily removed from the list
# of patterns. For more info see BUG#42408
qr/^Warning:|mysqld: Warning|\[Warning\]/
,
qr/^Error:|\[ERROR\]/
,
qr/^==
.* at 0x/
,
qr/^==
\d*==/
,
# valgrind errors
qr/InnoDB: Warning|InnoDB: Error/
,
qr/^safe_mutex:|allocated at line/
,
qr/missing DBUG_RETURN/
,
...
...
@@ -3825,7 +3863,8 @@ sub check_warnings ($) {
else
{
# Unknown process returned, most likley a crash, abort everything
$tinfo
->
{
comment
}
=
"
The server
$proc
crashed while running 'check warnings'
";
"
The server
$proc
crashed while running 'check warnings'
"
.
get_log_from_proc
(
$proc
,
$tinfo
->
{
name
});
$result
=
3
;
}
...
...
@@ -4084,6 +4123,7 @@ sub mysqld_stop {
mtr_init_args
(
\
$args
);
mtr_add_arg
(
$args
,
"
--no-defaults
");
mtr_add_arg
(
$args
,
"
--character-sets-dir=%s
",
$mysqld
->
value
('
character-sets-dir
'));
mtr_add_arg
(
$args
,
"
--user=%s
",
$opt_user
);
mtr_add_arg
(
$args
,
"
--password=
");
mtr_add_arg
(
$args
,
"
--port=%d
",
$mysqld
->
value
('
port
'));
...
...
@@ -4281,7 +4321,8 @@ sub mysqld_start ($$) {
$opt_start_timeout
,
$mysqld
->
{'
proc
'}))
{
mtr_error
("
Failed to start mysqld
$mysqld
->name()
");
my
$mname
=
$mysqld
->
name
();
mtr_error
("
Failed to start mysqld
$mname
with command
$exe
");
}
# Remember options used when starting
...
...
@@ -4292,11 +4333,12 @@ sub mysqld_start ($$) {
sub
stop_all_servers
()
{
my
$shutdown_timeout
=
$_
[
0
]
or
0
;
mtr_verbose
("
Stopping all servers...
");
# Kill all started servers
My::SafeProcess::
shutdown
(
0
,
# shutdown timeout 0 => kill
My::SafeProcess::
shutdown
(
$shutdown_timeout
,
started
(
all_servers
()));
# Remove pidfiles
...
...
@@ -4667,7 +4709,8 @@ sub start_servers($) {
my
$logfile
=
$mysqld
->
value
('
#log-error
');
if
(
defined
$logfile
and
-
f
$logfile
)
{
$tinfo
->
{
logfile
}
=
mtr_fromfile
(
$logfile
);
my
@srv_lines
=
extract_server_log
(
$logfile
,
$tinfo
->
{
name
});
$tinfo
->
{
logfile
}
=
"
Server log is:
\n
"
.
join
("",
@srv_lines
);
}
else
{
...
...
@@ -5084,7 +5127,6 @@ sub valgrind_arguments {
else
{
mtr_add_arg
(
$args
,
"
--tool=memcheck
");
# From >= 2.1.2 needs this option
mtr_add_arg
(
$args
,
"
--alignment=8
");
mtr_add_arg
(
$args
,
"
--leak-check=yes
");
mtr_add_arg
(
$args
,
"
--num-callers=16
");
mtr_add_arg
(
$args
,
"
--suppressions=%s/valgrind.supp
",
$glob_mysql_test_dir
)
...
...
mysql-test/r/mysqltest.result
View file @
88084d67
...
...
@@ -317,6 +317,7 @@ here is the sourced script
outer=2 ifval=0
outer=1 ifval=1
here is the sourced script
ERROR 42S02: Table 'test.nowhere' doesn't exist
In loop
here is the sourced script
...
...
mysql-test/t/mysqltest.test
View file @
88084d67
...
...
@@ -854,6 +854,7 @@ while ($outer)
}
# Test source in an if in a while which is false on 1st iteration
# Also test --error in same context
let
$outer
=
2
;
# Number of outer loops
let
$ifval
=
0
;
# false 1st time
while
(
$outer
)
...
...
@@ -862,6 +863,8 @@ while ($outer)
if
(
$ifval
)
{
--
source
$MYSQLTEST_VARDIR
/
tmp
/
sourced
.
inc
--
error
ER_NO_SUCH_TABLE
SELECT
*
from
nowhere
;
}
dec
$outer
;
inc
$ifval
;
...
...
mysql-test/t/plugin.test
View file @
88084d67
--
source
include
/
not_windows_embedded
.
inc
--
source
include
/
have_example_plugin
.
inc
CREATE
TABLE
t1
(
a
int
)
ENGINE
=
EXAMPLE
;
...
...
mysql-test/t/plugin_load.test
View file @
88084d67
--
source
include
/
not_windows_embedded
.
inc
--
source
include
/
have_example_plugin
.
inc
SELECT
@@
global
.
example_enum_var
=
'e2'
;
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