summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2001-01-16 12:38:58 +0200
committerunknown <monty@donna.mysql.com>2001-01-16 12:38:58 +0200
commit64289e22b6e234a9888869264d01160d241e0548 (patch)
treecdb2dc82be698822213f193e98907ad9e7801eac
parent0365e2d3dceccb1dc3727336e1596869e3c1a180 (diff)
downloadmariadb-git-64289e22b6e234a9888869264d01160d241e0548.tar.gz
Added ORDER BY to test case to make the result comparable
Docs/manual.texi: Added replication information mysql-test/mysql-test-run.sh: Don't start master when we are running a test against the running server mysql-test/r/fulltext_cache.result: Added sort to make the result comparable mysql-test/t/fulltext_cache.test: Added sort to make the result comparable
-rw-r--r--Docs/manual.texi19
-rw-r--r--mysql-test/mysql-test-run.sh81
-rw-r--r--mysql-test/r/fulltext_cache.result4
-rw-r--r--mysql-test/t/fulltext_cache.test6
4 files changed, 63 insertions, 47 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 6610761a650..81d0a5708c4 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -25633,6 +25633,10 @@ database should be done through the master!
On older servers one can use the update log to do simple replication.
@xref{Log Replication}.
+Another benefit of using replication is that one can get live backups of
+the system by doing a backup on a slave instead of doing it on the
+master. @xref{Backup}.
+
@cindex master-slave setup
@node Replication Implementation, Replication HOWTO, Replication Intro, Replication
@section Replication Implementation Overview
@@ -26090,7 +26094,7 @@ last log on the list), backup all the logs you are about to delete
@end multitable
@node Replication FAQ, , Replication SQL, Replication
-@section Replication FAQ
+@section Frequently Asked Questions about replication
@cindex @code{Binlog_Dump}
@strong{Q}: Why do I sometimes see more than one @code{Binlog_Dump} thread on
@@ -26153,7 +26157,6 @@ of plug and play. Of course, as one joke goes, plug and play works
usually only 50% of the time - just the plug part. We hope to do much
better than that, though.
-
@cindex replication, two-way
@strong{Q}: What issues should I be aware of when setting up two-way
replication?
@@ -26192,6 +26195,11 @@ offset by network delays.
@strong{A}: You should set up one server as the master, and direct all
writes to it, and configure as many slaves as you have the money and
rackspace for, distributing the reads among the master and the slaves.
+You can also start the slaves with @code{--skip-bdb},
+@code{--low-priority-updates} and @code{--delay-key-write-for-all-tables}
+to get speed improvements for the slave. In this case the slave will
+use non-transactional @code{MyISAM} tables instead of @code{BDB} tables
+to get more speed.
@strong{Q}: What should I do to prepare my client code to use
performance-enhancing replication?
@@ -34017,7 +34025,8 @@ relevant tables followed by @code{FLUSH TABLES} for the tables.
@xref{FLUSH, , @code{FLUSH}}.
You only need a read lock; this allows other threads to continue to
query the tables while you are making a copy of the files in the
-database directory.
+database directory. The @code{FLUSH TABLE} is needed to ensure that
+the all active index pages is written to disk before you start the backup.
If you want to make a SQL level backup of a table, you can use
@code{SELECT INTO OUTFILE} or @code{BACKUP
@@ -34083,6 +34092,10 @@ FROM tbl_name} and restore with @code{LOAD DATA INFILE 'file_name' REPLACE
to be replaced with new ones when a new record duplicates an old record on
a unique key value.
+If you get performance problems in making backups on your system, you can
+solve this by setting up replication and do the backups on the slave
+instead of on the master. @xref{Replication Intro}.
+
@cindex update log
@cindex files, update log
@node Update log, Binary log, Backup, Common problems
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 3cdfa836014..0bc6d5598c8 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -93,6 +93,7 @@ SLAVE_RUNNING=0
SLAVE_MYPORT=9307
NO_SLAVE=0
+EXTRA_MASTER_OPT=""
EXTRA_MYSQL_TEST_OPT=""
USE_RUNNING_SERVER=1
DO_GCOV=""
@@ -505,49 +506,51 @@ run_testcase ()
return
fi
- if [ -f $master_opt_file ] ;
+ if [ -z "$USE_RUNNING_SERVER" ] ;
then
- EXTRA_MASTER_OPT=`$CAT $master_opt_file`
- stop_master
- start_master
- else
- if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] ;
- then
- EXTRA_MASTER_OPT=""
- stop_master
- start_master
- fi
- fi
- do_slave_restart=0
+ if [ -f $master_opt_file ] ;
+ then
+ EXTRA_MASTER_OPT=`$CAT $master_opt_file`
+ stop_master
+ start_master
+ else
+ if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] ;
+ then
+ EXTRA_MASTER_OPT=""
+ stop_master
+ start_master
+ fi
+ fi
+ do_slave_restart=0
- if [ -f $slave_opt_file ] ;
- then
- EXTRA_SLAVE_OPT=`$CAT $slave_opt_file`
- do_slave_restart=1
- else
- if [ ! -z "$EXTRA_SLAVE_OPT" ] || [ x$SLAVE_RUNNING != x1 ] ;
- then
- EXTRA_SLAVE_OPT=""
- do_slave_restart=1
- fi
- fi
-
- if [ -f $slave_master_info_file ] ; then
- SLAVE_MASTER_INFO=`$CAT $slave_master_info_file`
- do_slave_restart=1
- else
- if [ ! -z "$SLAVE_MASTER_INFO" ] || [ x$SLAVE_RUNNING != x1 ] ;
- then
- SLAVE_MASTER_INFO=""
- do_slave_restart=1
- fi
- fi
+ if [ -f $slave_opt_file ] ;
+ then
+ EXTRA_SLAVE_OPT=`$CAT $slave_opt_file`
+ do_slave_restart=1
+ else
+ if [ ! -z "$EXTRA_SLAVE_OPT" ] || [ x$SLAVE_RUNNING != x1 ] ;
+ then
+ EXTRA_SLAVE_OPT=""
+ do_slave_restart=1
+ fi
+ fi
- if [ x$do_slave_restart = x1 ] ; then
- stop_slave
- start_slave
+ if [ -f $slave_master_info_file ] ; then
+ SLAVE_MASTER_INFO=`$CAT $slave_master_info_file`
+ do_slave_restart=1
+ else
+ if [ ! -z "$SLAVE_MASTER_INFO" ] || [ x$SLAVE_RUNNING != x1 ] ;
+ then
+ SLAVE_MASTER_INFO=""
+ do_slave_restart=1
+ fi
+ fi
+
+ if [ x$do_slave_restart = x1 ] ; then
+ stop_slave
+ start_slave
+ fi
fi
-
cd $MYSQL_TEST_DIR
if [ -f $tf ] ; then
diff --git a/mysql-test/r/fulltext_cache.result b/mysql-test/r/fulltext_cache.result
index 347e53f37e1..b2423816a86 100644
--- a/mysql-test/r/fulltext_cache.result
+++ b/mysql-test/r/fulltext_cache.result
@@ -12,7 +12,7 @@ aaaaaaaaa dsaass de sushi 1 0
aaaaaaaaa dsaass de Bolo de Chocolate 2 0
aaaaaaaaa dsaass de Feijoada 3 0
aaaaaaaaa dsaass de Mousse de Chocolate 4 0
-aaaaaaaaa dsaass de Bife 7 0
-aaaaaaaaa dsaass de Pizza de Salmao 8 0
ssde df s fsda sad er um copo de Vodka 5 0
ssde df s fsda sad er um chocolate Snickers 6 0
+aaaaaaaaa dsaass de Bife 7 0
+aaaaaaaaa dsaass de Pizza de Salmao 8 0
diff --git a/mysql-test/t/fulltext_cache.test b/mysql-test/t/fulltext_cache.test
index c6c76ee9182..fc5f0e266b3 100644
--- a/mysql-test/t/fulltext_cache.test
+++ b/mysql-test/t/fulltext_cache.test
@@ -2,6 +2,7 @@
# Bugreport due to Roy Nasser <roy@vem.ca>
#
+drop table if exists t1, t2;
CREATE TABLE t1 (
id int(10) unsigned NOT NULL auto_increment,
q varchar(255) default NULL,
@@ -26,10 +27,9 @@ INSERT INTO t2 VALUES (7,1,'Bife');
INSERT INTO t2 VALUES (8,1,'Pizza de Salmao');
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi') as x FROM t1, t2
-WHERE (t2.id2 = t1.id) ORDER BY x DESC;
+WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi') as x FROM t2, t1
-WHERE (t2.id2 = t1.id) ORDER BY x DESC;
+WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
drop table t1, t2;
-