mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
- maria/ma_test_all.sh can now be run with --tmpdir=/dev/shm for faster testing
- Fixed mysql-test-run failures on window - Fixed compiler warnings from my last push (sorry about that) - Fixed that maria_chk --repair --extended works again - Fixed compiler warnings about using not unitialized data mysql-test/mysql-test-run.pl: Better output mysql-test/suite/parts/inc/partition_check_drop.inc: Use remove_files_wildcard instead of rm mysys/safemalloc.c: Fixed argument to printf storage/maria/ma_cache.c: Don't give errors when running maria_chk storage/maria/ma_dynrec.c: Don't give errors when running maria_chk storage/maria/ma_rt_test.c: Added option --datadir for where to put logs and test data storage/maria/ma_test1.c: Added option --datadir for where to put logs and test data storage/maria/ma_test2.c: Added option --datadir for where to put logs and test data storage/maria/maria_chk.c: If --datadir is used but --logdir is not, set --logdir from --datadir (this reflects how --help said how things should work) storage/maria/maria_read_log.c: Changed short option for 'maria-log-dir-path' from -l to -h to be same as mysqld, maria_chk, ma_test1 etc.. storage/maria/unittest/ma_test_all-t: Allow one to specify --tmpdir for where to store logs and data storage/xtradb/buf/buf0buf.c: Fixed compiler warnings about using not unitialized data storage/xtradb/row/row0upd.c: Fixed compiler warnings about using not unitialized data storage/xtradb/srv/srv0srv.c: Fixed compiler warnings about using not unitialized data
This commit is contained in:
@ -5310,7 +5310,7 @@ sub start_servers($) {
|
|||||||
for (all_servers()) {
|
for (all_servers()) {
|
||||||
next unless $_->{WAIT} and started($_);
|
next unless $_->{WAIT} and started($_);
|
||||||
if ($_->{WAIT}->($_)) {
|
if ($_->{WAIT}->($_)) {
|
||||||
$tinfo->{comment}= "Failed to start ".$_->name();
|
$tinfo->{comment}= "Failed to start ".$_->name() . "\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,10 +66,10 @@ if ($found_garbage)
|
|||||||
}
|
}
|
||||||
# Do a manual cleanup, because the following tests should not suffer from
|
# Do a manual cleanup, because the following tests should not suffer from
|
||||||
# remaining files
|
# remaining files
|
||||||
--exec rm -f $MYSQLD_DATADIR/test/t1* || true
|
--remove_files_wildcard $MYSQLD_DATADIR/test t1*
|
||||||
if ($with_directories)
|
if ($with_directories)
|
||||||
{
|
{
|
||||||
--exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true
|
--remove_files_wildcard $MYSQLD_DATADIR/test/tmp t1*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
@ -125,7 +125,7 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags)
|
|||||||
uchar *data;
|
uchar *data;
|
||||||
DBUG_ENTER("_mymalloc");
|
DBUG_ENTER("_mymalloc");
|
||||||
DBUG_PRINT("enter",("Size: %lu Total alloc: %lu", (ulong) size,
|
DBUG_PRINT("enter",("Size: %lu Total alloc: %lu", (ulong) size,
|
||||||
sf_malloc_cur_memory));
|
(ulong) sf_malloc_cur_memory));
|
||||||
|
|
||||||
if (!sf_malloc_quick)
|
if (!sf_malloc_quick)
|
||||||
(void) _sanity (filename, lineno);
|
(void) _sanity (filename, lineno);
|
||||||
@ -317,7 +317,7 @@ void _myfree(void *ptr, const char *filename, uint lineno, myf myflags)
|
|||||||
sf_malloc_cur_memory-= irem->datasize;
|
sf_malloc_cur_memory-= irem->datasize;
|
||||||
sf_malloc_count--;
|
sf_malloc_count--;
|
||||||
pthread_mutex_unlock(&THR_LOCK_malloc);
|
pthread_mutex_unlock(&THR_LOCK_malloc);
|
||||||
DBUG_PRINT("info", ("bytes freed: %ld", irem->datasize));
|
DBUG_PRINT("info", ("bytes freed: %ld", (ulong) irem->datasize));
|
||||||
|
|
||||||
#ifndef HAVE_valgrind
|
#ifndef HAVE_valgrind
|
||||||
/* Mark this data as free'ed */
|
/* Mark this data as free'ed */
|
||||||
|
@ -98,7 +98,12 @@ my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff,
|
|||||||
("Error %d reading next-multi-part block (Got %d bytes)",
|
("Error %d reading next-multi-part block (Got %d bytes)",
|
||||||
my_errno, (int) read_length));
|
my_errno, (int) read_length));
|
||||||
if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT)
|
if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT)
|
||||||
_ma_set_fatal_error(handler->s, HA_ERR_WRONG_IN_RECORD);
|
{
|
||||||
|
if (!handler->in_check_table)
|
||||||
|
_ma_set_fatal_error(handler->s, HA_ERR_WRONG_IN_RECORD);
|
||||||
|
else
|
||||||
|
my_errno= HA_ERR_WRONG_IN_RECORD;
|
||||||
|
}
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length -
|
bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length -
|
||||||
|
@ -2053,6 +2053,10 @@ uint _ma_get_block_info(MARIA_HA *handler, MARIA_BLOCK_INFO *info, File file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
err:
|
err:
|
||||||
_ma_set_fatal_error(handler->s, HA_ERR_WRONG_IN_RECORD);
|
if (!handler->in_check_table)
|
||||||
|
{
|
||||||
|
/* We may be scanning the table for new rows; Don't give an error */
|
||||||
|
_ma_set_fatal_error(handler->s, HA_ERR_WRONG_IN_RECORD);
|
||||||
|
}
|
||||||
return BLOCK_ERROR;
|
return BLOCK_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,10 @@ static enum data_file_type record_type= DYNAMIC_RECORD;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
char buff[FN_REFLEN];
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
get_options(argc, argv);
|
|
||||||
maria_data_root= (char *)".";
|
maria_data_root= (char *)".";
|
||||||
|
get_options(argc, argv);
|
||||||
/* Maria requires that we always have a page cache */
|
/* Maria requires that we always have a page cache */
|
||||||
if (maria_init() ||
|
if (maria_init() ||
|
||||||
(init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0,
|
(init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0,
|
||||||
@ -113,7 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(run_test("rt_test"));
|
exit(run_test(fn_format(buff, "test1", maria_data_root, "", MYF(0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -614,6 +615,8 @@ static struct my_option my_long_options[] =
|
|||||||
#endif
|
#endif
|
||||||
{"help", '?', "Display help and exit",
|
{"help", '?', "Display help and exit",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"datadir", 'h', "Path to the database root.", &maria_data_root,
|
||||||
|
&maria_data_root, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"row-fixed-size", 'S', "Fixed size records",
|
{"row-fixed-size", 'S', "Fixed size records",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"rows-in-block", 'M', "Store rows in block format",
|
{"rows-in-block", 'M', "Store rows in block format",
|
||||||
|
@ -70,12 +70,13 @@ extern int _ma_flush_table_files(MARIA_HA *info, uint flush_data_or_index,
|
|||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
|
char buff[FN_REFLEN];
|
||||||
#if defined(SAFE_MUTEX) && defined(THREAD)
|
#if defined(SAFE_MUTEX) && defined(THREAD)
|
||||||
safe_mutex_deadlock_detector= 1;
|
safe_mutex_deadlock_detector= 1;
|
||||||
#endif
|
#endif
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
get_options(argc,argv);
|
|
||||||
maria_data_root= (char *)".";
|
maria_data_root= (char *)".";
|
||||||
|
get_options(argc,argv);
|
||||||
/* Maria requires that we always have a page cache */
|
/* Maria requires that we always have a page cache */
|
||||||
if (maria_init() ||
|
if (maria_init() ||
|
||||||
(init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0,
|
(init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0,
|
||||||
@ -95,7 +96,7 @@ int main(int argc,char *argv[])
|
|||||||
if (opt_versioning)
|
if (opt_versioning)
|
||||||
init_thr_lock();
|
init_thr_lock();
|
||||||
|
|
||||||
exit(run_test("test1"));
|
exit(run_test(fn_format(buff, "test1", maria_data_root, "", MYF(0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -724,6 +725,8 @@ static struct my_option my_long_options[] =
|
|||||||
{"debug", '#', "Undocumented",
|
{"debug", '#', "Undocumented",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
|
{"datadir", 'h', "Path to the database root.", &maria_data_root,
|
||||||
|
&maria_data_root, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"delete-rows", 'd', "Abort after this many rows has been deleted",
|
{"delete-rows", 'd', "Abort after this many rows has been deleted",
|
||||||
(uchar**) &remove_count, (uchar**) &remove_count, 0, GET_UINT, REQUIRED_ARG,
|
(uchar**) &remove_count, (uchar**) &remove_count, 0, GET_UINT, REQUIRED_ARG,
|
||||||
1000, 0, 0, 0, 0, 0},
|
1000, 0, 0, 0, 0, 0},
|
||||||
|
@ -69,24 +69,25 @@ int main(int argc, char *argv[])
|
|||||||
MARIA_KEYDEF keyinfo[10];
|
MARIA_KEYDEF keyinfo[10];
|
||||||
MARIA_COLUMNDEF recinfo[10];
|
MARIA_COLUMNDEF recinfo[10];
|
||||||
MARIA_INFO info;
|
MARIA_INFO info;
|
||||||
const char *filename;
|
|
||||||
char *blob_buffer;
|
char *blob_buffer;
|
||||||
MARIA_CREATE_INFO create_info;
|
MARIA_CREATE_INFO create_info;
|
||||||
|
char filename[FN_REFLEN];
|
||||||
|
|
||||||
#if defined(SAFE_MUTEX) && defined(THREAD)
|
#if defined(SAFE_MUTEX) && defined(THREAD)
|
||||||
safe_mutex_deadlock_detector= 1;
|
safe_mutex_deadlock_detector= 1;
|
||||||
#endif
|
#endif
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
filename= "test2";
|
maria_data_root= (char *)".";
|
||||||
get_options(argc,argv);
|
get_options(argc,argv);
|
||||||
|
fn_format(filename, "test2", maria_data_root, "", MYF(0));
|
||||||
|
|
||||||
if (! async_io)
|
if (! async_io)
|
||||||
my_disable_async_io=1;
|
my_disable_async_io=1;
|
||||||
|
|
||||||
/* If we sync or not have no affect on this test */
|
/* If we sync or not have no affect on this test */
|
||||||
my_disable_sync= 1;
|
my_disable_sync= 1;
|
||||||
|
|
||||||
maria_data_root= (char *)".";
|
|
||||||
/* Maria requires that we always have a page cache */
|
/* Maria requires that we always have a page cache */
|
||||||
if (maria_init() ||
|
if (maria_init() ||
|
||||||
(init_pagecache(maria_pagecache, pagecache_size, 0, 0,
|
(init_pagecache(maria_pagecache, pagecache_size, 0, 0,
|
||||||
@ -1101,6 +1102,9 @@ static void get_options(int argc, char **argv)
|
|||||||
case 'H':
|
case 'H':
|
||||||
checkpoint= atoi(++pos);
|
checkpoint= atoi(++pos);
|
||||||
break;
|
break;
|
||||||
|
case 'h':
|
||||||
|
maria_data_root= ++pos;
|
||||||
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
if ((keys=(uint) atoi(++pos)) < 1 ||
|
if ((keys=(uint) atoi(++pos)) < 1 ||
|
||||||
keys > (uint) (MARIA_KEYS-first_key))
|
keys > (uint) (MARIA_KEYS-first_key))
|
||||||
|
@ -38,6 +38,7 @@ static uint decode_bits;
|
|||||||
static char **default_argv;
|
static char **default_argv;
|
||||||
static const char *load_default_groups[]= { "maria_chk", 0 };
|
static const char *load_default_groups[]= { "maria_chk", 0 };
|
||||||
static const char *set_collation_name, *opt_tmpdir, *opt_log_dir;
|
static const char *set_collation_name, *opt_tmpdir, *opt_log_dir;
|
||||||
|
static const char *default_log_dir;
|
||||||
static CHARSET_INFO *set_collation;
|
static CHARSET_INFO *set_collation;
|
||||||
static int stopwords_inited= 0;
|
static int stopwords_inited= 0;
|
||||||
static MY_TMPDIR maria_chk_tmpdir;
|
static MY_TMPDIR maria_chk_tmpdir;
|
||||||
@ -106,7 +107,7 @@ int main(int argc, char **argv)
|
|||||||
int error;
|
int error;
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
opt_log_dir= maria_data_root= (char *)".";
|
default_log_dir= opt_log_dir= maria_data_root= (char *)".";
|
||||||
maria_chk_init(&check_param);
|
maria_chk_init(&check_param);
|
||||||
check_param.opt_lock_memory= 1; /* Lock memory if possible */
|
check_param.opt_lock_memory= 1; /* Lock memory if possible */
|
||||||
check_param.using_global_keycache = 0;
|
check_param.using_global_keycache = 0;
|
||||||
@ -207,7 +208,7 @@ enum options_mc {
|
|||||||
OPT_MAX_RECORD_LENGTH, OPT_AUTO_CLOSE, OPT_STATS_METHOD, OPT_TRANSACTION_LOG,
|
OPT_MAX_RECORD_LENGTH, OPT_AUTO_CLOSE, OPT_STATS_METHOD, OPT_TRANSACTION_LOG,
|
||||||
OPT_SKIP_SAFEMALLOC, OPT_ZEROFILL_KEEP_LSN,
|
OPT_SKIP_SAFEMALLOC, OPT_ZEROFILL_KEEP_LSN,
|
||||||
OPT_REQUIRE_CONTROL_FILE, OPT_IGNORE_CONTROL_FILE,
|
OPT_REQUIRE_CONTROL_FILE, OPT_IGNORE_CONTROL_FILE,
|
||||||
OPT_LOG_DIR, OPT_DATADIR, OPT_WARNING_FOR_WRONG_TRANSID
|
OPT_LOG_DIR, OPT_WARNING_FOR_WRONG_TRANSID
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
@ -277,7 +278,7 @@ static struct my_option my_long_options[] =
|
|||||||
&check_param.keys_in_use,
|
&check_param.keys_in_use,
|
||||||
&check_param.keys_in_use,
|
&check_param.keys_in_use,
|
||||||
0, GET_ULL, REQUIRED_ARG, -1, 0, 0, 0, 0, 0},
|
0, GET_ULL, REQUIRED_ARG, -1, 0, 0, 0, 0, 0},
|
||||||
{"datadir", OPT_DATADIR,
|
{"datadir", 'h',
|
||||||
"Path for control file (and logs if --logdir not used).",
|
"Path for control file (and logs if --logdir not used).",
|
||||||
&maria_data_root, 0, 0, GET_STR, REQUIRED_ARG,
|
&maria_data_root, 0, 0, GET_STR, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
@ -928,6 +929,11 @@ static void get_options(register int *argc,register char ***argv)
|
|||||||
MYF(MY_WME))))
|
MYF(MY_WME))))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
|
if (maria_data_root != default_log_dir && opt_log_dir == default_log_dir)
|
||||||
|
{
|
||||||
|
/* --datadir was used and --log-dir was not. Set log-dir to datadir */
|
||||||
|
opt_log_dir= maria_data_root;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} /* get options */
|
} /* get options */
|
||||||
|
|
||||||
|
@ -44,9 +44,9 @@ int main(int argc, char **argv)
|
|||||||
uint warnings_count;
|
uint warnings_count;
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
|
maria_data_root= (char *)".";
|
||||||
load_defaults("my", load_default_groups, &argc, &argv);
|
load_defaults("my", load_default_groups, &argc, &argv);
|
||||||
default_argv= argv;
|
default_argv= argv;
|
||||||
maria_data_root= (char *)".";
|
|
||||||
get_options(&argc, &argv);
|
get_options(&argc, &argv);
|
||||||
|
|
||||||
maria_in_recovery= TRUE;
|
maria_in_recovery= TRUE;
|
||||||
@ -195,7 +195,7 @@ static struct my_option my_long_options[] =
|
|||||||
{ "end-lsn", 'e', "Stop applying at this lsn. If end-lsn is used, UNDO:s "
|
{ "end-lsn", 'e', "Stop applying at this lsn. If end-lsn is used, UNDO:s "
|
||||||
"will not be applied", &opt_end_lsn, &opt_end_lsn,
|
"will not be applied", &opt_end_lsn, &opt_end_lsn,
|
||||||
0, GET_ULL, REQUIRED_ARG, 0, 0, ~(longlong) 0, 0, 0, 0 },
|
0, GET_ULL, REQUIRED_ARG, 0, 0, ~(longlong) 0, 0, 0, 0 },
|
||||||
{"maria-log-dir-path", 'l',
|
{"maria-log-dir-path", 'h',
|
||||||
"Path to the directory where to store transactional log",
|
"Path to the directory where to store transactional log",
|
||||||
(uchar **) &maria_data_root, (uchar **) &maria_data_root, 0,
|
(uchar **) &maria_data_root, (uchar **) &maria_data_root, 0,
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@ -8,7 +8,7 @@ use File::Basename;
|
|||||||
|
|
||||||
$|= 1;
|
$|= 1;
|
||||||
$^W = 1; # warnings, because env cannot parse 'perl -w'
|
$^W = 1; # warnings, because env cannot parse 'perl -w'
|
||||||
$VER= "1.4";
|
$VER= "1.5";
|
||||||
|
|
||||||
$opt_version= 0;
|
$opt_version= 0;
|
||||||
$opt_help= 0;
|
$opt_help= 0;
|
||||||
@ -28,6 +28,8 @@ my $NEW_TEST= 0; # Test group separator in an array of tests
|
|||||||
my $test_begin= 0;
|
my $test_begin= 0;
|
||||||
my $test_end= 0;
|
my $test_end= 0;
|
||||||
my $test_counter= 0;
|
my $test_counter= 0;
|
||||||
|
my $full_tmpdir;
|
||||||
|
my $tmpdir="tmp";
|
||||||
|
|
||||||
run_tests();
|
run_tests();
|
||||||
|
|
||||||
@ -46,6 +48,7 @@ sub run_tests
|
|||||||
"abort-on-error" => \$opt_abort_on_error,
|
"abort-on-error" => \$opt_abort_on_error,
|
||||||
"valgrind=s" => \$opt_valgrind,
|
"valgrind=s" => \$opt_valgrind,
|
||||||
"silent=s" => \$opt_silent,
|
"silent=s" => \$opt_silent,
|
||||||
|
"tmpdir=s" => \$full_tmpdir,
|
||||||
"number-of-tests" => \$opt_number_of_tests,
|
"number-of-tests" => \$opt_number_of_tests,
|
||||||
"run-tests=s" => \$opt_run_tests,
|
"run-tests=s" => \$opt_run_tests,
|
||||||
"start-from=s" => \$opt_run_tests))
|
"start-from=s" => \$opt_run_tests))
|
||||||
@ -77,10 +80,23 @@ sub run_tests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() if ($opt_help || $flag_exit);
|
usage() if ($opt_help || $flag_exit);
|
||||||
|
|
||||||
|
if (defined($full_tmpdir))
|
||||||
|
{
|
||||||
|
$tmpdir= $full_tmpdir;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$full_tmpdir= "tmp";
|
||||||
|
if (! -d "$full_tmpdir")
|
||||||
|
{
|
||||||
|
die if (!mkdir("$full_tmpdir"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# IMPORTANT: If you modify this file, please read this:
|
# IMPORTANT: If you modify this file, please read this:
|
||||||
#
|
#
|
||||||
@ -146,7 +162,7 @@ sub run_tests
|
|||||||
# clean-up
|
# clean-up
|
||||||
#
|
#
|
||||||
|
|
||||||
unlink <*.TMD maria_log*>; # Delete temporary files
|
unlink_all_possible_tmp_files();
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run tests
|
# Run tests
|
||||||
@ -210,6 +226,7 @@ sub run_tests
|
|||||||
run_ma_test_recovery($opt_verbose, 0);
|
run_ma_test_recovery($opt_verbose, 0);
|
||||||
run_tests_on_clrs($suffix, $opt_verbose, 0);
|
run_tests_on_clrs($suffix, $opt_verbose, 0);
|
||||||
|
|
||||||
|
unlink_all_possible_tmp_files();
|
||||||
exit($runtime_error);
|
exit($runtime_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,38 +297,38 @@ sub run_check_tests
|
|||||||
|
|
||||||
for ($i= 0; defined($ma_test1_opt[$i]); $i++)
|
for ($i= 0; defined($ma_test1_opt[$i]); $i++)
|
||||||
{
|
{
|
||||||
unlink <maria_log_control maria_log.*>;
|
unlink_log_files();
|
||||||
ok("$maria_exe_path/ma_test1$suffix $silent $ma_test1_opt[$i][0] $row_type",
|
ok("$maria_exe_path/ma_test1$suffix $silent -h$tmpdir $ma_test1_opt[$i][0] $row_type",
|
||||||
$verbose, $i + 1);
|
$verbose, $i + 1);
|
||||||
ok("$maria_exe_path/maria_chk$suffix $ma_test1_opt[$i][1] test1",
|
ok("$maria_exe_path/maria_chk$suffix -h$tmpdir $ma_test1_opt[$i][1] $tmpdir/test1",
|
||||||
$verbose, $i + 1);
|
$verbose, $i + 1);
|
||||||
}
|
}
|
||||||
#
|
#
|
||||||
# These tests are outside the loops. Make sure to include them in
|
# These tests are outside the loops. Make sure to include them in
|
||||||
# nr_tests manually
|
# nr_tests manually
|
||||||
#
|
#
|
||||||
ok("$maria_exe_path/maria_pack$suffix --force -s test1", $verbose, 0);
|
ok("$maria_exe_path/maria_pack$suffix --force -s $tmpdir/test1", $verbose, 0);
|
||||||
ok("$maria_exe_path/maria_chk$suffix -ess test1", $verbose, 0);
|
ok("$maria_exe_path/maria_chk$suffix -ess $tmpdir/test1", $verbose, 0);
|
||||||
|
|
||||||
for ($i= 0; defined($ma_test2_opt[$i]); $i++)
|
for ($i= 0; defined($ma_test2_opt[$i]); $i++)
|
||||||
{
|
{
|
||||||
unlink <maria_log_control maria_log.*>;
|
unlink_log_files();
|
||||||
ok("$maria_exe_path/ma_test2$suffix $silent $ma_test2_opt[$i][0] $row_type",
|
ok("$maria_exe_path/ma_test2$suffix $silent -h$tmpdir $ma_test2_opt[$i][0] $row_type",
|
||||||
$verbose, $i + 1);
|
$verbose, $i + 1);
|
||||||
ok("$maria_exe_path/maria_chk$suffix $ma_test2_opt[$i][1] test2",
|
ok("$maria_exe_path/maria_chk$suffix -h$tmpdir $ma_test2_opt[$i][1] $tmpdir/test2",
|
||||||
$verbose, $i + 1);
|
$verbose, $i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i= 0; defined($ma_rt_test_opt[$i]); $i++)
|
for ($i= 0; defined($ma_rt_test_opt[$i]); $i++)
|
||||||
{
|
{
|
||||||
unlink <maria_log_control maria_log.*>;
|
unlink_log_files();
|
||||||
ok("$maria_exe_path/ma_rt_test$suffix $silent $ma_rt_test_opt[$i][0] $row_type",
|
ok("$maria_exe_path/ma_rt_test$suffix $silent -h$tmpdir $ma_rt_test_opt[$i][0] $row_type",
|
||||||
$verbose, $i + 1);
|
$verbose, $i + 1);
|
||||||
ok("$maria_exe_path/maria_chk$suffix $ma_rt_test_opt[$i][1] rt_test",
|
ok("$maria_exe_path/maria_chk$suffix -h$tmpdir $ma_rt_test_opt[$i][1] $tmpdir/rt_test",
|
||||||
$verbose, $i + 1);
|
$verbose, $i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink <maria_log_control maria_log.*>;
|
unlink_log_files();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -326,35 +343,35 @@ sub run_repair_tests()
|
|||||||
my ($i);
|
my ($i);
|
||||||
|
|
||||||
my @t= ($NEW_TEST,
|
my @t= ($NEW_TEST,
|
||||||
"$maria_exe_path/ma_test1$suffix $silent --checksum $row_type",
|
"$maria_exe_path/ma_test1$suffix -h$tmpdir $silent --checksum $row_type",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -se $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix --silent -re --transaction-log test1",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir --silent -re --transaction-log $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rs test1",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -rs $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rqs test1",
|
"$maria_exe_path/maria_chk$suffix -rqs -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rs --correct-checksum test1",
|
"$maria_exe_path/maria_chk$suffix -rs --correct-checksum -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rqs --correct-checksum test1",
|
"$maria_exe_path/maria_chk$suffix -rqs --correct-checksum -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -ros --correct-checksum test1",
|
"$maria_exe_path/maria_chk$suffix -ros --correct-checksum -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rqos --correct-checksum test1",
|
"$maria_exe_path/maria_chk$suffix -rqos --correct-checksum -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -sz test1",
|
"$maria_exe_path/maria_chk$suffix -sz -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/ma_test2$suffix $silent -c -d1 $row_type",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir $silent -c -d1 $row_type",
|
||||||
"$maria_exe_path/maria_chk$suffix -s --parallel-recover test2",
|
"$maria_exe_path/maria_chk$suffix -s --parallel-recover -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -s --parallel-recover --quick test2",
|
"$maria_exe_path/maria_chk$suffix -s --parallel-recover --quick -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/ma_test2$suffix $silent -c $row_type",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir $silent -c $row_type",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -sr test2",
|
"$maria_exe_path/maria_chk$suffix -sr -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/ma_test2$suffix $silent -c -t4 -b32768 $row_type",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir $silent -c -t4 -b32768 $row_type",
|
||||||
"$maria_exe_path/maria_chk$suffix -s --zerofill test1",
|
"$maria_exe_path/maria_chk$suffix -s --zerofill -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1"
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1"
|
||||||
);
|
);
|
||||||
|
|
||||||
return &count_tests(\@t) if ($count);
|
return &count_tests(\@t) if ($count);
|
||||||
@ -372,49 +389,49 @@ sub run_pack_tests()
|
|||||||
my ($i);
|
my ($i);
|
||||||
|
|
||||||
my @t= ($NEW_TEST,
|
my @t= ($NEW_TEST,
|
||||||
"$maria_exe_path/ma_test1$suffix $silent --checksum $row_type",
|
"$maria_exe_path/ma_test1$suffix -h$tmpdir $silent --checksum $row_type",
|
||||||
"$maria_exe_path/maria_pack$suffix --force -s test1",
|
"$maria_exe_path/maria_pack$suffix --force -s $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -ess test1",
|
"$maria_exe_path/maria_chk$suffix -ess -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rqs test1",
|
"$maria_exe_path/maria_chk$suffix -rqs -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test1",
|
"$maria_exe_path/maria_chk$suffix -es -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rs test1",
|
"$maria_exe_path/maria_chk$suffix -rs -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test1",
|
"$maria_exe_path/maria_chk$suffix -es -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rus test1",
|
"$maria_exe_path/maria_chk$suffix -rus -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test1",
|
"$maria_exe_path/maria_chk$suffix -es -h$tmpdir $tmpdir/test1",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/ma_test1$suffix $silent --checksum $row_type",
|
"$maria_exe_path/ma_test1$suffix -h$tmpdir $silent --checksum $row_type",
|
||||||
"$maria_exe_path/maria_pack$suffix --force -s test1",
|
"$maria_exe_path/maria_pack$suffix --force -s $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rus --safe-recover test1",
|
"$maria_exe_path/maria_chk$suffix -rus --safe-recover -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test1",
|
"$maria_exe_path/maria_chk$suffix -es -h$tmpdir $tmpdir/test1",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/ma_test1$suffix $silent --checksum -S $row_type",
|
"$maria_exe_path/ma_test1$suffix -h$tmpdir $silent --checksum -S $row_type",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -ros test1",
|
"$maria_exe_path/maria_chk$suffix -ros -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rqs test1",
|
"$maria_exe_path/maria_chk$suffix -rqs -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test1",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test1",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/maria_pack$suffix --force -s test1",
|
"$maria_exe_path/maria_pack$suffix --force -s $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rqs test1",
|
"$maria_exe_path/maria_chk$suffix -rqs -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test1",
|
"$maria_exe_path/maria_chk$suffix -es -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -rus test1",
|
"$maria_exe_path/maria_chk$suffix -rus -h$tmpdir $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test1",
|
"$maria_exe_path/maria_chk$suffix -es -h$tmpdir $tmpdir/test1",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/ma_test2$suffix $silent -c -d1 $row_type",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir $silent -c -d1 $row_type",
|
||||||
"$maria_exe_path/maria_chk$suffix -s --parallel-recover test2",
|
"$maria_exe_path/maria_chk$suffix -s --parallel-recover -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -s --unpack --parallel-recover test2",
|
"$maria_exe_path/maria_chk$suffix -s --unpack --parallel-recover -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_pack$suffix --force -s test1",
|
"$maria_exe_path/maria_pack$suffix --force -s $tmpdir/test1",
|
||||||
"$maria_exe_path/maria_chk$suffix -s --unpack --parallel-recover test2",
|
"$maria_exe_path/maria_chk$suffix -s --unpack --parallel-recover -h$tmpdir $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk$suffix -se test2",
|
"$maria_exe_path/maria_chk$suffix -se -h$tmpdir $tmpdir/test2",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/ma_test1$suffix $silent -c $row_type",
|
"$maria_exe_path/ma_test1$suffix -h$tmpdir $silent -c $row_type",
|
||||||
"cp test1.MAD test2.MAD",
|
"cp $tmpdir/test1.MAD $tmpdir/test2.MAD",
|
||||||
"cp test1.MAI test2.MAI",
|
"cp $tmpdir/test1.MAI $tmpdir/test2.MAI",
|
||||||
"$maria_exe_path/maria_pack$suffix --force -s --join=test3 test1 test2",
|
"$maria_exe_path/maria_pack$suffix --force -s --join=$tmpdir/test3 $tmpdir/test1 $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_chk -s test3",
|
"$maria_exe_path/maria_chk -s -h$tmpdir $tmpdir/test3",
|
||||||
"$maria_exe_path/maria_chk -s --safe-recover test3",
|
"$maria_exe_path/maria_chk -s --safe-recover -h$tmpdir $tmpdir/test3",
|
||||||
"$maria_exe_path/maria_chk -s test3"
|
"$maria_exe_path/maria_chk -s -h$tmpdir $tmpdir/test3"
|
||||||
);
|
);
|
||||||
|
|
||||||
return &count_tests(\@t) if ($count);
|
return &count_tests(\@t) if ($count);
|
||||||
@ -433,25 +450,25 @@ sub run_tests_on_warnings_and_errors
|
|||||||
|
|
||||||
return 9 if ($count); # Number of tests in this function, e.g. calls to ok()
|
return 9 if ($count); # Number of tests in this function, e.g. calls to ok()
|
||||||
|
|
||||||
ok("$maria_exe_path/ma_test2$suffix $silent -L -K -W -P -S -R1 -m500",
|
ok("$maria_exe_path/ma_test2$suffix -h$tmpdir $silent -L -K -W -P -S -R1 -m500",
|
||||||
$verbose, 0);
|
$verbose, 0);
|
||||||
ok("$maria_exe_path/maria_chk$suffix -sm test2", $verbose, 0);
|
ok("$maria_exe_path/maria_chk$suffix -h$tmpdir -sm $tmpdir/test2", $verbose, 0);
|
||||||
# ma_test2$suffix $silent -L -K -R1 -m2000 ; Should give error 135\n
|
# ma_test2$suffix $silent -L -K -R1 -m2000 ; Should give error 135\n
|
||||||
# In the following a failure is a success and success is a failure
|
# In the following a failure is a success and success is a failure
|
||||||
$com= "$maria_exe_path/ma_test2$suffix $silent -L -K -R1 -m2000 ";
|
$com= "$maria_exe_path/ma_test2$suffix -h$tmpdir $silent -L -K -R1 -m2000 ";
|
||||||
$com.= ">ma_test2_message.txt 2>&1";
|
$com.= ">ma_test2_message.txt 2>&1";
|
||||||
ok($com, $verbose, 0, 1);
|
ok($com, $verbose, 0, 1);
|
||||||
ok("cat ma_test2_message.txt", $verbose, 0);
|
ok("cat ma_test2_message.txt", $verbose, 0);
|
||||||
ok("grep \"Error: 135\" ma_test2_message.txt > /dev/null", $verbose, 0);
|
ok("grep \"Error: 135\" ma_test2_message.txt > /dev/null", $verbose, 0);
|
||||||
# maria_exe_path/maria_chk$suffix -sm test2 will warn that
|
# maria_exe_path/maria_chk$suffix -h$tmpdir -sm $tmpdir/test2 will warn that
|
||||||
# Datafile is almost full
|
# Datafile is almost full
|
||||||
ok("$maria_exe_path/maria_chk$suffix -sm test2 >ma_test2_message.txt 2>&1",
|
ok("$maria_exe_path/maria_chk$suffix -h$tmpdir -sm $tmpdir/test2 >ma_test2_message.txt 2>&1",
|
||||||
$verbose, 0);
|
$verbose, 0);
|
||||||
ok("cat ma_test2_message.txt", $verbose, 0);
|
ok("cat ma_test2_message.txt", $verbose, 0);
|
||||||
ok("grep \"warning: Datafile is almost full\" ma_test2_message.txt>/dev/null",
|
ok("grep \"warning: Datafile is almost full\" ma_test2_message.txt>/dev/null",
|
||||||
$verbose, 0);
|
$verbose, 0);
|
||||||
unlink <ma_test2_message.txt>;
|
unlink <ma_test2_message.txt>;
|
||||||
ok("$maria_exe_path/maria_chk$suffix -ssm test2", $verbose, 0);
|
ok("$maria_exe_path/maria_chk$suffix -h$tmpdir -ssm $tmpdir/test2", $verbose, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -479,33 +496,33 @@ sub run_tests_on_clrs
|
|||||||
my ($i);
|
my ($i);
|
||||||
|
|
||||||
my @t= ($NEW_TEST,
|
my @t= ($NEW_TEST,
|
||||||
"$maria_exe_path/ma_test2$suffix -s -L -K -W -P -M -T -c -b -t2 -A1",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir -s -L -K -W -P -M -T -c -b -t2 -A1",
|
||||||
"cp maria_log_control tmp",
|
"cp $tmpdir/maria_log_control $tmpdir/maria_log_control.backup",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir",
|
||||||
"$maria_exe_path/maria_chk$suffix -s -e test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -s -e $tmpdir/test2",
|
||||||
"cp tmp/maria_log_control .",
|
"mv $tmpdir/maria_log_control.backup $tmpdir/maria_log_control",
|
||||||
"rm test2.MA?",
|
"rm $tmpdir/test2.MA?",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir",
|
||||||
"$maria_exe_path/maria_chk$suffix -s -e test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -s -e $tmpdir/test2",
|
||||||
"rm test2.MA?",
|
"rm $tmpdir/test2.MA?",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/ma_test2$suffix -s -L -K -W -P -M -T -c -b -t2 -A1",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir -s -L -K -W -P -M -T -c -b -t2 -A1",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir ",
|
||||||
"$maria_exe_path/maria_chk$suffix -s -e test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -s -e $tmpdir/test2",
|
||||||
"rm test2.MA?",
|
"rm $tmpdir/test2.MA?",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir",
|
||||||
"$maria_exe_path/maria_chk$suffix -e -s test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -e -s $tmpdir/test2",
|
||||||
"rm test2.MA?",
|
"rm $tmpdir/test2.MA?",
|
||||||
$NEW_TEST,
|
$NEW_TEST,
|
||||||
"$maria_exe_path/ma_test2$suffix -s -L -K -W -P -M -T -c -b32768 -t4 -A1",
|
"$maria_exe_path/ma_test2$suffix -h$tmpdir -s -L -K -W -P -M -T -c -b32768 -t4 -A1",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -es $tmpdir/test2",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir ",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -es $tmpdir/test2",
|
||||||
"rm test2.MA?",
|
"rm $tmpdir/test2.MA?",
|
||||||
"$maria_exe_path/maria_read_log$suffix -a -s",
|
"$maria_exe_path/maria_read_log$suffix -a -s -h$tmpdir",
|
||||||
"$maria_exe_path/maria_chk$suffix -es test2",
|
"$maria_exe_path/maria_chk$suffix -h$tmpdir -es $tmpdir/test2",
|
||||||
"rm test2.MA?"
|
"rm $tmpdir/test2.MA?"
|
||||||
);
|
);
|
||||||
|
|
||||||
return &count_tests(\@t) if ($count);
|
return &count_tests(\@t) if ($count);
|
||||||
@ -550,10 +567,14 @@ sub ok
|
|||||||
|
|
||||||
if ($verbose)
|
if ($verbose)
|
||||||
{
|
{
|
||||||
print "$com ";
|
# Print command with out the long unittest/../ prefix
|
||||||
|
my $tmp;
|
||||||
|
$tmp= $com;
|
||||||
|
$tmp =~ s|^unittest/../||;
|
||||||
|
print "$tmp ";
|
||||||
|
$len= length($tmp);
|
||||||
}
|
}
|
||||||
$output= `$com 2>&1`;
|
$output= `$com 2>&1`;
|
||||||
$len= length($com);
|
|
||||||
if ($verbose)
|
if ($verbose)
|
||||||
{
|
{
|
||||||
print " " x (62 - $len);
|
print " " x (62 - $len);
|
||||||
@ -650,6 +671,19 @@ sub count_tests
|
|||||||
return $nr_tests;
|
return $nr_tests;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub unlink_log_files
|
||||||
|
{
|
||||||
|
unlink "$full_tmpdir/maria_log_control", "$full_tmpdir/maria_log.00000001", "$full_tmpdir/maria_log.00000002";
|
||||||
|
}
|
||||||
|
|
||||||
|
sub unlink_all_possible_tmp_files()
|
||||||
|
{
|
||||||
|
unlink_log_files();
|
||||||
|
|
||||||
|
# Unlink tmp files that may have been created when testing the test programs
|
||||||
|
unlink <$full_tmpdir/*.TMD maria_log_control maria_log.00000001 maria_log.00000002 maria_logtest1.MA? test2.MA? test3.MA?>;
|
||||||
|
}
|
||||||
|
|
||||||
####
|
####
|
||||||
#### Run a bunch of tests
|
#### Run a bunch of tests
|
||||||
#### Arguments: $t: an array of the tests
|
#### Arguments: $t: an array of the tests
|
||||||
@ -666,7 +700,7 @@ sub run_test_bunch
|
|||||||
{
|
{
|
||||||
if ($clear && @$t[$i] eq $NEW_TEST)
|
if ($clear && @$t[$i] eq $NEW_TEST)
|
||||||
{
|
{
|
||||||
unlink <maria_log.* maria_log_control>;
|
unlink_log_files();
|
||||||
}
|
}
|
||||||
if (@$t[$i] ne $NEW_TEST)
|
if (@$t[$i] ne $NEW_TEST)
|
||||||
{
|
{
|
||||||
|
@ -1076,7 +1076,7 @@ init_again:
|
|||||||
"InnoDB: Logical offset (blocks) : %ld (%#lx)\n",
|
"InnoDB: Logical offset (blocks) : %ld (%#lx)\n",
|
||||||
(byte*)chunk->mem + shm_info->frame_offset,
|
(byte*)chunk->mem + shm_info->frame_offset,
|
||||||
chunk->blocks[0].frame, frame,
|
chunk->blocks[0].frame, frame,
|
||||||
phys_offset, phys_offset,
|
(long) phys_offset, (long) phys_offset,
|
||||||
(long) logi_offset, (long) logi_offset,
|
(long) logi_offset, (long) logi_offset,
|
||||||
(long) blocks_offset, (long) blocks_offset);
|
(long) blocks_offset, (long) blocks_offset);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1224,7 +1224,7 @@ row_upd_changes_ord_field_binary(
|
|||||||
const upd_field_t* upd_field;
|
const upd_field_t* upd_field;
|
||||||
const dfield_t* dfield;
|
const dfield_t* dfield;
|
||||||
dfield_t dfield_ext;
|
dfield_t dfield_ext;
|
||||||
ulint dfield_len;
|
ulint dfield_len= 0;
|
||||||
const byte* buf;
|
const byte* buf;
|
||||||
|
|
||||||
ind_field = dict_index_get_nth_field(index, i);
|
ind_field = dict_index_get_nth_field(index, i);
|
||||||
|
@ -2723,6 +2723,7 @@ srv_master_thread(
|
|||||||
srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
|
srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
|
||||||
|
|
||||||
|
|
||||||
|
memset(&prev_flush_info, 0, sizeof(prev_flush_info));
|
||||||
mutex_enter(&kernel_mutex);
|
mutex_enter(&kernel_mutex);
|
||||||
|
|
||||||
srv_table_reserve_slot(SRV_MASTER);
|
srv_table_reserve_slot(SRV_MASTER);
|
||||||
|
Reference in New Issue
Block a user