Commit 6a414c5d authored by unknown's avatar unknown

Removed SCCS flag from all test cases

Changed atoll -> strtoll
Extended mysql-test-run


mysql-test/t/alter_table.test:
  Turn off SCCS flag
mysql-test/t/analyse.test:
  Turn off SCCS flag
mysql-test/t/auto_increment.test:
  Turn off SCCS flag
mysql-test/t/bdb.test:
  Turn off SCCS flag
mysql-test/t/bigint.test:
  Turn off SCCS flag
mysql-test/t/binary.test:
  Turn off SCCS flag
mysql-test/t/case.test:
  Turn off SCCS flag
mysql-test/t/comments.test:
  Turn off SCCS flag
mysql-test/t/compare.test:
  Turn off SCCS flag
mysql-test/t/count_distinct.test:
  Turn off SCCS flag
mysql-test/t/create.test:
  Turn off SCCS flag
mysql-test/t/delayed.test:
  Turn off SCCS flag
mysql-test/t/delete.test:
  Turn off SCCS flag
mysql-test/t/distinct.test:
  Turn off SCCS flag
mysql-test/t/empty_table.test:
  Turn off SCCS flag
mysql-test/t/err000001.test:
  Turn off SCCS flag
mysql-test/t/explain.test:
  Turn off SCCS flag
mysql-test/t/flush_table.test:
  Turn off SCCS flag
mysql-test/t/foreign_key.test:
  Turn off SCCS flag
mysql-test/t/fulltext.test:
  Turn off SCCS flag
mysql-test/t/fulltext_multi.test:
  Turn off SCCS flag
mysql-test/t/fulltext_order_by.test:
  Turn off SCCS flag
mysql-test/t/func_crypt.test:
  Turn off SCCS flag
mysql-test/t/func_date_add.test:
  Turn off SCCS flag
mysql-test/t/func_equal.test:
  Turn off SCCS flag
mysql-test/t/func_group.test:
  Turn off SCCS flag
mysql-test/t/func_in.test:
  Turn off SCCS flag
mysql-test/t/func_like.test:
  Turn off SCCS flag
mysql-test/t/func_math.test:
  Turn off SCCS flag
mysql-test/t/func_misc.test:
  Turn off SCCS flag
mysql-test/t/func_op.test:
  Turn off SCCS flag
mysql-test/t/func_regexp.test:
  Turn off SCCS flag
mysql-test/t/func_set.test:
  Turn off SCCS flag
mysql-test/t/func_str.test:
  Turn off SCCS flag
mysql-test/t/func_system.test:
  Turn off SCCS flag
mysql-test/t/func_test.test:
  Turn off SCCS flag
mysql-test/t/func_time.test:
  Turn off SCCS flag
mysql-test/t/func_timestamp.test:
  Turn off SCCS flag
mysql-test/t/group_by.test:
  Turn off SCCS flag
mysql-test/t/heap.test:
  Turn off SCCS flag
mysql-test/t/ins000001.test:
  Turn off SCCS flag
mysql-test/t/insert.test:
  Turn off SCCS flag
mysql-test/t/insert_select.test:
  Turn off SCCS flag
mysql-test/t/join.test:
  Turn off SCCS flag
mysql-test/t/join_outer.test:
  Turn off SCCS flag
mysql-test/t/key.test:
  Turn off SCCS flag
mysql-test/t/key_diff.test:
  Turn off SCCS flag
mysql-test/t/key_primary.test:
  Turn off SCCS flag
mysql-test/t/keywords.test:
  Turn off SCCS flag
mysql-test/t/limit.test:
  Turn off SCCS flag
mysql-test/t/merge.test:
  Turn off SCCS flag
mysql-test/t/null.test:
  Turn off SCCS flag
mysql-test/t/null_key.test:
  Turn off SCCS flag
mysql-test/t/odbc.test:
  Turn off SCCS flag
mysql-test/t/order_by.test:
  Turn off SCCS flag
mysql-test/t/outfile.test:
  Turn off SCCS flag
mysql-test/t/raid.test:
  Turn off SCCS flag
mysql-test/t/range.test:
  Turn off SCCS flag
mysql-test/t/rename.test:
  Turn off SCCS flag
mysql-test/t/replace.test:
  Turn off SCCS flag
mysql-test/t/rollback.test:
  Turn off SCCS flag
mysql-test/t/rpl000001.test:
  Turn off SCCS flag
mysql-test/t/rpl000002.test:
  Turn off SCCS flag
mysql-test/t/rpl000003.test:
  Turn off SCCS flag
mysql-test/t/rpl000004.test:
  Turn off SCCS flag
mysql-test/t/rpl000005.test:
  Turn off SCCS flag
mysql-test/t/rpl000006.test:
  Turn off SCCS flag
mysql-test/t/rpl000007.test:
  Turn off SCCS flag
mysql-test/t/rpl000008.test:
  Turn off SCCS flag
