mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Removed SCCS flag from all test cases
Changed atoll -> strtoll Extended mysql-test-run
This commit is contained in:
@@ -18,6 +18,7 @@ then
|
||||
then
|
||||
scripts/make_binary_distribution
|
||||
fi
|
||||
make test
|
||||
fi
|
||||
|
||||
exit
|
||||
|
@@ -18382,6 +18382,11 @@ CHECK TABLE test_table FAST QUICK;
|
||||
|
||||
Which only would do a quick check on the table if it wasn't closed properly.
|
||||
|
||||
@strong{NOTE:} that in some case @code{CHECK TABLE} will change the
|
||||
table! This happens if the table is marked as 'corrupted' or 'not
|
||||
closed properly' but @code{CHECK TABLE} didn't find any problems in the
|
||||
table. In this case @code{CHECK TABLE} will mark the table as ok.
|
||||
|
||||
If a table is corrupted, then it's most likely that the problem is in
|
||||
the indexes and not in the data part. All of the above check types
|
||||
checks the indexes throughly and should thus find most errors.
|
||||
|
@@ -152,10 +152,16 @@ MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --u
|
||||
GDB_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master
|
||||
GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave
|
||||
|
||||
USE_RUNNING_SERVER=1
|
||||
DO_GCOV=""
|
||||
DO_GDB=""
|
||||
DO_DDD=""
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--force ) FORCE=1 ;;
|
||||
--force ) FORCE=1 ;;
|
||||
--record ) RECORD=1 ;;
|
||||
--local) USE_RUNNING_SERVER="" ;;
|
||||
--gcov )
|
||||
if [ x$BINARY_DIST = x1 ] ; then
|
||||
$ECHO "Cannot do coverage test without the source - please use source dist"
|
||||
@@ -186,6 +192,20 @@ while test $# -gt 0; do
|
||||
shift
|
||||
done
|
||||
|
||||
# If we should run all tests cases, we will use a local server for that
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
USE_RUNNING_SERVER=""
|
||||
fi
|
||||
|
||||
if [ -w / ]
|
||||
then
|
||||
# We are running as root; We need to add the --root argument
|
||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --user=root"
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --user=root"
|
||||
fi
|
||||
|
||||
#++
|
||||
# Function Definitions
|
||||
#--
|
||||
@@ -368,7 +388,8 @@ stop_slave ()
|
||||
if [ x$SLAVE_RUNNING = x1 ]
|
||||
then
|
||||
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown
|
||||
if [ $? != 0 ] ; then # try harder!
|
||||
if [ $? != 0 ] && [ -f $SLAVE_MYPID ]
|
||||
then # try harder!
|
||||
$ECHO "slave not cooperating with mysqladmin, will try manual kill"
|
||||
kill `$CAT $SLAVE_MYPID`
|
||||
sleep 2
|
||||
@@ -390,7 +411,8 @@ stop_master ()
|
||||
if [ x$MASTER_RUNNING = x1 ]
|
||||
then
|
||||
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown
|
||||
if [ $? != 0 ] ; then # try harder!
|
||||
if [ $? != 0 ] && [ -f $MASTER_MYPID ]
|
||||
then # try harder!
|
||||
$ECHO "master not cooperating with mysqladmin, will try manual kill"
|
||||
kill `$CAT $MASTER_MYPID`
|
||||
sleep 2
|
||||
@@ -565,7 +587,7 @@ mysql_install_db
|
||||
|
||||
#do not automagically start deamons if we are in gdb or running only one test
|
||||
#case
|
||||
if [ -z "$DO_GDB" ] && [ -z "$1" ] && [ -z "$DO_DDD" ]
|
||||
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
|
||||
then
|
||||
mysql_start
|
||||
fi
|
||||
@@ -590,7 +612,7 @@ then
|
||||
done
|
||||
fi
|
||||
else
|
||||
tname=`$BASENAME $1 .test`
|
||||
tname=`$BASENAME $1 .test`
|
||||
tf=$TESTDIR/$tname.$TESTSUFFIX
|
||||
if [ -f $tf ] ; then
|
||||
run_testcase $tf
|
||||
@@ -604,7 +626,7 @@ $ECHO
|
||||
|
||||
$RM -f $TIMEFILE
|
||||
|
||||
if [ -z "$DO_GDB" ] && [ -z "$DO_DDD" ]
|
||||
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
|
||||
then
|
||||
mysql_stop
|
||||
fi
|
||||
|
@@ -62,12 +62,12 @@ static struct option long_options[] =
|
||||
void sql_print_error(const char *format,...);
|
||||
|
||||
static bool short_form = 0;
|
||||
static longlong offset = 0;
|
||||
static ulonglong offset = 0;
|
||||
static const char* host = "localhost";
|
||||
static int port = MYSQL_PORT;
|
||||
static const char* user = "test";
|
||||
static const char* pass = "";
|
||||
static longlong position = 0;
|
||||
static ulonglong position = 0;
|
||||
static bool use_remote = 0;
|
||||
static short binlog_flags = 0;
|
||||
static MYSQL* mysql = NULL;
|
||||
@@ -166,11 +166,11 @@ static int parse_args(int *argc, char*** argv)
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
offset = atoll(optarg);
|
||||
offset = strtoull(optarg,(char**) 0, 10);
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
position = atoll(optarg);
|
||||
position = strtoull(optarg,(char**) 0, 10);
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
@@ -312,7 +312,7 @@ static void dump_local_log_entries(const char* logname)
|
||||
{
|
||||
File fd = -1;
|
||||
IO_CACHE cache,*file= &cache;
|
||||
int rec_count = 0;
|
||||
ulonglong rec_count = 0;
|
||||
|
||||
if (logname && logname[0] != '-')
|
||||
{
|
||||
@@ -332,7 +332,7 @@ static void dump_local_log_entries(const char* logname)
|
||||
/* skip 'position' characters from stdout */
|
||||
byte buff[IO_SIZE];
|
||||
my_off_t length,tmp;
|
||||
for (length=position ; length > 0 ; length-=tmp)
|
||||
for (length= (my_off_t) position ; length > 0 ; length-=tmp)
|
||||
{
|
||||
tmp=min(length,sizeof(buff));
|
||||
if (my_b_read(file,buff, (uint) tmp))
|
||||
@@ -354,13 +354,14 @@ static void dump_local_log_entries(const char* logname)
|
||||
|
||||
while(1)
|
||||
{
|
||||
char llbuff[21];
|
||||
Log_event* ev = Log_event::read_log_event(file, 0);
|
||||
if (!ev)
|
||||
{
|
||||
if (file->error)
|
||||
die("Could not read entry at offset %ld : Error in log format or \
|
||||
read error",
|
||||
my_b_tell(file));
|
||||
die("\
|
||||
Could not read entry at offset %s : Error in log format or read error",
|
||||
llstr(my_b_tell(file),llbuff));
|
||||
// file->error == 0 means EOF, that's OK, we break in this case
|
||||
break;
|
||||
}
|
||||
|
@@ -526,7 +526,7 @@ int init_master_info(MASTER_INFO* mi)
|
||||
return 1;
|
||||
}
|
||||
|
||||
mi->pos = atoll(buf);
|
||||
mi->pos = strtoull(buf,(char**) 0, 10);
|
||||
mi->fd = fd;
|
||||
if(init_strvar_from_file(mi->host, sizeof(mi->host), &mi->file,
|
||||
master_host) ||
|
||||
|
Reference in New Issue
Block a user