Added ORDER BY to test case to make the result comparable
This commit is contained in:
parent
c1b5a5b00f
commit
513490e70c
@ -25633,6 +25633,10 @@ database should be done through the master!
|
|||||||
On older servers one can use the update log to do simple replication.
|
On older servers one can use the update log to do simple replication.
|
||||||
@xref{Log 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
|
@cindex master-slave setup
|
||||||
@node Replication Implementation, Replication HOWTO, Replication Intro, Replication
|
@node Replication Implementation, Replication HOWTO, Replication Intro, Replication
|
||||||
@section Replication Implementation Overview
|
@section Replication Implementation Overview
|
||||||
@ -26090,7 +26094,7 @@ last log on the list), backup all the logs you are about to delete
|
|||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
@node Replication FAQ, , Replication SQL, Replication
|
@node Replication FAQ, , Replication SQL, Replication
|
||||||
@section Replication FAQ
|
@section Frequently Asked Questions about replication
|
||||||
|
|
||||||
@cindex @code{Binlog_Dump}
|
@cindex @code{Binlog_Dump}
|
||||||
@strong{Q}: Why do I sometimes see more than one @code{Binlog_Dump} thread on
|
@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
|
usually only 50% of the time - just the plug part. We hope to do much
|
||||||
better than that, though.
|
better than that, though.
|
||||||
|
|
||||||
|
|
||||||
@cindex replication, two-way
|
@cindex replication, two-way
|
||||||
@strong{Q}: What issues should I be aware of when setting up two-way
|
@strong{Q}: What issues should I be aware of when setting up two-way
|
||||||
replication?
|
replication?
|
||||||
@ -26192,6 +26195,11 @@ offset by network delays.
|
|||||||
@strong{A}: You should set up one server as the master, and direct all
|
@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
|
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.
|
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
|
@strong{Q}: What should I do to prepare my client code to use
|
||||||
performance-enhancing replication?
|
performance-enhancing replication?
|
||||||
@ -34017,7 +34025,8 @@ relevant tables followed by @code{FLUSH TABLES} for the tables.
|
|||||||
@xref{FLUSH, , @code{FLUSH}}.
|
@xref{FLUSH, , @code{FLUSH}}.
|
||||||
You only need a read lock; this allows other threads to continue to
|
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
|
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
|
If you want to make a SQL level backup of a table, you can use
|
||||||
@code{SELECT INTO OUTFILE} or @code{BACKUP
|
@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
|
to be replaced with new ones when a new record duplicates an old record on
|
||||||
a unique key value.
|
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 update log
|
||||||
@cindex files, update log
|
@cindex files, update log
|
||||||
@node Update log, Binary log, Backup, Common problems
|
@node Update log, Binary log, Backup, Common problems
|
||||||
|
@ -93,6 +93,7 @@ SLAVE_RUNNING=0
|
|||||||
SLAVE_MYPORT=9307
|
SLAVE_MYPORT=9307
|
||||||
NO_SLAVE=0
|
NO_SLAVE=0
|
||||||
|
|
||||||
|
EXTRA_MASTER_OPT=""
|
||||||
EXTRA_MYSQL_TEST_OPT=""
|
EXTRA_MYSQL_TEST_OPT=""
|
||||||
USE_RUNNING_SERVER=1
|
USE_RUNNING_SERVER=1
|
||||||
DO_GCOV=""
|
DO_GCOV=""
|
||||||
@ -505,49 +506,51 @@ run_testcase ()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $master_opt_file ] ;
|
if [ -z "$USE_RUNNING_SERVER" ] ;
|
||||||
then
|
then
|
||||||
EXTRA_MASTER_OPT=`$CAT $master_opt_file`
|
if [ -f $master_opt_file ] ;
|
||||||
stop_master
|
then
|
||||||
start_master
|
EXTRA_MASTER_OPT=`$CAT $master_opt_file`
|
||||||
else
|
stop_master
|
||||||
if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] ;
|
start_master
|
||||||
then
|
else
|
||||||
EXTRA_MASTER_OPT=""
|
if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] ;
|
||||||
stop_master
|
then
|
||||||
start_master
|
EXTRA_MASTER_OPT=""
|
||||||
fi
|
stop_master
|
||||||
fi
|
start_master
|
||||||
do_slave_restart=0
|
fi
|
||||||
|
fi
|
||||||
|
do_slave_restart=0
|
||||||
|
|
||||||
if [ -f $slave_opt_file ] ;
|
if [ -f $slave_opt_file ] ;
|
||||||
then
|
then
|
||||||
EXTRA_SLAVE_OPT=`$CAT $slave_opt_file`
|
EXTRA_SLAVE_OPT=`$CAT $slave_opt_file`
|
||||||
do_slave_restart=1
|
do_slave_restart=1
|
||||||
else
|
else
|
||||||
if [ ! -z "$EXTRA_SLAVE_OPT" ] || [ x$SLAVE_RUNNING != x1 ] ;
|
if [ ! -z "$EXTRA_SLAVE_OPT" ] || [ x$SLAVE_RUNNING != x1 ] ;
|
||||||
then
|
then
|
||||||
EXTRA_SLAVE_OPT=""
|
EXTRA_SLAVE_OPT=""
|
||||||
do_slave_restart=1
|
do_slave_restart=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $slave_master_info_file ] ; then
|
if [ -f $slave_master_info_file ] ; then
|
||||||
SLAVE_MASTER_INFO=`$CAT $slave_master_info_file`
|
SLAVE_MASTER_INFO=`$CAT $slave_master_info_file`
|
||||||
do_slave_restart=1
|
do_slave_restart=1
|
||||||
else
|
else
|
||||||
if [ ! -z "$SLAVE_MASTER_INFO" ] || [ x$SLAVE_RUNNING != x1 ] ;
|
if [ ! -z "$SLAVE_MASTER_INFO" ] || [ x$SLAVE_RUNNING != x1 ] ;
|
||||||
then
|
then
|
||||||
SLAVE_MASTER_INFO=""
|
SLAVE_MASTER_INFO=""
|
||||||
do_slave_restart=1
|
do_slave_restart=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x$do_slave_restart = x1 ] ; then
|
if [ x$do_slave_restart = x1 ] ; then
|
||||||
stop_slave
|
stop_slave
|
||||||
start_slave
|
start_slave
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $MYSQL_TEST_DIR
|
cd $MYSQL_TEST_DIR
|
||||||
|
|
||||||
if [ -f $tf ] ; then
|
if [ -f $tf ] ; then
|
||||||
|
@ -12,7 +12,7 @@ aaaaaaaaa dsaass de sushi 1 0
|
|||||||
aaaaaaaaa dsaass de Bolo de Chocolate 2 0
|
aaaaaaaaa dsaass de Bolo de Chocolate 2 0
|
||||||
aaaaaaaaa dsaass de Feijoada 3 0
|
aaaaaaaaa dsaass de Feijoada 3 0
|
||||||
aaaaaaaaa dsaass de Mousse de Chocolate 4 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 copo de Vodka 5 0
|
||||||
ssde df s fsda sad er um chocolate Snickers 6 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
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Bugreport due to Roy Nasser <roy@vem.ca>
|
# Bugreport due to Roy Nasser <roy@vem.ca>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
drop table if exists t1, t2;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
id int(10) unsigned NOT NULL auto_increment,
|
id int(10) unsigned NOT NULL auto_increment,
|
||||||
q varchar(255) default NULL,
|
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');
|
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
|
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
|
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;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user