mysql-test/t/rpl000009.test:
  Turn off SCCS flag
mysql-test/t/rpl000010.test:
  Turn off SCCS flag
mysql-test/t/rpl000011.test:
  Turn off SCCS flag
mysql-test/t/rpl000012.test:
  Turn off SCCS flag
mysql-test/t/rpl000013.test:
  Turn off SCCS flag
mysql-test/t/rpl000014.test:
  Turn off SCCS flag
mysql-test/t/rpl000015.test:
  Turn off SCCS flag
mysql-test/t/rpl000016.test:
  Turn off SCCS flag
mysql-test/t/sel000001.test:
  Turn off SCCS flag
mysql-test/t/sel000002.test:
  Turn off SCCS flag
mysql-test/t/sel000003.test:
  Turn off SCCS flag
mysql-test/t/sel000031.test:
  Turn off SCCS flag
mysql-test/t/sel000032.test:
  Turn off SCCS flag
mysql-test/t/sel000033.test:
  Turn off SCCS flag
mysql-test/t/sel000100.test:
  Turn off SCCS flag
mysql-test/t/select.test:
  Turn off SCCS flag
mysql-test/t/select_safe.test:
  Turn off SCCS flag
mysql-test/t/show_check.test:
  Turn off SCCS flag
mysql-test/t/shw000001.test:
  Turn off SCCS flag
mysql-test/t/tablelock.test:
  Turn off SCCS flag
mysql-test/t/temp_table.test:
  Turn off SCCS flag
mysql-test/t/truncate.test:
  Turn off SCCS flag
mysql-test/t/type_blob.test:
  Turn off SCCS flag
mysql-test/t/type_date.test:
  Turn off SCCS flag
mysql-test/t/type_datetime.test:
  Turn off SCCS flag
mysql-test/t/type_enum.test:
  Turn off SCCS flag
mysql-test/t/type_float.test:
  Turn off SCCS flag
mysql-test/t/type_ranges.test:
  Turn off SCCS flag
mysql-test/t/type_time.test:
  Turn off SCCS flag
mysql-test/t/type_timestamp.test:
  Turn off SCCS flag
mysql-test/t/type_uint.test:
  Turn off SCCS flag
mysql-test/t/type_year.test:
  Turn off SCCS flag
mysql-test/t/update.test:
  Turn off SCCS flag
mysql-test/t/varbinary.test:
  Turn off SCCS flag
mysql-test/t/variables.test:
  Turn off SCCS flag
mysql-test/t/warnings.test:
  Turn off SCCS flag
BUILD/compile-alpha-cxx:
  Added making of test
Docs/manual.texi:
  Added more documentation to CHECK table
mysql-test/mysql-test-run.sh:
  Added --local and checking if we are running as root
sql/mysqlbinlog.cc:
  Changed atoll -> strtoll
sql/slave.cc:
  Changed atoll -> strtoll
