1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Added --debug-info to most clients to detect memory leaks in mysql-test-run

Moved .progress files into the log directory
Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
Fixed some compiler warnings
Fixed small memory leak in libmysql
Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
This commit is contained in:
monty@mysql.com/nosik.monty.fi
2006-11-21 22:32:58 +02:00
parent 959e906768
commit f6682e2743
81 changed files with 596 additions and 329 deletions

View File

@ -1330,7 +1330,7 @@ sub executable_setup () {
sub generate_cmdline_mysqldump ($) {
my($mysqld) = @_;
return
"$exe_mysqldump --no-defaults -uroot " .
"$exe_mysqldump --no-defaults --debug-info -uroot " .
"--port=$mysqld->{'port'} " .
"--socket=$mysqld->{'path_sock'} --password=";
}
@ -1468,7 +1468,7 @@ sub environment_setup () {
# Setup env so childs can execute mysqlcheck
# ----------------------------------------------------
my $cmdline_mysqlcheck=
"$exe_mysqlcheck --no-defaults -uroot " .
"$exe_mysqlcheck --no-defaults --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@ -1519,7 +1519,7 @@ sub environment_setup () {
# Setup env so childs can execute mysqlimport
# ----------------------------------------------------
my $cmdline_mysqlimport=
"$exe_mysqlimport -uroot " .
"$exe_mysqlimport --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@ -1535,7 +1535,7 @@ sub environment_setup () {
# Setup env so childs can execute mysqlshow
# ----------------------------------------------------
my $cmdline_mysqlshow=
"$exe_mysqlshow -uroot " .
"$exe_mysqlshow --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@ -1551,7 +1551,7 @@ sub environment_setup () {
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
"$exe_mysqlbinlog" .
" --no-defaults --local-load=$opt_tmpdir" .
" --no-defaults --debug-info --local-load=$opt_tmpdir" .
" --character-sets-dir=$path_charsetsdir";
if ( $opt_debug )
@ -1565,7 +1565,7 @@ sub environment_setup () {
# Setup env so childs can execute mysql
# ----------------------------------------------------
my $cmdline_mysql=
"$exe_mysql --no-defaults --host=localhost --user=root --password= " .
"$exe_mysql --no-defaults --debug-info --host=localhost --user=root --password= " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} ".
"--character-sets-dir=$path_charsetsdir";
@ -2116,8 +2116,8 @@ sub ndbcluster_start ($$) {
sub rm_ndbcluster_tables ($) {
my $dir= shift;
foreach my $bin ( glob("$dir/cluster/apply_status*"),
glob("$dir/cluster/schema*") )
foreach my $bin ( glob("$dir/mysql/apply_status*"),
glob("$dir/mysql/schema*") )
{
unlink($bin);
}
@ -2616,11 +2616,11 @@ sub do_after_run_mysqltest($)
my $tname= $tinfo->{'name'};
#MASV cleanup
# Save info from this testcase run to mysqltest.log
my $testcase_log= mtr_fromfile($path_timefile) if -f $path_timefile;
mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
mtr_tofile($path_mysqltest_log, $testcase_log);
}
# Save info from this testcase run to mysqltest.log
my $testcase_log= mtr_fromfile($path_timefile) if -f $path_timefile;
mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
mtr_tofile($path_mysqltest_log, $testcase_log);
}
##############################################################################
@ -2670,6 +2670,8 @@ sub run_testcase ($) {
my $res= run_mysqltest($tinfo);
mtr_report_test_name($tinfo);
do_after_run_mysqltest($tinfo);
if ( $res == 0 )
{
mtr_report_test_passed($tinfo);
@ -2702,8 +2704,6 @@ sub run_testcase ($) {
report_failure_and_restart($tinfo);
}
do_after_run_mysqltest($tinfo);
}
# ----------------------------------------------------------------------
@ -3643,11 +3643,11 @@ sub run_testcase_start_servers($) {
# First wait for first mysql server to have created ndb system tables ok
# FIXME This is a workaround so that only one mysqld creates the tables
if ( ! sleep_until_file_created(
"$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
"$master->[0]->{'path_myddir'}/mysql/apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{
mtr_report("Failed to create 'cluster/apply_status' table");
mtr_report("Failed to create 'mysql/apply_status' table");
report_failure_and_restart($tinfo);
return;
}
@ -3808,6 +3808,7 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "-v");
mtr_add_arg($args, "--skip-safemalloc");
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
if ($tinfo->{'component_id'} eq 'im')
{