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
0ea46d9c
Commit
0ea46d9c
authored
18 years ago
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into shellback.(none):/home/msvensson/mysql/mysql-5.1
parents
a4962ed0
a616abb2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
270 additions
and
94 deletions
+270
-94
client/mysqltest.c
client/mysqltest.c
+8
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+261
-94
sql/sql_error.cc
sql/sql_error.cc
+1
-0
No files found.
client/mysqltest.c
View file @
0ea46d9c
...
@@ -654,6 +654,8 @@ static void die(const char *fmt, ...)
...
@@ -654,6 +654,8 @@ static void die(const char *fmt, ...)
{
{
va_list
args
;
va_list
args
;
DBUG_ENTER
(
"die"
);
DBUG_ENTER
(
"die"
);
/* Print the error message */
va_start
(
args
,
fmt
);
va_start
(
args
,
fmt
);
if
(
fmt
)
if
(
fmt
)
{
{
...
@@ -668,6 +670,12 @@ static void die(const char *fmt, ...)
...
@@ -668,6 +670,12 @@ static void die(const char *fmt, ...)
fflush
(
stderr
);
fflush
(
stderr
);
}
}
va_end
(
args
);
va_end
(
args
);
/* Dump the result that has been accumulated so far to reject file */
if
(
result_file
&&
ds_res
.
length
)
dump_result_to_reject_file
(
result_file
,
ds_res
.
str
,
ds_res
.
length
);
/* Clean up and exit */
free_used_memory
();
free_used_memory
();
my_end
(
MY_CHECK_ERROR
);
my_end
(
MY_CHECK_ERROR
);
...
...
This diff is collapsed.
Click to expand it.
mysql-test/mysql-test-run.pl
View file @
0ea46d9c
...
@@ -134,6 +134,7 @@ our $glob_win32= 0; # OS and native Win32 executables
...
@@ -134,6 +134,7 @@ our $glob_win32= 0; # OS and native Win32 executables
our
$glob_win32_perl
=
0
;
# ActiveState Win32 Perl
our
$glob_win32_perl
=
0
;
# ActiveState Win32 Perl
our
$glob_cygwin_perl
=
0
;
# Cygwin Perl
our
$glob_cygwin_perl
=
0
;
# Cygwin Perl
our
$glob_cygwin_shell
=
undef
;
our
$glob_cygwin_shell
=
undef
;
our
$glob_use_libtool
=
1
;
our
$glob_mysql_test_dir
=
undef
;
our
$glob_mysql_test_dir
=
undef
;
our
$glob_mysql_bench_dir
=
undef
;
our
$glob_mysql_bench_dir
=
undef
;
our
$glob_hostname
=
undef
;
our
$glob_hostname
=
undef
;
...
@@ -210,7 +211,6 @@ our $opt_cursor_protocol;
...
@@ -210,7 +211,6 @@ our $opt_cursor_protocol;
our
$opt_view_protocol
;
our
$opt_view_protocol
;
our
$opt_current_test
;
our
$opt_current_test
;
our
$opt_ddd
;
our
$opt_debug
;
our
$opt_debug
;
our
$opt_do_test
;
our
$opt_do_test
;
our
@opt_cases
;
# The test cases names in argv
our
@opt_cases
;
# The test cases names in argv
...
@@ -224,9 +224,14 @@ our $opt_gcov;
...
@@ -224,9 +224,14 @@ our $opt_gcov;
our
$opt_gcov_err
;
our
$opt_gcov_err
;
our
$opt_gcov_msg
;
our
$opt_gcov_msg
;
our
$glob_debugger
=
0
;
our
$opt_gdb
;
our
$opt_gdb
;
our
$opt_client_gdb
;
our
$opt_client_gdb
;
our
$opt_ddd
;
our
$opt_client_ddd
;
our
$opt_manual_gdb
;
our
$opt_manual_gdb
;
our
$opt_manual_ddd
;
our
$opt_manual_debug
;
our
$opt_gprof
;
our
$opt_gprof
;
our
$opt_gprof_dir
;
our
$opt_gprof_dir
;
...
@@ -285,11 +290,12 @@ our $opt_timer;
...
@@ -285,11 +290,12 @@ our $opt_timer;
our
$opt_user
;
our
$opt_user
;
our
$opt_user_test
;
our
$opt_user_test
;
our
$opt_valgrind
;
our
$opt_valgrind
=
0
;
our
$opt_valgrind_mysqld
;
our
$opt_valgrind_mysqld
=
0
;
our
$opt_valgrind_mysqltest
;
our
$opt_valgrind_mysqltest
=
0
;
our
$opt_valgrind_all
;
our
$opt_valgrind_all
=
0
;
our
$opt_valgrind_options
;
our
$opt_valgrind_options
;
our
$opt_valgrind_path
;
our
$opt_stress
=
"";
our
$opt_stress
=
"";
our
$opt_stress_suite
=
"
main
";
our
$opt_stress_suite
=
"
main
";
...
@@ -301,8 +307,6 @@ our $opt_stress_test_duration= 0;
...
@@ -301,8 +307,6 @@ our $opt_stress_test_duration= 0;
our
$opt_stress_init_file
=
"";
our
$opt_stress_init_file
=
"";
our
$opt_stress_test_file
=
"";
our
$opt_stress_test_file
=
"";
our
$opt_verbose
;
our
$opt_wait_for_master
;
our
$opt_wait_for_master
;
our
$opt_wait_for_slave
;
our
$opt_wait_for_slave
;
our
$opt_wait_timeout
=
10
;
our
$opt_wait_timeout
=
10
;
...
@@ -464,6 +468,12 @@ sub initial_setup () {
...
@@ -464,6 +468,12 @@ sub initial_setup () {
$glob_cygwin_perl
=
(
$^O
eq
"
cygwin
");
$glob_cygwin_perl
=
(
$^O
eq
"
cygwin
");
$glob_win32
=
(
$glob_win32_perl
or
$glob_cygwin_perl
);
$glob_win32
=
(
$glob_win32_perl
or
$glob_cygwin_perl
);
# Use libtool on all platforms except windows
if
(
$glob_win32
)
{
$glob_use_libtool
=
0
;
}
# We require that we are in the "mysql-test" directory
# We require that we are in the "mysql-test" directory
# to run mysql-test-run
# to run mysql-test-run
...
@@ -607,9 +617,11 @@ sub command_line_setup () {
...
@@ -607,9 +617,11 @@ sub command_line_setup () {
# Debugging
# Debugging
'
gdb
'
=>
\
$opt_gdb
,
'
gdb
'
=>
\
$opt_gdb
,
'
manual-gdb
'
=>
\
$opt_manual_gdb
,
'
client-gdb
'
=>
\
$opt_client_gdb
,
'
client-gdb
'
=>
\
$opt_client_gdb
,
'
manual-gdb
'
=>
\
$opt_manual_gdb
,
'
manual-debug
'
=>
\
$opt_manual_debug
,
'
ddd
'
=>
\
$opt_ddd
,
'
ddd
'
=>
\
$opt_ddd
,
'
client-ddd
'
=>
\
$opt_client_ddd
,
'
strace-client
'
=>
\
$opt_strace_client
,
'
strace-client
'
=>
\
$opt_strace_client
,
'
master-binary=s
'
=>
\
$exe_master_mysqld
,
'
master-binary=s
'
=>
\
$exe_master_mysqld
,
'
slave-binary=s
'
=>
\
$exe_slave_mysqld
,
'
slave-binary=s
'
=>
\
$exe_slave_mysqld
,
...
@@ -617,10 +629,12 @@ sub command_line_setup () {
...
@@ -617,10 +629,12 @@ sub command_line_setup () {
# Coverage, profiling etc
# Coverage, profiling etc
'
gcov
'
=>
\
$opt_gcov
,
'
gcov
'
=>
\
$opt_gcov
,
'
gprof
'
=>
\
$opt_gprof
,
'
gprof
'
=>
\
$opt_gprof
,
'
valgrind:s
'
=>
\
$opt_valgrind
,
'
valgrind
'
=>
\
$opt_valgrind
,
'
valgrind-mysqltest:s
'
=>
\
$opt_valgrind_mysqltest
,
'
valgrind-mysqltest
'
=>
\
$opt_valgrind_mysqltest
,
'
valgrind-all:s
'
=>
\
$opt_valgrind_all
,
'
valgrind-mysqld
'
=>
\
$opt_valgrind_mysqld
,
'
valgrind-all
'
=>
\
$opt_valgrind_all
,
'
valgrind-options=s
'
=>
\
$opt_valgrind_options
,
'
valgrind-options=s
'
=>
\
$opt_valgrind_options
,
'
valgrind-path=s
'
=>
\
$opt_valgrind_path
,
# Stress testing
# Stress testing
'
stress
'
=>
\
$opt_stress
,
'
stress
'
=>
\
$opt_stress
,
...
@@ -633,6 +647,10 @@ sub command_line_setup () {
...
@@ -633,6 +647,10 @@ sub command_line_setup () {
'
stress-test-count=i
'
=>
\
$opt_stress_test_count
,
'
stress-test-count=i
'
=>
\
$opt_stress_test_count
,
'
stress-test-duration=i
'
=>
\
$opt_stress_test_duration
,
'
stress-test-duration=i
'
=>
\
$opt_stress_test_duration
,
# Directories
'
tmpdir=s
'
=>
\
$opt_tmpdir
,
'
vardir=s
'
=>
\
$opt_vardir
,
# Misc
# Misc
'
big-test
'
=>
\
$opt_big_test
,
'
big-test
'
=>
\
$opt_big_test
,
'
comment=s
'
=>
\
$opt_comment
,
'
comment=s
'
=>
\
$opt_comment
,
...
@@ -651,12 +669,9 @@ sub command_line_setup () {
...
@@ -651,12 +669,9 @@ sub command_line_setup () {
'
start-and-exit
'
=>
\
$opt_start_and_exit
,
'
start-and-exit
'
=>
\
$opt_start_and_exit
,
'
start-from=s
'
=>
\
$opt_start_from
,
'
start-from=s
'
=>
\
$opt_start_from
,
'
timer
'
=>
\
$opt_timer
,
'
timer
'
=>
\
$opt_timer
,
'
tmpdir=s
'
=>
\
$opt_tmpdir
,
'
unified-diff|udiff
'
=>
\
$opt_udiff
,
'
unified-diff|udiff
'
=>
\
$opt_udiff
,
'
user-test=s
'
=>
\
$opt_user_test
,
'
user-test=s
'
=>
\
$opt_user_test
,
'
user=s
'
=>
\
$opt_user
,
'
user=s
'
=>
\
$opt_user
,
'
vardir=s
'
=>
\
$opt_vardir
,
'
verbose
'
=>
\
$opt_verbose
,
'
wait-timeout=i
'
=>
\
$opt_wait_timeout
,
'
wait-timeout=i
'
=>
\
$opt_wait_timeout
,
'
testcase-timeout=i
'
=>
\
$opt_testcase_timeout
,
'
testcase-timeout=i
'
=>
\
$opt_testcase_timeout
,
'
suite-timeout=i
'
=>
\
$opt_suite_timeout
,
'
suite-timeout=i
'
=>
\
$opt_suite_timeout
,
...
@@ -795,48 +810,34 @@ sub command_line_setup () {
...
@@ -795,48 +810,34 @@ sub command_line_setup () {
mtr_error
("
Coverage test needs the source - please use source dist
");
mtr_error
("
Coverage test needs the source - please use source dist
");
}
}
if
(
$opt_gdb
)
# Check debug related options
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_ddd
||
$opt_client_ddd
||
$opt_manual_gdb
||
$opt_manual_ddd
||
$opt_manual_debug
)
{
{
# Indicate that we are using debugger
$glob_debugger
=
1
;
# Increase timeouts
$opt_wait_timeout
=
300
;
$opt_wait_timeout
=
300
;
if
(
$opt_extern
)
if
(
$opt_extern
)
{
{
mtr_error
("
Can't use --extern w
ith --gdb
");
mtr_error
("
Can't use --extern w
hen using debugger
");
}
}
}
}
if
(
$opt_manual_gdb
)
# Turn on valgrinding of all executables if "valgrind" or "valgrind-all"
{
if
(
$opt_valgrind
or
$opt_valgrind_all
)
$opt_gdb
=
1
;
if
(
$opt_extern
)
{
mtr_error
("
Can't use --extern with --manual-gdb
");
}
}
if
(
$opt_ddd
)
{
{
if
(
$opt_extern
)
mtr_report
("
Turning on valgrind for all executables
");
{
$opt_valgrind
=
1
;
mtr_error
("
Can't use --extern with --ddd
");
$opt_valgrind_mysqld
=
1
;
$opt_valgrind_mysqltest
=
1
;
}
}
}
elsif
(
$opt_valgrind_mysqld
or
$opt_valgrind_mysqltest
)
# The ":s" in the argument spec, means we have three different cases
#
# undefined option not set
# "" option set with no argument
# "somestring" option is name/path of valgrind executable
# Take executable path from any of them, if any
$opt_valgrind_mysqld
=
$opt_valgrind
;
$opt_valgrind
=
$opt_valgrind_mysqltest
if
$opt_valgrind_mysqltest
;
$opt_valgrind
=
$opt_valgrind_all
if
$opt_valgrind_all
;
# If valgrind flag not defined, define if other valgrind flags are
unless
(
defined
$opt_valgrind
)
{
{
$opt_valgrind
=
""
# If test's are run for a specific executable, turn on
if
defined
$opt_valgrind_mysqltest
or
defined
$opt_valgrind_all
;
# verbose and show-reachable
$opt_valgrind
=
1
;
$opt_valgrind_all
=
1
;
}
}
if
(
!
$opt_testcase_timeout
)
if
(
!
$opt_testcase_timeout
)
...
@@ -851,12 +852,11 @@ sub command_line_setup () {
...
@@ -851,12 +852,11 @@ sub command_line_setup () {
$opt_suite_timeout
*=
4
if
defined
$opt_valgrind
;
$opt_suite_timeout
*=
4
if
defined
$opt_valgrind
;
}
}
if
(
defined
$opt_valgrind
)
# Increase times to wait for executables to start if using valgrind
if
(
$opt_valgrind
)
{
{
$opt_sleep_time_after_restart
=
10
;
$opt_sleep_time_after_restart
=
10
;
$opt_sleep_time_for_delete
=
60
;
$opt_sleep_time_for_delete
=
60
;
# >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
# valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
}
}
if
(
!
$opt_user
)
if
(
!
$opt_user
)
...
@@ -1059,20 +1059,8 @@ sub executable_setup () {
...
@@ -1059,20 +1059,8 @@ sub executable_setup () {
"
/usr/bin/false
");
"
/usr/bin/false
");
}
}
else
else
{
if
(
$opt_valgrind_mysqltest
)
{
# client/mysqltest might be a libtool .sh script, so look for real exe
# to avoid valgrinding bash ;)
$exe_mysqltest
=
mtr_exe_exists
("
$path_client_bindir
/.libs/lt-mysqltest
",
"
$path_client_bindir
/.libs/mysqltest
",
"
$path_client_bindir
/mysqltest
");
}
else
{
{
$exe_mysqltest
=
mtr_exe_exists
("
$path_client_bindir
/mysqltest
");
$exe_mysqltest
=
mtr_exe_exists
("
$path_client_bindir
/mysqltest
");
}
$exe_mysql_client_test
=
$exe_mysql_client_test
=
mtr_exe_exists
("
$glob_basedir
/tests/mysql_client_test
",
mtr_exe_exists
("
$glob_basedir
/tests/mysql_client_test
",
"
$path_client_bindir
/mysql_client_test
",
"
$path_client_bindir
/mysql_client_test
",
...
@@ -1750,8 +1738,9 @@ sub run_suite () {
...
@@ -1750,8 +1738,9 @@ sub run_suite () {
mtr_print_line
();
mtr_print_line
();
if
(
!
$opt_gdb
and
!
$glob_use_running_server
and
if
(
!
$glob_debugger
and
!
$opt_ddd
and
!
$glob_use_embedded_server
)
!
$glob_use_running_server
and
!
$glob_use_embedded_server
)
{
{
stop_masters_slaves
();
stop_masters_slaves
();
}
}
...
@@ -2411,8 +2400,9 @@ sub report_failure_and_restart ($) {
...
@@ -2411,8 +2400,9 @@ sub report_failure_and_restart ($) {
my
$test_mode
=
join
("
",
@::glob_test_mode
)
||
"
default
";
my
$test_mode
=
join
("
",
@::glob_test_mode
)
||
"
default
";
print
"
Aborting:
$tinfo
->{'name'} failed in
$test_mode
mode.
";
print
"
Aborting:
$tinfo
->{'name'} failed in
$test_mode
mode.
";
print
"
To continue, re-run with '--force'.
\n
";
print
"
To continue, re-run with '--force'.
\n
";
if
(
!
$opt_gdb
and
!
$glob_use_running_server
and
if
(
!
$glob_debugger
and
!
$opt_ddd
and
!
$glob_use_embedded_server
)
!
$glob_use_running_server
and
!
$glob_use_embedded_server
)
{
{
stop_masters_slaves
();
stop_masters_slaves
();
}
}
...
@@ -2540,7 +2530,7 @@ sub mysqld_arguments ($$$$$$) {
...
@@ -2540,7 +2530,7 @@ sub mysqld_arguments ($$$$$$) {
mtr_add_arg
(
$args
,
"
%s--language=%s
",
$prefix
,
$path_language
);
mtr_add_arg
(
$args
,
"
%s--language=%s
",
$prefix
,
$path_language
);
mtr_add_arg
(
$args
,
"
%s--tmpdir=
$opt_tmpdir
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--tmpdir=
$opt_tmpdir
",
$prefix
);
if
(
defined
$opt_valgrind_mysqld
)
if
(
$opt_valgrind_mysqld
)
{
{
mtr_add_arg
(
$args
,
"
%s--skip-safemalloc
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--skip-safemalloc
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--skip-bdb
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--skip-bdb
",
$prefix
);
...
@@ -2692,7 +2682,8 @@ sub mysqld_arguments ($$$$$$) {
...
@@ -2692,7 +2682,8 @@ sub mysqld_arguments ($$$$$$) {
mtr_add_arg
(
$args
,
"
%s--log-warnings
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--log-warnings
",
$prefix
);
}
}
if
(
$opt_gdb
or
$opt_client_gdb
or
$opt_manual_gdb
or
$opt_ddd
)
# Indicate to "mysqld" it will be debugged in debugger
if
(
$glob_debugger
)
{
{
mtr_add_arg
(
$args
,
"
%s--gdb
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--gdb
",
$prefix
);
}
}
...
@@ -2768,7 +2759,7 @@ sub mysqld_start ($$$$$) {
...
@@ -2768,7 +2759,7 @@ sub mysqld_start ($$$$$) {
my
$args
;
# Arg vector
my
$args
;
# Arg vector
my
$exe
;
my
$exe
;
my
$pid
;
my
$pid
=
-
1
;
if
(
$type
eq
'
master
'
)
if
(
$type
eq
'
master
'
)
{
{
...
@@ -2785,7 +2776,7 @@ sub mysqld_start ($$$$$) {
...
@@ -2785,7 +2776,7 @@ sub mysqld_start ($$$$$) {
mtr_init_args
(
\
$args
);
mtr_init_args
(
\
$args
);
if
(
defined
$opt_valgrind_mysqld
)
if
(
$opt_valgrind_mysqld
)
{
{
valgrind_arguments
(
$args
,
\
$exe
);
valgrind_arguments
(
$args
,
\
$exe
);
}
}
...
@@ -2793,29 +2784,53 @@ sub mysqld_start ($$$$$) {
...
@@ -2793,29 +2784,53 @@ sub mysqld_start ($$$$$) {
mysqld_arguments
(
$args
,
$type
,
$idx
,
$extra_opt
,
$slave_master_info
,
mysqld_arguments
(
$args
,
$type
,
$idx
,
$extra_opt
,
$slave_master_info
,
$using_ndbcluster
);
$using_ndbcluster
);
if
(
$opt_gdb
||
$opt_manual_gdb
)
{
gdb_arguments
(
\
$args
,
\
$exe
,
$type
);
}
elsif
(
$opt_ddd
||
$opt_manual_ddd
)
{
ddd_arguments
(
\
$args
,
\
$exe
,
$type
);
}
elsif
(
$opt_manual_debug
)
{
print
"
\n
Start
$type
in your debugger
\n
"
.
"
dir:
$glob_mysql_test_dir
\n
"
.
"
exe:
$exe
\n
"
.
"
args:
"
.
join
("
",
@$args
)
.
"
\n\n
"
.
"
Waiting ....
\n
";
# Indicate the exe should not be started
$exe
=
undef
;
}
if
(
$type
eq
'
master
'
)
if
(
$type
eq
'
master
'
)
{
{
if
(
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
if
(
!
defined
$exe
or
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
$master
->
[
$idx
]
->
{'
path_myerr
'},
$master
->
[
$idx
]
->
{'
path_myerr
'},
$master
->
[
$idx
]
->
{'
path_myerr
'},
$master
->
[
$idx
]
->
{'
path_myerr
'},
"",
"",
{
append_log_file
=>
1
})
)
{
append_log_file
=>
1
})
)
{
{
return
sleep_until_file_created
(
$master
->
[
$idx
]
->
{'
path_mypid
'},
return
sleep_until_file_created
(
$master
->
[
$idx
]
->
{'
path_mypid
'},
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
}
}
}
}
if
(
$type
eq
'
slave
'
)
if
(
$type
eq
'
slave
'
)
{
{
if
(
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
if
(
!
defined
$exe
or
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
$slave
->
[
$idx
]
->
{'
path_myerr
'},
$slave
->
[
$idx
]
->
{'
path_myerr
'},
$slave
->
[
$idx
]
->
{'
path_myerr
'},
$slave
->
[
$idx
]
->
{'
path_myerr
'},
"",
"",
{
append_log_file
=>
1
})
)
{
append_log_file
=>
1
})
)
{
{
return
sleep_until_file_created
(
$slave
->
[
$idx
]
->
{'
path_mypid
'},
return
sleep_until_file_created
(
$slave
->
[
$idx
]
->
{'
path_mypid
'},
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
}
}
}
}
...
@@ -3164,7 +3179,7 @@ sub run_mysqltest ($) {
...
@@ -3164,7 +3179,7 @@ sub run_mysqltest ($) {
mtr_init_args
(
\
$args
);
mtr_init_args
(
\
$args
);
if
(
defined
$opt_valgrind_mysqltest
)
if
(
$opt_valgrind_mysqltest
)
{
{
valgrind_arguments
(
$args
,
\
$exe
);
valgrind_arguments
(
$args
,
\
$exe
);
}
}
...
@@ -3290,7 +3305,10 @@ sub run_mysqltest ($) {
...
@@ -3290,7 +3305,10 @@ sub run_mysqltest ($) {
# Add arguments that should not go into the MYSQL_TEST env var
# Add arguments that should not go into the MYSQL_TEST env var
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
mtr_add_arg
(
$args
,
"
-R
");
mtr_add_arg
(
$args
,
"
--test-file
");
mtr_add_arg
(
$args
,
$tinfo
->
{'
path
'});
mtr_add_arg
(
$args
,
"
--result-file
");
mtr_add_arg
(
$args
,
$tinfo
->
{'
result_file
'});
mtr_add_arg
(
$args
,
$tinfo
->
{'
result_file
'});
if
(
$opt_record
)
if
(
$opt_record
)
...
@@ -3298,21 +3316,162 @@ sub run_mysqltest ($) {
...
@@ -3298,21 +3316,162 @@ sub run_mysqltest ($) {
mtr_add_arg
(
$args
,
"
--record
");
mtr_add_arg
(
$args
,
"
--record
");
}
}
if
(
$opt_client_gdb
)
{
gdb_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
elsif
(
$opt_client_ddd
)
{
ddd_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
if
(
$glob_use_libtool
)
{
# Add "libtool --mode-execute" before the test to execute
unshift
(
@$args
,
"
--mode=execute
",
$exe
);
$exe
=
"
libtool
";
}
if
(
$opt_check_testcases
)
if
(
$opt_check_testcases
)
{
{
run_check_testcase
("
before
");
run_check_testcase
("
before
");
}
}
my
$res
=
mtr_run_test
(
$exe
,
$args
,
$tinfo
->
{'
path
'}
,"",
$path_timefile
,"");
my
$res
=
mtr_run_test
(
$exe
,
$args
,
""
,"",
$path_timefile
,"");
if
(
$opt_check_testcases
)
if
(
$opt_check_testcases
)
{
{
run_check_testcase
("
after
");
run_check_testcase
("
after
");
}
}
return
$res
;
return
$res
;
}
}
#
# Modify the exe and args so that program is run in gdb in xterm
#
sub
gdb_arguments
{
my
$args
=
shift
;
my
$exe
=
shift
;
my
$type
=
shift
;
# Write $args to gdb init file
my
$str
=
join
("
",
@$$args
);
my
$gdb_init_file
=
"
$opt_tmpdir
/gdbinit.
$type
";
if
(
$type
eq
"
client
"
)
{
# write init file for client
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break main
\n
");
}
else
{
# write init file for mysqld
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break mysql_parse
\n
"
.
"
commands 1
\n
"
.
"
disable 1
\n
"
.
"
end
\n
"
.
"
run
");
}
if
(
$opt_manual_gdb
)
{
print
"
\n
To start gdb for
$type
, type in another window:
\n
";
print
"
cd
$glob_mysql_test_dir
;
\n
";
print
"
gdb -x
$gdb_init_file
$
$exe
\n
";
# Indicate the exe should not be started
$$exe
=
undef
;
return
;
}
$$args
=
[]
;
mtr_add_arg
(
$$args
,
"
-title
");
mtr_add_arg
(
$$args
,
"
$type
");
mtr_add_arg
(
$$args
,
"
-e
");
if
(
$glob_use_libtool
)
{
mtr_add_arg
(
$$args
,
"
libtool
");
mtr_add_arg
(
$$args
,
"
--mode=execute
");
}
mtr_add_arg
(
$$args
,
"
gdb
");
mtr_add_arg
(
$$args
,
"
-x
");
mtr_add_arg
(
$$args
,
"
$gdb_init_file
");
mtr_add_arg
(
$$args
,
"
$
$exe
");
$$exe
=
"
xterm
";
}
#
# Modify the exe and args so that program is run in ddd
#
sub
ddd_arguments
{
my
$args
=
shift
;
my
$exe
=
shift
;
my
$type
=
shift
;
# Write $args to ddd init file
my
$str
=
join
("
",
@$$args
);
my
$gdb_init_file
=
"
$opt_tmpdir
/gdbinit.
$type
";
if
(
$type
eq
"
client
"
)
{
# write init file for client
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
break main
\n
");
}
else
{
# write init file for mysqld
mtr_tofile
(
$gdb_init_file
,
"
file $
$exe
\n
"
.
"
set args
$str
\n
"
.
"
break mysql_parse
\n
"
.
"
commands 1
\n
"
.
"
disable 1
\n
"
.
"
end
\n
"
.
"
run
");
}
if
(
$opt_manual_ddd
)
{
print
"
\n
To start ddd for
$type
, type in another window:
\n
";
print
"
cd
$glob_mysql_test_dir
;
\n
";
print
"
ddd -x
$gdb_init_file
$
$exe
\n
";
# Indicate the exe should not be started
$$exe
=
undef
;
return
;
}
my
$save_exe
=
$$exe
;
$$args
=
[]
;
if
(
$glob_use_libtool
)
{
$$exe
=
"
libtool
";
mtr_add_arg
(
$$args
,
"
--mode=execute
");
mtr_add_arg
(
$$args
,
"
ddd
");
}
else
{
$$exe
=
"
ddd
";
}
mtr_add_arg
(
$$args
,
"
--command=
$gdb_init_file
");
mtr_add_arg
(
$$args
,
"
$save_exe
");
}
#
# Modify the exe and args so that program is run in valgrind
#
sub
valgrind_arguments
{
sub
valgrind_arguments
{
my
$args
=
shift
;
my
$args
=
shift
;
my
$exe
=
shift
;
my
$exe
=
shift
;
...
@@ -3324,7 +3483,7 @@ sub valgrind_arguments {
...
@@ -3324,7 +3483,7 @@ sub valgrind_arguments {
mtr_add_arg
(
$args
,
"
--suppressions=%s/valgrind.supp
",
$glob_mysql_test_dir
)
mtr_add_arg
(
$args
,
"
--suppressions=%s/valgrind.supp
",
$glob_mysql_test_dir
)
if
-
f
"
$glob_mysql_test_dir
/valgrind.supp
";
if
-
f
"
$glob_mysql_test_dir
/valgrind.supp
";
if
(
defined
$opt_valgrind_all
)
if
(
$opt_valgrind_all
)
{
{
mtr_add_arg
(
$args
,
"
-v
");
mtr_add_arg
(
$args
,
"
-v
");
mtr_add_arg
(
$args
,
"
--show-reachable=yes
");
mtr_add_arg
(
$args
,
"
--show-reachable=yes
");
...
@@ -3332,14 +3491,13 @@ sub valgrind_arguments {
...
@@ -3332,14 +3491,13 @@ sub valgrind_arguments {
if
(
$opt_valgrind_options
)
if
(
$opt_valgrind_options
)
{
{
# FIXME split earlier and put into @glob_valgrind_*
mtr_add_arg
(
$args
,
split
('
',
$opt_valgrind_options
));
mtr_add_arg
(
$args
,
split
('
',
$opt_valgrind_options
));
}
}
mtr_add_arg
(
$args
,
$$exe
);
mtr_add_arg
(
$args
,
$$exe
);
$$exe
=
$opt_valgrind
||
"
valgrind
";
$$exe
=
$opt_valgrind
_path
||
"
valgrind
";
}
}
...
@@ -3370,6 +3528,13 @@ Options to control what engine/variation to run
...
@@ -3370,6 +3528,13 @@ Options to control what engine/variation to run
bench Run the benchmark suite FIXME
bench Run the benchmark suite FIXME
small-bench FIXME
small-bench FIXME
Options to control directories to use
vardir=DIR The directory where files generated from the test run
is stored(default: ./var). Specifying a ramdisk or tmpfs
will speed up tests.
tmpdir=DIR The directory where temporary files are stored
(default: ./var/tmp).
Options to control what test suites or cases to run
Options to control what test suites or cases to run
force Continue to run the suite after failure
force Continue to run the suite after failure
...
@@ -3407,10 +3572,12 @@ Options to run test on running server
...
@@ -3407,10 +3572,12 @@ Options to run test on running server
Options for debugging the product
Options for debugging the product
gdb FIXME
gdb Start the mysqld(s) in gdb
manual-gdb FIXME
manual-gdb Let user manually start mysqld in gdb, before running test(s)
client-gdb FIXME
manual-debug Let user manually start mysqld in debugger, before running test(s)
ddd FIXME
client-gdb Start mysqltest client in gdb
ddd Start mysqld in ddd
client-ddd Start mysqltest client in ddd
strace-client FIXME
strace-client FIXME
master-binary=PATH Specify the master "mysqld" to use
master-binary=PATH Specify the master "mysqld" to use
slave-binary=PATH Specify the slave "mysqld" to use
slave-binary=PATH Specify the slave "mysqld" to use
...
@@ -3419,16 +3586,17 @@ Options for coverage, profiling etc
...
@@ -3419,16 +3586,17 @@ Options for coverage, profiling etc
gcov FIXME
gcov FIXME
gprof FIXME
gprof FIXME
valgrind[=EXE] Run the "mysqld" server using valgrind, optionally
valgrind Run the "mysqltest" and "mysqld" executables using valgrind
specifying the executable path/name
valgrind-all Same as "valgrind" but will also add "verbose" and "--show-reachable"
valgrind-mysqltest[=EXE] In addition, run the "mysqltest" executable with valgrind
flags to valgrind
valgrind-all[=EXE] Adds verbose flag, and --show-reachable to valgrind
valgrind-mysqltest Run the "mysqltest" executable with valgrind
valgrind-mysqld Run the "mysqld" executable with valgrind
valgrind-options=ARGS Extra options to give valgrind
valgrind-options=ARGS Extra options to give valgrind
valgrind-path=[EXE] Path to the valgrind executable
Misc options
Misc options
comment=STR Write STR to the output
comment=STR Write STR to the output
verbose Verbose output from this script
script-debug Debug this script itself
script-debug Debug this script itself
timer Show test case execution time
timer Show test case execution time
start-and-exit Only initiate and start the "mysqld" servers, use the startup
start-and-exit Only initiate and start the "mysqld" servers, use the startup
...
@@ -3456,7 +3624,6 @@ Options not yet described, or that I want to look into more
...
@@ -3456,7 +3624,6 @@ Options not yet described, or that I want to look into more
old-master
old-master
sleep=SECONDS
sleep=SECONDS
socket=PATH
socket=PATH
tmpdir=DIR
user-test=s
user-test=s
wait-timeout=SECONDS
wait-timeout=SECONDS
warnings
warnings
...
...
This diff is collapsed.
Click to expand it.
sql/sql_error.cc
View file @
0ea46d9c
...
@@ -108,6 +108,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
...
@@ -108,6 +108,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
{
{
MYSQL_ERROR
*
err
=
0
;
MYSQL_ERROR
*
err
=
0
;
DBUG_ENTER
(
"push_warning"
);
DBUG_ENTER
(
"push_warning"
);
DBUG_PRINT
(
"enter"
,
(
"code: %d, msg: %s"
,
code
,
msg
));
if
(
level
==
MYSQL_ERROR
::
WARN_LEVEL_NOTE
&&
if
(
level
==
MYSQL_ERROR
::
WARN_LEVEL_NOTE
&&
!
(
thd
->
options
&
OPTION_SQL_NOTES
))
!
(
thd
->
options
&
OPTION_SQL_NOTES
))
...
...
This diff is collapsed.
Click to expand it.
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