summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-08-21 22:04:22 +0300
committerunknown <monty@hundin.mysql.fi>2002-08-21 22:04:22 +0300
commit87f9ad3724a8644de4ba10f6247fe194a3d08457 (patch)
tree75f29bea26c7fd21a45f22fd906c7a1545aaee91 /mysql-test
parent457172d99256e68a93ab69eecbef23a3db7ef1c4 (diff)
downloadmariadb-git-87f9ad3724a8644de4ba10f6247fe194a3d08457.tar.gz
Use our version of RWLOCKS on UNIXWARE 7
More DBUG info for replication Better error messages from replication Fixed bug in replication code when connecting to 'localhost' (time was not released properly) Block ALARM signal on Linux for signal handler thread (Fixes problem with running mysqld with --debug) Removed warning when setting an AUTO_INCREMENT field to NULL Build-tools/Do-compile: Always run test with --warnings during build Docs/manual.texi: Changelog configure.in: Use our version of RWLOCKS on UNIXWARE 7 include/my_pthread.h: Use our version of RWLOCKS on UNIXWARE 7 include/mysql_version.h.in: Fixed warning when compiling embedded server include/mysqld_error.h: New error messages libmysql/libmysql.c: Give connect error message on reconnect if it fails. Fixed possible buffer overflow in expand_error() Added error messages for some error conditions. mysql-test/mysql-test-run.sh: Portability fixes: - Search after 'time' in path. - Search after mysqld in libexec - Remove end / when doing rm -r (fix for BSD) Clean up skip_test handling. mysql-test/r/rpl_empty_master_crash.result: New results mysql-test/t/rpl_empty_master_crash.test: Extended test mysys/mf_iocache.c: Remember file position on failed read. mysys/mf_iocache2.c: Fixed bug in filelength() call. mysys/thr_alarm.c: Made alarm handling more threadsafe when use with DBUG. mysys/thr_mutex.c: More debug info sql/log_event.cc: More DBUG_PRINT statements. sql/mini_client.cc: Better error reporting on failures. Return connect error on reconnect failure (instead of SERVER_GONE_ERROR) Fixed critical bug in alarm handling on connect (could leave an alarm event on indefinitely) sql/mysql_priv.h: Fixed arguments to mysql_binlog_send() sql/mysqld.cc: Block ALARM signal on Linux for signal handler thread (Fixes problem with running mysqld with --debug) sql/net_pkg.cc: Removed dead code sql/net_serv.cc: Ensure that last_errno is set in net_real_write() sql/repl_failsafe.cc: Code cleanup. Better error handling. sql/share/czech/errmsg.txt: New error messages. sql/share/danish/errmsg.txt: New error messages. sql/share/dutch/errmsg.txt: New error messages. sql/share/english/errmsg.txt: New error messages. sql/share/estonian/errmsg.txt: New error messages. sql/share/french/errmsg.txt: New error messages. sql/share/german/errmsg.txt: New error messages. sql/share/greek/errmsg.txt: New error messages. sql/share/hungarian/errmsg.txt: New error messages. sql/share/italian/errmsg.txt: New error messages. sql/share/japanese/errmsg.txt: New error messages. sql/share/korean/errmsg.txt: New error messages. sql/share/norwegian-ny/errmsg.txt: New error messages. sql/share/norwegian/errmsg.txt: New error messages. sql/share/polish/errmsg.txt: New error messages. sql/share/portuguese/errmsg.txt: New error messages. mysql-test/r/rpl_log_pos.result: Updated results mysql-test/t/rpl_log_pos.test: Added 'sleep' commands to make tests repeatable. sql/share/romanian/errmsg.txt: New error messages. sql/share/russian/errmsg.txt: New error messages. sql/share/slovak/errmsg.txt: New error messages. sql/share/spanish/errmsg.txt: New error messages. sql/share/swedish/errmsg.txt: New error messages. sql/share/ukrainian/errmsg.txt: New error messages. sql/slave.cc: Code optimization and cleanup. More DBUG statements. Better cleanup if start slave fails. Better error messages from 'fetch_master_table' Thread safer handling of 'wait_for_pos' sql/slave.h: Better handling of wait_for_pos sql/sql_load.cc: Removed warning when setting an AUTO_INCREMENT field to NULL sql/sql_parse.cc: Fixed calling of function that has changed. sql/sql_repl.cc: More DBUG statements Give a proper error number from mysql_binlog_send() so that we know when we have to abort slaves.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh38
-rw-r--r--mysql-test/r/rpl_empty_master_crash.result4
-rw-r--r--mysql-test/r/rpl_log_pos.result (renamed from mysql-test/r/rpl000014.result)18
-rw-r--r--mysql-test/t/rpl_empty_master_crash.test6
-rw-r--r--mysql-test/t/rpl_log_pos.test (renamed from mysql-test/t/rpl000014.test)19
5 files changed, 57 insertions, 28 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index a4e9b0ea08a..770a827f103 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -93,7 +93,7 @@ FIND=find
GCOV=`which gcov | $SED q`
PRINTF=printf
RM=rm
-TIME=time
+TIME=`which time | $SED q`
TR=tr
XARGS=`which xargs | $SED q`
@@ -391,7 +391,12 @@ if [ x$SOURCE_DIST = x1 ] ; then
CHARSETSDIR="$BASEDIR/sql/share/charsets"
INSTALL_DB="./install_test_db"
else
- MYSQLD="$BASEDIR/bin/mysqld"
+ if test -x "$BASEDIR/libexec/mysqld"
+ then
+ MYSQLD="$BASEDIR/libexec/mysqld"
+ else
+ MYSQLD="$BASEDIR/bin/mysqld"
+ fi
MYSQL_TEST="$BASEDIR/bin/mysqltest"
MYSQLADMIN="$BASEDIR/bin/mysqladmin"
MYSQL_MANAGER="$BASEDIR/bin/mysqlmanager"
@@ -530,6 +535,18 @@ total_inc () {
TOT_TEST=`$EXPR $TOT_TEST + 1`
}
+
+skip_test() {
+ USERT=" ...."
+ SYST=" ...."
+ REALT=" ...."
+ timestr="$USERT $SYST $REALT"
+ pname=`$ECHO "$1 "|$CUT -c 1-24`
+ RES="$pname $timestr"
+ skip_inc
+ $ECHO "$RES$RES_SPACE [ skipped ]"
+}
+
report_stats () {
if [ $TOT_FAIL = 0 ]; then
$ECHO "All $TOT_TEST tests were successful."
@@ -567,7 +584,7 @@ mysql_install_db () {
for slave_num in 1 2 ;
do
- $RM -rf var/slave$slave_num-data/
+ $RM -rf var/slave$slave_num-data
mkdir -p var/slave$slave_num-data/mysql
mkdir -p var/slave$slave_num-data/test
cp var/slave-data/mysql/* var/slave$slave_num-data/mysql
@@ -1026,7 +1043,8 @@ run_testcase ()
SKIP_THIS_TEST=`$EXPR \( $tname : "$SKIP_TEST" \) != 0`
if [ x$SKIP_THIS_TEST = x1 ] ;
then
- return;
+ skip_test $tname;
+ return;
fi
fi
@@ -1034,21 +1052,15 @@ run_testcase ()
DO_THIS_TEST=`$EXPR \( $tname : "$DO_TEST" \) != 0`
if [ x$DO_THIS_TEST = x0 ] ;
then
- return;
+ skip_test $tname;
+ return;
fi
fi
if [ x${NO_SLAVE}x$SKIP_SLAVE = x1x0 ] ;
then
- USERT=" ...."
- SYST=" ...."
- REALT=" ...."
- timestr="$USERT $SYST $REALT"
- pname=`$ECHO "$tname "|$CUT -c 1-24`
- RES="$pname $timestr"
- skip_inc
- $ECHO "$RES$RES_SPACE [ skipped ]"
+ skip_test $tname;
return
fi
diff --git a/mysql-test/r/rpl_empty_master_crash.result b/mysql-test/r/rpl_empty_master_crash.result
index 5a82df19ef5..19e2bf28dcd 100644
--- a/mysql-test/r/rpl_empty_master_crash.result
+++ b/mysql-test/r/rpl_empty_master_crash.result
@@ -8,4 +8,6 @@ drop table if exists t1;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
load table t1 from master;
-Error in fetch_master_table
+Error connecting to master: Master is not configured
+load table t1 from master;
+Error from master: 'Table 'test.t1' doesn't exist'
diff --git a/mysql-test/r/rpl000014.result b/mysql-test/r/rpl_log_pos.result
index 8e0dfc3a117..6883da76180 100644
--- a/mysql-test/r/rpl000014.result
+++ b/mysql-test/r/rpl_log_pos.result
@@ -19,22 +19,24 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo
slave start;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 73 slave-relay-bin.001 4 master-bin.001 Yes Yes 0 0 73 4
+127.0.0.1 root MASTER_PORT 1 master-bin.001 73 slave-relay-bin.001 4 master-bin.001 No Yes 0 0 73 4
change master to master_log_pos=173;
+slave start;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 173 slave-relay-bin.001 4 master-bin.001 Yes Yes 0 0 173 4
+127.0.0.1 root MASTER_PORT 1 master-bin.001 173 slave-relay-bin.001 4 master-bin.001 No Yes 0 0 173 4
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
-create table if not exists foo(n int);
-drop table if exists foo;
-create table foo (n int);
-insert into foo values (1),(2),(3);
+create table if not exists t1 (n int);
+drop table if exists t1;
+create table t1 (n int);
+insert into t1 values (1),(2),(3);
change master to master_log_pos=79;
-select * from foo;
+slave start;
+select * from t1;
n
1
2
3
-drop table foo;
+drop table t1;
diff --git a/mysql-test/t/rpl_empty_master_crash.test b/mysql-test/t/rpl_empty_master_crash.test
index 7923a29dcf1..afa76ce10bb 100644
--- a/mysql-test/t/rpl_empty_master_crash.test
+++ b/mysql-test/t/rpl_empty_master_crash.test
@@ -1,5 +1,11 @@
source include/master-slave.inc;
drop table if exists t1;
show slave status;
+#
+# Load table should not succeed on the master as this is not a slave
+#
--error 1218
load table t1 from master;
+connection slave;
+--error 1188
+load table t1 from master;
diff --git a/mysql-test/t/rpl000014.test b/mysql-test/t/rpl_log_pos.test
index 0b75314ee6a..cce52dc5daa 100644
--- a/mysql-test/t/rpl000014.test
+++ b/mysql-test/t/rpl_log_pos.test
@@ -1,3 +1,6 @@
+#
+# Testing of setting slave to wrong log position with master_log_pos
+#
source include/master-slave.inc;
show master status;
save_master_pos;
@@ -12,24 +15,28 @@ change master to master_log_pos=73;
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
show slave status;
slave start;
+sleep 2;
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
show slave status;
change master to master_log_pos=173;
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
+slave start;
+sleep 2;
show slave status;
connection master;
show master status;
-create table if not exists foo(n int);
-drop table if exists foo;
-create table foo (n int);
-insert into foo values (1),(2),(3);
+create table if not exists t1 (n int);
+drop table if exists t1;
+create table t1 (n int);
+insert into t1 values (1),(2),(3);
save_master_pos;
connection slave;
change master to master_log_pos=79;
+slave start;
sync_with_master;
-select * from foo;
+select * from t1;
connection master;
-drop table foo;
+drop table t1;
save_master_pos;
connection slave;
sync_with_master;