parent 7772873a
...@@ -18,6 +18,7 @@ then ...@@ -18,6 +18,7 @@ then
then then
scripts/make_binary_distribution scripts/make_binary_distribution
fi fi
make test
fi fi
exit exit
......
...@@ -18382,6 +18382,11 @@ CHECK TABLE test_table FAST QUICK; ...@@ -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. 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 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 the indexes and not in the data part. All of the above check types
checks the indexes throughly and should thus find most errors. 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 ...@@ -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_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master
GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave
USE_RUNNING_SERVER=1
DO_GCOV=""
DO_GDB=""
DO_DDD=""
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
--force ) FORCE=1 ;; --force ) FORCE=1 ;;
--record ) RECORD=1 ;; --record ) RECORD=1 ;;
--local) USE_RUNNING_SERVER="" ;;
--gcov ) --gcov )
if [ x$BINARY_DIST = x1 ] ; then if [ x$BINARY_DIST = x1 ] ; then
$ECHO "Cannot do coverage test without the source - please use source dist" $ECHO "Cannot do coverage test without the source - please use source dist"
...@@ -186,6 +192,20 @@ while test $# -gt 0; do ...@@ -186,6 +192,20 @@ while test $# -gt 0; do
shift shift
done 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 # Function Definitions
#-- #--
...@@ -368,7 +388,8 @@ stop_slave () ...@@ -368,7 +388,8 @@ stop_slave ()
if [ x$SLAVE_RUNNING = x1 ] if [ x$SLAVE_RUNNING = x1 ]
then then
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown $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" $ECHO "slave not cooperating with mysqladmin, will try manual kill"
kill `$CAT $SLAVE_MYPID` kill `$CAT $SLAVE_MYPID`
sleep 2 sleep 2
...@@ -390,7 +411,8 @@ stop_master () ...@@ -390,7 +411,8 @@ stop_master ()
if [ x$MASTER_RUNNING = x1 ] if [ x$MASTER_RUNNING = x1 ]
then then
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown $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" $ECHO "master not cooperating with mysqladmin, will try manual kill"
kill `$CAT $MASTER_MYPID` kill `$CAT $MASTER_MYPID`
sleep 2 sleep 2
...@@ -565,7 +587,7 @@ mysql_install_db ...@@ -565,7 +587,7 @@ mysql_install_db
#do not automagically start deamons if we are in gdb or running only one test #do not automagically start deamons if we are in gdb or running only one test
#case #case
if [ -z "$DO_GDB" ] && [ -z "$1" ] && [ -z "$DO_DDD" ] if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
then then
mysql_start mysql_start
fi fi
...@@ -590,7 +612,7 @@ then ...@@ -590,7 +612,7 @@ then
done done
fi fi
else else
tname=`$BASENAME $1 .test` tname=`$BASENAME $1 .test`
tf=$TESTDIR/$tname.$TESTSUFFIX tf=$TESTDIR/$tname.$TESTSUFFIX
if [ -f $tf ] ; then if [ -f $tf ] ; then
run_testcase $tf run_testcase $tf
...@@ -604,7 +626,7 @@ $ECHO ...@@ -604,7 +626,7 @@ $ECHO
$RM -f $TIMEFILE $RM -f $TIMEFILE
if [ -z "$DO_GDB" ] && [ -z "$DO_DDD" ] if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
then then
mysql_stop mysql_stop
fi fi
......
...@@ -62,12 +62,12 @@ static struct option long_options[] = ...@@ -62,12 +62,12 @@ static struct option long_options[] =
void sql_print_error(const char *format,...); void sql_print_error(const char *format,...);
static bool short_form = 0; static bool short_form = 0;
static longlong offset = 0; static ulonglong offset = 0;
static const char* host = "localhost"; static const char* host = "localhost";
static int port = MYSQL_PORT; static int port = MYSQL_PORT;
static const char* user = "test"; static const char* user = "test";
static const char* pass = ""; static const char* pass = "";
static longlong position = 0; static ulonglong position = 0;
static bool use_remote = 0; static bool use_remote = 0;
static short binlog_flags = 0; static short binlog_flags = 0;
static MYSQL* mysql = NULL; static MYSQL* mysql = NULL;
...@@ -166,11 +166,11 @@ static int parse_args(int *argc, char*** argv) ...@@ -166,11 +166,11 @@ static int parse_args(int *argc, char*** argv)
break; break;
case 'o': case 'o':
offset = atoll(optarg); offset = strtoull(optarg,(char**) 0, 10);
break; break;
case 'j': case 'j':
position = atoll(optarg); position = strtoull(optarg,(char**) 0, 10);
break; break;
case 'h': case 'h':
...@@ -312,7 +312,7 @@ static void dump_local_log_entries(const char* logname) ...@@ -312,7 +312,7 @@ static void dump_local_log_entries(const char* logname)
{ {
File fd = -1; File fd = -1;
IO_CACHE cache,*file= &cache; IO_CACHE cache,*file= &cache;
int rec_count = 0; ulonglong rec_count = 0;
if (logname && logname[0] != '-') if (logname && logname[0] != '-')
{ {
...@@ -332,7 +332,7 @@ static void dump_local_log_entries(const char* logname) ...@@ -332,7 +332,7 @@ static void dump_local_log_entries(const char* logname)
/* skip 'position' characters from stdout */ /* skip 'position' characters from stdout */
byte buff[IO_SIZE]; byte buff[IO_SIZE];
my_off_t length,tmp; 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)); tmp=min(length,sizeof(buff));
if (my_b_read(file,buff, (uint) tmp)) if (my_b_read(file,buff, (uint) tmp))
...@@ -354,13 +354,14 @@ static void dump_local_log_entries(const char* logname) ...@@ -354,13 +354,14 @@ static void dump_local_log_entries(const char* logname)
while(1) while(1)
{ {
char llbuff[21];
Log_event* ev = Log_event::read_log_event(file, 0); Log_event* ev = Log_event::read_log_event(file, 0);
if (!ev) if (!ev)
{ {
if (file->error) if (file->error)
die("Could not read entry at offset %ld : Error in log format or \ die("\
read error", Could not read entry at offset %s : Error in log format or read error",
my_b_tell(file)); llstr(my_b_tell(file),llbuff));
// file->error == 0 means EOF, that's OK, we break in this case // file->error == 0 means EOF, that's OK, we break in this case
break; break;
} }
......
...@@ -526,7 +526,7 @@ int init_master_info(MASTER_INFO* mi) ...@@ -526,7 +526,7 @@ int init_master_info(MASTER_INFO* mi)
return 1; return 1;
} }
mi->pos = atoll(buf); mi->pos = strtoull(buf,(char**) 0, 10);
mi->fd = fd; mi->fd = fd;
if(init_strvar_from_file(mi->host, sizeof(mi->host), &mi->file, if(init_strvar_from_file(mi->host, sizeof(mi->host), &mi->file,
master_host) || master_host) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment