summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBUILD/compile-alpha-cxx1
-rw-r--r--Docs/manual.texi5
-rw-r--r--mysql-test/mysql-test-run.sh38
-rw-r--r--sql/mysqlbinlog.cc19
-rw-r--r--sql/slave.cc2
5 files changed, 47 insertions, 18 deletions
diff --git a/BUILD/compile-alpha-cxx b/BUILD/compile-alpha-cxx
index 82a9ee87cd1..2992604644b 100755
--- a/BUILD/compile-alpha-cxx
+++ b/BUILD/compile-alpha-cxx
@@ -18,6 +18,7 @@ then
then
scripts/make_binary_distribution
fi
+ make test
fi
exit
diff --git a/Docs/manual.texi b/Docs/manual.texi
index e5fe970a563..a6bb92b9ed7 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -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.
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index a031a203262..62d0e990053 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -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
@@ -544,7 +566,7 @@ run_testcase ()
$ECHO "$RES_SPACE [ skipped ]"
fi
fi
- fi
+ fi
}
@@ -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
@@ -589,8 +611,8 @@ then
run_testcase $tf
done
fi
-else
- tname=`$BASENAME $1 .test`
+else
+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
diff --git a/sql/mysqlbinlog.cc b/sql/mysqlbinlog.cc
index c2978db4883..497364ca8a4 100644
--- a/sql/mysqlbinlog.cc
+++ b/sql/mysqlbinlog.cc
@@ -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;
}
diff --git a/sql/slave.cc b/sql/slave.cc
index ffede2c3201..246dbdde93d 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -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) ||