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
f91a5fe5
Commit
f91a5fe5
authored
Feb 22, 2010
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
51e47e13
38e811b8
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
900 additions
and
326 deletions
+900
-326
client/mysqltest.cc
client/mysqltest.cc
+233
-61
cmd-line-utils/readline/rlmbutil.h
cmd-line-utils/readline/rlmbutil.h
+2
-2
cmd-line-utils/readline/text.c
cmd-line-utils/readline/text.c
+1
-1
configure.in
configure.in
+6
-11
extra/yassl/include/yassl_error.hpp
extra/yassl/include/yassl_error.hpp
+1
-1
extra/yassl/src/ssl.cpp
extra/yassl/src/ssl.cpp
+1
-1
extra/yassl/src/yassl_error.cpp
extra/yassl/src/yassl_error.cpp
+1
-1
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+13
-0
mysql-test/lib/My/SafeProcess.pm
mysql-test/lib/My/SafeProcess.pm
+57
-76
mysql-test/lib/My/SafeProcess/safe_process_win.cc
mysql-test/lib/My/SafeProcess/safe_process_win.cc
+14
-8
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+18
-10
mysql-test/lib/mtr_gprof.pl
mysql-test/lib/mtr_gprof.pl
+11
-34
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_misc.pl
+11
-2
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_report.pm
+20
-17
mysql-test/lib/mtr_stress.pl
mysql-test/lib/mtr_stress.pl
+1
-1
mysql-test/lib/v1/mtr_stress.pl
mysql-test/lib/v1/mtr_stress.pl
+1
-1
mysql-test/lib/v1/mysql-test-run.pl
mysql-test/lib/v1/mysql-test-run.pl
+5
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+230
-83
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+69
-5
mysql-test/r/variables_community.result
mysql-test/r/variables_community.result
+0
-0
mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
+1
-0
mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test
...-test/suite/sys_vars/t/sql_low_priority_updates_func.test
+1
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+197
-3
mysql-test/t/partition_innodb_semi_consistent.test
mysql-test/t/partition_innodb_semi_consistent.test
+1
-0
mysql-test/t/variables_community.test
mysql-test/t/variables_community.test
+0
-0
scripts/mysql_install_db.sh
scripts/mysql_install_db.sh
+1
-5
sql/log_event.cc
sql/log_event.cc
+1
-1
sql/log_event_old.cc
sql/log_event_old.cc
+1
-1
sql/sql_update.cc
sql/sql_update.cc
+2
-1
No files found.
client/mysqltest.cc
View file @
f91a5fe5
This diff is collapsed.
Click to expand it.
cmd-line-utils/readline/rlmbutil.h
View file @
f91a5fe5
...
...
@@ -109,8 +109,8 @@ extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
extern
wchar_t
_rl_char_value
PARAMS
((
char
*
,
int
));
extern
int
_rl_walphabetic
PARAMS
((
wchar_t
));
#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
#define _rl_to_wupper(wc) (iswlower (wc) ?
(wchar_t)
towupper (wc) : (wc))
#define _rl_to_wlower(wc) (iswupper (wc) ?
(wchar_t)
towlower (wc) : (wc))
#define MB_NEXTCHAR(b,s,c,f) \
((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
...
...
cmd-line-utils/readline/text.c
View file @
f91a5fe5
...
...
@@ -614,7 +614,7 @@ rl_arrow_keys (count, c)
#ifdef HANDLE_MULTIBYTE
static
char
pending_bytes
[
MB_LEN_MAX
];
static
int
pending_bytes_length
=
0
;
static
mbstate_t
ps
=
{
0
}
;
static
mbstate_t
ps
;
#endif
/* Insert the character C at the current location, moving point forward.
...
...
configure.in
View file @
f91a5fe5
...
...
@@ -2911,17 +2911,12 @@ AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' C
AC_OUTPUT
echo
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
echo "latest release, upcoming features, and other information to make your"
echo "work or play with MySQL more productive. There you can also find"
echo "information about mailing lists for MySQL discussion."
echo
echo "Remember to check the platform specific part of the reference manual for"
echo "hints about installing MySQL on your platform. Also have a look at the"
echo "files in the Docs directory."
echo
# The following text is checked in ./Do-compile to verify that configure
# The first line "Thank you ..." is checked in ./Do-compile to verify that configure
# ended sucessfully - don'
t remove it.
echo
echo
"Thank you for choosing MySQL!"
echo
echo
"Remember to check the platform specific part of the reference manual"
echo
"for hints about installing MySQL on your platform."
echo
"Also have a look at the files in the Docs directory."
echo
extra/yassl/include/yassl_error.hpp
View file @
f91a5fe5
...
...
@@ -64,7 +64,7 @@ enum YasslError {
enum
Library
{
yaSSL_Lib
=
0
,
CryptoLib
,
SocketLib
};
enum
{
MAX_ERROR_SZ
=
80
};
void
SetErrorString
(
YasslError
,
char
*
);
void
SetErrorString
(
unsigned
long
,
char
*
);
/* remove for now, if go back to exceptions use this wrapper
// Base class for all yaSSL exceptions
...
...
extra/yassl/src/ssl.cpp
View file @
f91a5fe5
...
...
@@ -991,7 +991,7 @@ char* ERR_error_string(unsigned long errNumber, char* buffer)
static
char
*
msg
=
(
char
*
)
"Please supply a buffer for error string"
;
if
(
buffer
)
{
SetErrorString
(
YasslError
(
errNumber
)
,
buffer
);
SetErrorString
(
errNumber
,
buffer
);
return
buffer
;
}
...
...
extra/yassl/src/yassl_error.cpp
View file @
f91a5fe5
...
...
@@ -55,7 +55,7 @@ Library Error::get_lib() const
*/
void
SetErrorString
(
YasslError
error
,
char
*
buffer
)
void
SetErrorString
(
unsigned
long
error
,
char
*
buffer
)
{
using
namespace
TaoCrypt
;
const
int
max
=
MAX_ERROR_SZ
;
// shorthand
...
...
mysql-test/include/mtr_warnings.sql
View file @
f91a5fe5
...
...
@@ -175,6 +175,19 @@ INSERT INTO global_suppressions VALUES
(
"Can't find file: '.
\\\\
test
\\\\\\
?{8}.frm'"
),
(
"Slave: Unknown table 't1' Error_code: 1051"
),
/* Messages from valgrind */
(
"==[0-9]*== Memcheck,"
),
(
"==[0-9]*== Copyright"
),
(
"==[0-9]*== Using"
),
(
"==[0-9]*== For more details"
),
/* This comes with innodb plugin tests */
(
"==[0-9]*== Warning: set address range perms: large range"
),
/* valgrind warnings: invalid file descriptor -1 in syscall
write()/read(). Bug #50414 */
(
"==[0-9]*== Warning: invalid file descriptor -1 in syscall write()"
),
(
"==[0-9]*== Warning: invalid file descriptor -1 in syscall read()"
),
/*
Transient network failures that cause warnings on reconnect.
BUG#47743 and BUG#47983.
...
...
mysql-test/lib/My/SafeProcess.pm
View file @
f91a5fe5
...
...
@@ -81,24 +81,28 @@ sub is_child {
}
# Find the safe process binary or script
my
@safe_process_cmd
;
my
$safe_kill
;
if
(
IS_WIN32PERL
or
IS_CYGWIN
){
# Use my_safe_process.exe
my
$exe
=
my_find_bin
("
.
",
["
lib/My/SafeProcess
",
"
My/SafeProcess
"],
"
my_safe_process
");
push
(
@safe_process_cmd
,
$exe
);
# Use my_safe_kill.exe
$safe_kill
=
my_find_bin
("
.
",
"
lib/My/SafeProcess
",
"
my_safe_kill
");
}
else
{
# Use my_safe_process
my
$exe
=
my_find_bin
("
.
",
["
lib/My/SafeProcess
",
"
My/SafeProcess
"],
"
my_safe_process
");
push
(
@safe_process_cmd
,
$exe
);
# Find the safe process binary or script
sub
find_bin
{
if
(
IS_WIN32PERL
or
IS_CYGWIN
)
{
# Use my_safe_process.exe
my
$exe
=
my_find_bin
("
.
",
["
lib/My/SafeProcess
",
"
My/SafeProcess
"],
"
my_safe_process
");
push
(
@safe_process_cmd
,
$exe
);
# Use my_safe_kill.exe
$safe_kill
=
my_find_bin
("
.
",
"
lib/My/SafeProcess
",
"
my_safe_kill
");
}
else
{
# Use my_safe_process
my
$exe
=
my_find_bin
("
.
",
["
lib/My/SafeProcess
",
"
My/SafeProcess
"],
"
my_safe_process
");
push
(
@safe_process_cmd
,
$exe
);
}
}
...
...
@@ -183,63 +187,6 @@ sub run {
return
$proc
->
exit_status
();
}
#
# Start a process that returns after "duration" seconds
# or when it's parent process does not exist anymore
#
sub
timer
{
my
$class
=
shift
;
my
$duration
=
shift
or
croak
"
duration required
";
my
$parent_pid
=
$$
;
my
$pid
=
My::SafeProcess::Base::
_safe_fork
();
if
(
$pid
){
# Parent
my
$proc
=
bless
({
SAFE_PID
=>
$pid
,
SAFE_NAME
=>
"
timer
",
PARENT
=>
$$
,
},
$class
);
# Put the new process in list of running
$running
{
$pid
}
=
$proc
;
return
$proc
;
}
# Child, install signal handlers and sleep for "duration"
$SIG
{
INT
}
=
'
IGNORE
';
$SIG
{
TERM
}
=
sub
{
#print STDERR "timer $$: woken up, exiting!\n";
exit
(
0
);
};
$0
=
"
safe_timer(
$duration
)
";
if
(
IS_WIN32PERL
){
# Just a thread in same process
sleep
(
$duration
);
print
STDERR
"
timer $$: expired after
$duration
seconds
\n
";
exit
(
0
);
}
my
$count_down
=
$duration
;
while
(
$count_down
--
){
# Check that parent is still alive
if
(
kill
(
0
,
$parent_pid
)
==
0
){
#print STDERR "timer $$: parent gone, exiting!\n";
exit
(
0
);
}
sleep
(
1
);
}
print
STDERR
"
timer $$: expired after
$duration
seconds
\n
";
exit
(
0
);
}
#
# Shutdown process nicely, and wait for shutdown_timeout seconds
# If processes hasn't shutdown, kill them hard and wait for return
...
...
@@ -338,12 +285,12 @@ sub start_kill {
$ret
=
system
(
$safe_kill
,
$winpid
)
>>
8
;
if
(
$ret
==
3
){
print
"
Couldn't open the winpid:
$winpid
"
,
print
"
Couldn't open the winpid:
$winpid
"
.
"
for pid:
$pid
, try one more time
\n
";
sleep
(
1
);
$winpid
=
_winpid
(
$pid
);
$ret
=
system
(
$safe_kill
,
$winpid
)
>>
8
;
print
"
Couldn't open the winpid:
$winpid
"
,
print
"
Couldn't open the winpid:
$winpid
"
.
"
for pid:
$pid
, continue and see what happens...
\n
";
}
}
...
...
@@ -537,6 +484,40 @@ sub wait_any {
}
#
# Wait for any process to exit, or a timeout
#
# Returns a reference to the SafeProcess that
# exited or a pseudo-process with $proc->{timeout} == 1
#
sub
wait_any_timeout
{
my
$class
=
shift
;
my
$timeout
=
shift
;
my
$proc
;
my
$millis
=
10
;
do
{
::
mtr_milli_sleep
(
$millis
);
# Slowly increse interval up to max. 1 second
$millis
++
if
$millis
<
1000
;
# Return a "fake" process for timeout
if
(
::
has_expired
(
$timeout
))
{
$proc
=
bless
({
SAFE_PID
=>
0
,
SAFE_NAME
=>
"
timer
",
timeout
=>
1
,
},
$class
);
}
else
{
$proc
=
check_any
();
}
}
while
(
!
$proc
);
return
$proc
;
}
#
# Wait for all processes to exit
#
...
...
@@ -594,7 +575,7 @@ sub self2str {
sub
_verbose
{
return
unless
$_verbose
;
print
STDERR
"
##
"
,
@_
,
"
\n
";
print
STDERR
"
##
"
.
@_
.
"
\n
";
}
...
...
mysql-test/lib/My/SafeProcess/safe_process_win.cc
View file @
f91a5fe5
...
...
@@ -186,14 +186,20 @@ int main(int argc, const char** argv )
die
(
"No real args -> nothing to do"
);
/* Copy the remaining args to child_arg */
for
(
int
j
=
i
+
1
;
j
<
argc
;
j
++
)
{
if
(
strchr
(
argv
[
j
],
' '
))
{
/* Protect with "" if this arg contains a space */
to
+=
_snprintf
(
to
,
child_args
+
sizeof
(
child_args
)
-
to
,
"
\"
%s
\"
"
,
argv
[
j
]);
}
else
{
to
+=
_snprintf
(
to
,
child_args
+
sizeof
(
child_args
)
-
to
,
"%s "
,
argv
[
j
]);
}
arg
=
argv
[
j
];
if
(
strchr
(
arg
,
' '
)
&&
arg
[
0
]
!=
'\"'
&&
arg
[
strlen
(
arg
)]
!=
'\"'
)
{
/* Quote arg that contains spaces and are not quoted already */
to
+=
_snprintf
(
to
,
child_args
+
sizeof
(
child_args
)
-
to
,
"
\"
%s
\"
"
,
arg
);
}
else
{
to
+=
_snprintf
(
to
,
child_args
+
sizeof
(
child_args
)
-
to
,
"%s "
,
arg
);
}
}
break
;
}
else
{
...
...
mysql-test/lib/mtr_cases.pm
View file @
f91a5fe5
...
...
@@ -40,7 +40,6 @@ our $default_storage_engine;
our
$opt_with_ndbcluster_only
;
our
$defaults_file
;
our
$defaults_extra_file
;
our
$reorder
=
1
;
our
$quick_collect
;
sub
collect_option
{
...
...
@@ -99,7 +98,8 @@ sub init_pattern {
#
##############################################################################
sub
collect_test_cases
($$)
{
sub
collect_test_cases
($$$)
{
my
$opt_reorder
=
shift
;
# True if we're reordering tests
my
$suites
=
shift
;
# Semicolon separated list of test suites
my
$opt_cases
=
shift
;
my
$cases
=
[]
;
# Array of hash(one hash for each testcase)
...
...
@@ -118,10 +118,16 @@ sub collect_test_cases ($$) {
!
(
IS_WINDOWS
&&
$::opt_embedded_server
)
&&
$lib_innodb_plugin
);
foreach
my
$suite
(
split
("
,
",
$suites
))
# If not reordering, we also shouldn't group by suites, unless
# no test cases were named.
# This also effects some logic in the loop following this.
if
(
$opt_reorder
or
!
@$opt_cases
)
{
push
(
@$cases
,
collect_one_suite
(
$suite
,
$opt_cases
));
last
if
$some_test_found
;
foreach
my
$suite
(
split
("
,
",
$suites
))
{
push
(
@$cases
,
collect_one_suite
(
$suite
,
$opt_cases
));
last
if
$some_test_found
;
}
}
if
(
@$opt_cases
)
...
...
@@ -135,6 +141,7 @@ sub collect_test_cases ($$) {
my
(
$sname
,
$tname
,
$extension
)
=
split_testname
(
$test_name_spec
);
foreach
my
$test
(
@$cases
)
{
last
unless
$opt_reorder
;
# test->{name} is always in suite.name format
if
(
$test
->
{
name
}
=~
/.*\.$tname/
)
{
...
...
@@ -144,12 +151,13 @@ sub collect_test_cases ($$) {
}
if
(
not
$found
)
{
$sname
=
"
main
"
if
!
$opt_reorder
and
!
$sname
;
mtr_error
("
Could not find '
$tname
' in '
$suites
' suite(s)
")
unless
$sname
;
# If suite was part of name, find it there
my
(
$this_case
)
=
collect_one_suite
(
$sname
,
[
$tname
]);
if
(
$
this_case
)
# If suite was part of name, find it there
, may come with combinations
my
@this_case
=
collect_one_suite
(
$sname
,
[
$tname
]);
if
(
@
this_case
)
{
push
(
@$cases
,
$
this_case
);
push
(
@$cases
,
@
this_case
);
}
else
{
...
...
@@ -159,7 +167,7 @@ sub collect_test_cases ($$) {
}
}
if
(
$reorder
&&
!
$quick_collect
)
if
(
$
opt_
reorder
&&
!
$quick_collect
)
{
# Reorder the test cases in an order that will make them faster to run
my
%
sort_criteria
;
...
...
mysql-test/lib/mtr_gprof.pl
View file @
f91a5fe5
...
...
@@ -20,43 +20,20 @@
use
strict
;
# These are not to be prefixed with "mtr_"
sub
gprof_collect
($@)
{
my
(
$exe_mysqld
,
@gprof_dirs
)
=
@_
;
sub
gprof_prepare
();
sub
gprof_collect
();
print
("
Collecting gprof reports.....
\n
");
##############################################################################
#
#
#
##############################################################################
sub
gprof_prepare
()
{
rmtree
(
$::opt_gprof_dir
);
mkdir
(
$::opt_gprof_dir
);
}
# FIXME what about master1 and slave1?!
sub
gprof_collect
()
{
if
(
-
f
"
$::master->[0]->{'path_myddir'}/gmon.out
"
)
{
# FIXME check result code?!
mtr_run
("
gprof
",
[
$::exe_master_mysqld
,
"
$::master->[0]->{'path_myddir'}/gmon.out
"],
$::opt_gprof_master
,
"",
"",
"");
print
"
Master execution profile has been saved in $::opt_gprof_master
\n
";
}
if
(
-
f
"
$::slave->[0]->{'path_myddir'}/gmon.out
"
)
foreach
my
$datadir
(
@gprof_dirs
)
{
# FIXME check result code?!
mtr_run
("
gprof
",
[
$::exe_slave_mysqld
,
"
$::slave->[0]->{'path_myddir'}/gmon.out
"],
$::opt_gprof_slave
,
"",
"",
"");
print
"
Slave execution profile has been saved in $::opt_gprof_slave
\n
";
my
$gprof_msg
=
"
$datadir
/gprof.msg
";
my
$gprof_err
=
"
$datadir
/gprof.err
";
if
(
-
f
"
$datadir
/gmon.out
"
)
{
system
("
gprof
$exe_mysqld
$datadir
/gmon.out 2>
$gprof_err
>
$gprof_msg
");
print
("
GPROF output in
$gprof_msg
, errors in
$gprof_err
\n
");
}
}
}
...
...
mysql-test/lib/mtr_misc.pl
View file @
f91a5fe5
...
...
@@ -30,7 +30,9 @@ sub mtr_script_exists(@);
sub
mtr_file_exists
(@);
sub
mtr_exe_exists
(@);
sub
mtr_exe_maybe_exists
(@);
sub
mtr_milli_sleep
($);
sub
start_timer
($);
sub
has_expired
($);
##############################################################################
#
...
...
@@ -167,11 +169,18 @@ sub mtr_exe_exists (@) {
}
sub
mtr_milli_sleep
{
sub
mtr_milli_sleep
($)
{
die
"
usage: mtr_milli_sleep(milliseconds)
"
unless
@_
==
1
;
my
(
$millis
)
=
@_
;
select
(
undef
,
undef
,
undef
,
(
$millis
/
1000
));
}
# Simple functions to start and check timers (have to be actively polled)
# Timer can be "killed" by setting it to 0
sub
start_timer
($)
{
return
time
+
$_
[
0
];
}
sub
has_expired
($)
{
return
$_
[
0
]
&&
time
gt
$_
[
0
];
}
1
;
mysql-test/lib/mtr_report.pm
View file @
f91a5fe5
...
...
@@ -69,7 +69,7 @@ sub _mtr_report_test_name ($) {
$tname
.=
"
'
$tinfo
->{combination}'
"
if
defined
$tinfo
->
{
combination
};
print
_name
()
,
_timestamp
();
print
_name
()
.
_timestamp
();
printf
"
%-40s
",
$tname
;
my
$worker
=
$tinfo
->
{
worker
};
printf
"
w
$worker
"
if
$worker
;
...
...
@@ -222,8 +222,8 @@ sub mtr_report_test ($) {
}
sub
mtr_report_stats
($;$) {
my
(
$tests
,
$dont_error
)
=
@_
;
sub
mtr_report_stats
($
$
;$) {
my
(
$
prefix
,
$
tests
,
$dont_error
)
=
@_
;
# ----------------------------------------------------------------------
# Find out how we where doing
...
...
@@ -328,6 +328,9 @@ sub mtr_report_stats ($;$) {
}
}
# Print summary line prefix
print
"
$prefix
:
";
# Print a list of testcases that failed
if
(
$tot_failed
!=
0
)
{
...
...
@@ -387,13 +390,13 @@ sub mtr_report_stats ($;$) {
##############################################################################
sub
mtr_print_line
()
{
print
'
-
'
x
60
,
"
\n
";
print
'
-
'
x
60
.
"
\n
";
}
sub
mtr_print_thick_line
{
my
$char
=
shift
||
'
=
';
print
$char
x
78
,
"
\n
";
print
$char
x
78
.
"
\n
";
}
...
...
@@ -451,7 +454,7 @@ sub _timestamp {
# Always print message to screen
sub
mtr_print
(@)
{
print
_name
()
,
join
("
",
@_
),
"
\n
";
print
_name
()
.
join
("
",
@_
)
.
"
\n
";
}
...
...
@@ -459,22 +462,22 @@ sub mtr_print (@) {
sub
mtr_report
(@)
{
if
(
defined
$verbose
)
{
print
_name
()
,
join
("
",
@_
),
"
\n
";
print
_name
()
.
join
("
",
@_
)
.
"
\n
";
}
}
# Print warning to screen
sub
mtr_warning
(@)
{
print
STDERR
_name
()
,
_timestamp
(),
"
mysql-test-run: WARNING:
"
,
join
("
",
@_
),
"
\n
";
print
STDERR
_name
()
.
_timestamp
()
.
"
mysql-test-run: WARNING:
"
.
join
("
",
@_
)
.
"
\n
";
}
# Print error to screen and then exit
sub
mtr_error
(@)
{
print
STDERR
_name
()
,
_timestamp
(),
"
mysql-test-run: *** ERROR:
"
,
join
("
",
@_
),
"
\n
";
print
STDERR
_name
()
.
_timestamp
()
.
"
mysql-test-run: *** ERROR:
"
.
join
("
",
@_
)
.
"
\n
";
if
(
IS_WINDOWS
)
{
POSIX::
_exit
(
1
);
...
...
@@ -489,8 +492,8 @@ sub mtr_error (@) {
sub
mtr_debug
(@)
{
if
(
$verbose
>
2
)
{
print
STDERR
_name
()
,
_timestamp
()
,
"
####:
",
join
("
",
@_
),
"
\n
";
print
STDERR
_name
()
.
_timestamp
()
.
"
####:
"
.
join
("
",
@_
)
.
"
\n
";
}
}
...
...
@@ -498,8 +501,8 @@ sub mtr_debug (@) {
sub
mtr_verbose
(@)
{
if
(
$verbose
)
{
print
STDERR
_name
()
,
_timestamp
(),
"
>
"
,
join
("
",
@_
),
"
\n
";
print
STDERR
_name
()
.
_timestamp
()
.
"
>
"
.
join
("
",
@_
)
.
"
\n
";
}
}
...
...
@@ -509,8 +512,8 @@ sub mtr_verbose_restart (@) {
my
$proc
=
$server
->
{
proc
};
if
(
$verbose_restart
)
{
print
STDERR
_name
()
,
_timestamp
(),
"
> Restart
$proc
-
"
,
join
("
",
@args
),
"
\n
";
print
STDERR
_name
()
.
_timestamp
()
.
"
> Restart
$proc
-
"
.
join
("
",
@args
)
.
"
\n
";
}
}
...
...
mysql-test/lib/mtr_stress.pl
View file @
f91a5fe5
...
...
@@ -150,7 +150,7 @@ sub run_stress_test ()
mtr_add_arg
(
$args
,
"
--verbose
");
mtr_add_arg
(
$args
,
"
--cleanup
");
mtr_add_arg
(
$args
,
"
--log-error-details
");
mtr_add_arg
(
$args
,
"
--abort-on-error
");
mtr_add_arg
(
$args
,
"
--abort-on-error
=1
");
if
(
$::opt_stress_init_file
)
{
...
...
mysql-test/lib/v1/mtr_stress.pl
View file @
f91a5fe5
...
...
@@ -150,7 +150,7 @@ sub run_stress_test ()
mtr_add_arg
(
$args
,
"
--verbose
");
mtr_add_arg
(
$args
,
"
--cleanup
");
mtr_add_arg
(
$args
,
"
--log-error-details
");
mtr_add_arg
(
$args
,
"
--abort-on-error
");
mtr_add_arg
(
$args
,
"
--abort-on-error
=1
");
if
(
$::opt_stress_init_file
)
{
...
...
mysql-test/lib/v1/mysql-test-run.pl
View file @
f91a5fe5
...
...
@@ -905,6 +905,11 @@ sub command_line_setup () {
mtr_report
("
Using default engine '
$used_default_engine
'
")
if
defined
$used_default_engine
;
if
(
$glob_win32
and
defined
$opt_mem
)
{
mtr_report
("
--mem not supported on Windows, ignored
");
$opt_mem
=
undef
;
}
# --------------------------------------------------------------------------
# Check if we should speed up tests by trying to run on tmpfs
# --------------------------------------------------------------------------
...
...
mysql-test/mysql-test-run.pl
View file @
f91a5fe5
This diff is collapsed.
Click to expand it.
mysql-test/r/mysqltest.result
View file @
f91a5fe5
...
...
@@ -147,9 +147,10 @@ hello
hello
;;;;;;;;
# MySQL: -- The
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Extra argument '6' passed to 'sleep'
mysqltest: At line 1: Extra argument '6' passed to 'sleep'
mysqltest: At line 1: Extra argument 'A comment
show status' passed to 'sleep'
mysqltest: At line 1: End of line junk detected: "sleep 7
# Another comment
"
...
...
@@ -216,6 +217,12 @@ source database
echo message echo message
mysqltest: At line 1: Missing argument in exec
1
1
2
2
X
3
MySQL
"MySQL"
MySQL: The
...
...
@@ -348,8 +355,10 @@ here is the sourced script
here is the sourced script
"hello"
"hello"
mysqltest: At line 1: Missing argument to sleep
mysqltest: At line 1: Missing argument to real_sleep
mysqltest: At line 2: Invalid argument to sleep "xyz"
mysqltest: At line 2: Invalid argument to real_sleep "xyz"
mysqltest: At line 1: Missing required argument 'sleep_delay' to command 'sleep'
mysqltest: At line 1: Missing required argument 'sleep_delay' to command 'real_sleep'
mysqltest: At line 1: Invalid argument to sleep "abc"
mysqltest: At line 1: Invalid argument to real_sleep "abc"
1
...
...
@@ -377,6 +386,10 @@ test
test2
test3
test4
outer
true-inner
true-inner again
true-outer
Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0)
1
...
...
@@ -417,6 +430,9 @@ mysqltest: At line 1: Wrong number of arguments to replace_column in 'replace_co
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a b'
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a 1'
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 b c '
select "LONG_STRING" as x;
x
LONG_STRING
mysqltest: At line 1: Invalid integer argument "10!"
mysqltest: At line 1: Invalid integer argument "a"
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
...
...
@@ -523,7 +539,28 @@ a D
1 1
1 4
drop table t1;
create table t1 ( f1 char(10));
insert into t1 values ("Abcd");
select * from t1;
f1
Abcd
select * from t2;;
ERROR 42S02: Table 'test.t2' doesn't exist
select * from t1;
f1
Abcd
select * from t1;;
Result coming up
f1
Abcd
select * from t1;;
f1
Abcd
mysqltest: At line 2: Cannot run query on connection between send and reap
select * from t1;;
drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'directory' to command 'remove_files_wildcard'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
Content for test_file1
...
...
@@ -553,6 +590,8 @@ hello
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
val is 5
val is 5
mysqltest: At line 1: test of die
Some output
create table t1( a int, b char(255), c timestamp);
...
...
@@ -680,6 +719,29 @@ INSERT INTO t1 SELECT f1 - 256 FROM t1;
INSERT INTO t1 SELECT f1 - 512 FROM t1;
SELECT * FROM t1;
DROP TABLE t1;
select "500g blåbærsyltetøy" as "will be lower cased";
will be lower cased
500g blåbærsyltetøy
SELECT "UPPER" AS "WILL NOT BE lower cased";
WILL NOT BE lower cased
UPPER
UP
SELECT 0 as "UP AGAIN";
UP AGAIN
0
select "abcdef" as "uvwxyz";
uvwxyz
abcdef
select "xyz" as name union select "abc" as name order by name desc;
name
abc
xyz
select 1 as "some new text";
some new text
1
select 0 as "will not lower case ÄËÐ";
will not lower case ÄËÐ
0
CREATE TABLE t1(
a int, b varchar(255), c datetime
);
...
...
@@ -726,6 +788,8 @@ mysqltest: At line 1: change user failed: Access denied for user 'root'@'localho
file1.txt
file1.txt
file2.txt
file11.txt
dir-list.txt
SELECT 'c:\\a.txt' AS col;
col
z
...
...
mysql-test/r/variables
+c
.result
→
mysql-test/r/variables
_community
.result
View file @
f91a5fe5
File moved
mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
View file @
f91a5fe5
...
...
@@ -78,6 +78,7 @@ COMMIT;
--
echo
'CONNECTION con2'
CONNECTION
con2
;
reap
;
UNLOCK
tables
;
DROP
TABLE
t1
;
...
...
mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test
View file @
f91a5fe5
...
...
@@ -127,6 +127,7 @@ connection con0;
SET
SESSION
low_priority_updates
=
OFF
;
--
echo
**
Connection
con1
**
connection
con1
;
reap
;
SET
SESSION
low_priority_updates
=
OFF
;
--
echo
**
Connection
default
**
connection
default
;
...
...
mysql-test/t/mysqltest.test
View file @
f91a5fe5
...
...
@@ -605,6 +605,15 @@ echo ;
--
error
1
--
exec
echo
"--exec "
|
$MYSQL_TEST
2
>&
1
# Multi-line exec
exec
$MYSQL
test
-
e
"select 1"
;
exec
$MYSQL
test
-
e
"select
2"
;
let
$query
=
select
3
as
X
;
exec
$MYSQL
test
-
e
"
$query
"
;
# ----------------------------------------------------------------------------
# Test let command
# ----------------------------------------------------------------------------
...
...
@@ -911,6 +920,28 @@ sleep 0.5;
sleep
1
;
real_sleep
1
;
# Parameter from variable, legal and illegal
let
$sleep_var
=
0.1
;
sleep
$sleep_var
;
let
$sleep_var
=
1
;
--
real_sleep
$sleep_var
--
write_file
$MYSQL_TMP_DIR
/
sleep
.
inc
let
$sleep_var
=
xyz
;
--
sleep
$sleep_var
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQL_TMP_DIR
/
sleep
.
inc
2
>&
1
--
remove_file
$MYSQL_TMP_DIR
/
sleep
.
inc
--
write_file
$MYSQL_TMP_DIR
/
sleep
.
inc
let
$sleep_var
=
xyz
;
real_sleep
$sleep_var
;
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQL_TMP_DIR
/
sleep
.
inc
2
>&
1
--
remove_file
$MYSQL_TMP_DIR
/
sleep
.
inc
# Missing parameter
--
error
1
--
exec
echo
"sleep ;"
|
$MYSQL_TEST
2
>&
1
...
...
@@ -1006,6 +1037,37 @@ echo test3stop
--
delimiter
;
echo
test4
;
# ----------------------------------------------------------------------------
# Test that delimiter within if() works in in various combinations
# ----------------------------------------------------------------------------
if
(
0
)
{
delimiter
||
;
echo
false
-
inner
||
if
(
0
)
{
delimiter
*||
echo
false
-
innerer
*
delimiter
||*
}
echo
false
-
inner
again
||
}
echo
outer
;
if
(
1
)
{
delimiter
/
;
echo
true
-
inner
/
if
(
0
)
{
delimiter
%/
echo
true
-
innerer
%
}
echo
true
-
inner
again
/
}
echo
true
-
outer
/
delimiter
;
/
# ----------------------------------------------------------------------------
# Test if
...
...
@@ -1285,6 +1347,17 @@ select "a" as col1, "c" as col2;
--
error
1
--
exec
echo
"--replace_column 1 b c "
|
$MYSQL_TEST
2
>&
1
let
$long_rep
=
1234567890123456789012345678901234567890
;
let
$long_rep
=
$long_rep
,
$long_rep
;
let
$long_rep
=
$long_rep
,
$long_rep
;
let
$long_rep
=
$long_rep
,
$long_rep
;
let
$long_rep
=
$long_rep
,
$long_rep
;
let
$long_rep
=
$long_rep
,
$long_rep
;
# This tests from strings > 1024 (here 1311)
--
replace_result
$long_rep
LONG_STRING
eval
select
"
$long_rep
"
as
x
;
# ----------------------------------------------------------------------------
# Test sync_with_master
...
...
@@ -1605,6 +1678,57 @@ insert into t1 values (2,4);
select
*
from
t1
;
drop
table
t1
;
# ----------------------------------------------------------------------------
# Tests of send
# ----------------------------------------------------------------------------
create
table
t1
(
f1
char
(
10
));
insert
into
t1
values
(
"Abcd"
);
# 1. Basic test
send
select
*
from
t1
;
reap
;
# 2. Test with error
--
send
select
*
from
t2
;
--
error
ER_NO_SUCH_TABLE
--
reap
# 3. test send of next stmt
--
send
select
*
from
t1
;
--
reap
# 4. Non-query stmt betwen send and reap allowed
--
send
select
*
from
t1
;
--
sleep
0.05
--
echo
Result
coming
up
--
reap
# 5. Test of send_eval
--
let
$my_stmt
=
select
*
from
t1
;
--
send_eval
$my_stmt
--
reap
# 6. Test that mysqltest does not allow query stmt between send and reap
# Untestable directly as it causes mysqltest to fail
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
in
--
send
select
*
from
t1
;
select
1
;
--
reap
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
in
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
in
;
drop
table
t1
;
# ----------------------------------------------------------------------------
# test for remove_file
# ----------------------------------------------------------------------------
...
...
@@ -1615,6 +1739,19 @@ drop table t1;
--
error
1
remove_file
non_existing_file
;
# ----------------------------------------------------------------------------
# test for remove_files_wildcard
# ----------------------------------------------------------------------------
--
error
1
--
exec
echo
"remove_files_wildcard ;"
|
$MYSQL_TEST
2
>&
1
--
error
1
remove_files_wildcard
non_existing_dir
;
--
error
1
remove_files_wildcard
non_existing_dir
non_existing_file
;
# ----------------------------------------------------------------------------
# test for write_file
# ----------------------------------------------------------------------------
...
...
@@ -1905,6 +2042,20 @@ perl;
print
"hello
\n
"
;
EOF
# Test perl within while, also with if being false first iteration
let
$outer
=
3
;
let
$ifval
=
0
;
while
(
$outer
)
{
if
(
$ifval
)
{
perl
UNTIL
;
my
$val
=
5
;
print
"val is
$val
\n
"
;
UNTIL
}
inc
$ifval
;
dec
$outer
;
}
# ----------------------------------------------------------------------------
# test for die
# ----------------------------------------------------------------------------
...
...
@@ -2045,6 +2196,44 @@ INSERT INTO t1 SELECT f1 - 512 FROM t1;
SELECT
*
FROM
t1
;
--
enable_result_log
DROP
TABLE
t1
;
# ----------------------------------------------------------------------------
# test for lowercase_result
# ----------------------------------------------------------------------------
# 1. Basic test
--
lowercase_result
SELECT
"500g BLBRSYLTETY"
AS
"WILL BE lower cased"
;
# 2. test that it does not apply to next statement
SELECT
"UPPER"
AS
"WILL NOT BE lower cased"
;
# 3. test that it does not affect non-SQL or the following statement
--
lowercase_result
--
echo
UP
SELECT
0
as
"UP AGAIN"
;
# 4. test that it works with eval and variables
let
$lower_stmt
=
SELECT
"ABCdef"
AS
"uvwXYZ"
;
--
lowercase_result
eval
$lower_stmt
;
# 5. test that it works in combination with sort
sorted_result
;
lowercase_result
;
SELECT
"Xyz"
AS
Name
UNION
SELECT
"Abc"
as
Name
ORDER
BY
Name
DESC
;
# 6. Test combination with replace, and that lower casing is done first
--
lowercase_result
--
replace_result
old
new
SELECT
1
as
"SOME OLD TEXT"
;
# 7. Test missing lower casing of "unknown" characters
--
character_set
utf8
--
lowercase_result
SELECT
0
as
"WILL NOT lower case "
;
--
character_set
latin1
# ----------------------------------------------------------------------------
# Some coverage tests
# ----------------------------------------------------------------------------
...
...
@@ -2230,9 +2419,14 @@ rmdir $MYSQLTEST_VARDIR/tmp/testdir;
cat_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file3
.
txt
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file1
.
txt
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file2
.
txt
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file3
.
txt
;
list_files_write_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file11
.
txt
$MYSQLTEST_VARDIR
/
tmp
/
testdir
file
?.
txt
;
remove_files_wildcard
$MYSQLTEST_VARDIR
/
tmp
/
testdir
file
?.
txt
;
list_files_write_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
dir
-
list
.
txt
$MYSQLTEST_VARDIR
/
tmp
/
testdir
file
*.
txt
;
cat_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
dir
-
list
.
txt
;
remove_files_wildcard
$MYSQLTEST_VARDIR
/
tmp
/
testdir
file
*.
txt
;
list_files
$MYSQLTEST_VARDIR
/
tmp
/
testdir
;
remove_files_wildcard
$MYSQLTEST_VARDIR
/
tmp
/
testdir
;
list_files
$MYSQLTEST_VARDIR
/
tmp
/
testdir
;
rmdir
$MYSQLTEST_VARDIR
/
tmp
/
testdir
;
#
...
...
mysql-test/t/partition_innodb_semi_consistent.test
View file @
f91a5fe5
...
...
@@ -187,6 +187,7 @@ SELECT * FROM t1;
--
echo
# Switch to connection con2
connection
con2
;
reap
;
SELECT
*
FROM
t1
;
connection
default
;
...
...
mysql-test/t/variables
+c
.test
→
mysql-test/t/variables
_community
.test
View file @
f91a5fe5
File moved
scripts/mysql_install_db.sh
View file @
f91a5fe5
...
...
@@ -410,8 +410,7 @@ else
echo
"Try 'mysqld --help' if you have problems with paths. Using --log"
echo
"gives you a log in
$ldata
that may be helpful."
echo
echo
"The latest information about MySQL is available on the web at"
echo
"http://www.mysql.com/. Please consult the MySQL manual section"
echo
"Please consult the MySQL manual section"
echo
"'Problems running mysql_install_db', and the manual section that"
echo
"describes problems on your OS. Another information source are the"
echo
"MySQL email archives available at http://lists.mysql.com/."
...
...
@@ -470,9 +469,6 @@ then
echo
echo
"Please report any problems with the
$scriptdir
/mysqlbug script!"
echo
echo
"The latest information about MySQL is available at http://www.mysql.com/"
echo
"Support MySQL by buying support/licenses from http://shop.mysql.com/"
echo
fi
exit
0
sql/log_event.cc
View file @
f91a5fe5
...
...
@@ -8753,7 +8753,7 @@ static bool record_compare(TABLE *table)
DBUG_DUMP
(
"record[1]"
,
table
->
record
[
1
],
table
->
s
->
reclength
);
bool
result
=
FALSE
;
uchar
saved_x
[
2
]
,
saved_filler
[
2
]
;
uchar
saved_x
[
2
]
=
{
0
,
0
},
saved_filler
[
2
]
=
{
0
,
0
}
;
if
(
table
->
s
->
null_bytes
>
0
)
{
...
...
sql/log_event_old.cc
View file @
f91a5fe5
...
...
@@ -337,7 +337,7 @@ static bool record_compare(TABLE *table)
*/
bool
result
=
FALSE
;
uchar
saved_x
[
2
]
,
saved_filler
[
2
]
;
uchar
saved_x
[
2
]
=
{
0
,
0
},
saved_filler
[
2
]
=
{
0
,
0
}
;
if
(
table
->
s
->
null_bytes
>
0
)
{
...
...
sql/sql_update.cc
View file @
f91a5fe5
...
...
@@ -1283,7 +1283,8 @@ bool mysql_multi_update(THD *thd,
if
(
using_handler
)
{
Internal_error_handler
*
top_handler
=
thd
->
pop_internal_handler
();
Internal_error_handler
*
top_handler
;
top_handler
=
thd
->
pop_internal_handler
();
DBUG_ASSERT
(
&
handler
==
top_handler
);
}
...
...
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