diff options
author | monty@donna.mysql.com <> | 2001-01-08 00:09:16 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2001-01-08 00:09:16 +0200 |
commit | 9612deef88d4e46915c1750891c0e18117b3a12b (patch) | |
tree | a9c36bda4fa66cce3b6f30cd136b9cee06cd8fe3 /mysql-test | |
parent | 2e453e7bf7e6eabf2805794418c1f3882378357a (diff) | |
parent | 6d0e529042f175d4a0522235239f33e8eca41cfb (diff) | |
download | mariadb-git-9612deef88d4e46915c1750891c0e18117b3a12b.tar.gz |
Merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 36 | ||||
-rw-r--r-- | mysql-test/r/fulltext.result | 14 | ||||
-rw-r--r-- | mysql-test/r/func_math.result | 4 | ||||
-rw-r--r-- | mysql-test/t/fulltext.test | 36 | ||||
-rw-r--r-- | mysql-test/t/func_math.test | 2 |
5 files changed, 75 insertions, 17 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 76ebe55ac64..0af315e9774 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -138,6 +138,7 @@ while test $# -gt 0; do --debug) EXTRA_MASTER_MYSQLD_OPT=--debug=d:t:O,$MYSQL_TMP_DIR/master.trace EXTRA_SLAVE_MYSQLD_OPT=--debug=d:t:O,$MYSQL_TMP_DIR/slave.trace + EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT --debug" ;; -- ) shift; break ;; --* ) $ECHO "Unrecognized option: $1"; exit 1 ;; @@ -163,6 +164,8 @@ SLAVE_MYPID="$MYRUN_DIR/mysqld-slave.pid" SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log" SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err" +SMALL_SERVER="-O key_buffer_size=1M -O sort_buffer=256K -O max_heap_table_size=1M" + if [ x$SOURCE_DIST = x1 ] ; then MY_BASEDIR=$MYSQL_TEST_DIR else @@ -335,7 +338,9 @@ start_master() --log=$MASTER_MYLOG --default-character-set=latin1 \ --core \ --tmpdir=$MYSQL_TMP_DIR \ - --language=english $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT" + --language=english \ + $SMALL_SERVER \ + $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT" if [ x$DO_DDD = x1 ] then $ECHO "set args $master_args" > $GDB_MASTER_INIT @@ -378,7 +383,9 @@ start_slave() --log=$SLAVE_MYLOG --default-character-set=latin1 \ --core \ --tmpdir=$MYSQL_TMP_DIR \ - --language=english $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT" + --language=english \ + $SMALL_SERVER \ + $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT" if [ x$DO_DDD = x1 ] then $ECHO "set args $master_args" > $GDB_SLAVE_INIT @@ -606,21 +613,23 @@ run_testcase () [ "$DO_GCOV" ] && gcov_prepare # Ensure that no old mysqld test servers are running -$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root -O connect_timeout=5 shutdown > /dev/null 2>&1 -$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 shutdown > /dev/null 2>&1 - -$ECHO "Installing Test Databases" -mysql_install_db +if [ -z "$USE_RUNNING_SERVER" ] +then + $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root -O connect_timeout=5 shutdown > /dev/null 2>&1 + $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 shutdown > /dev/null 2>&1 + $ECHO "Installing Test Databases" + mysql_install_db #do not automagically start deamons if we are in gdb or running only one test #case -if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ] -then - mysql_start + if [ -z "$DO_GDB" ] && [ -z "$DO_DDD" ] + then + mysql_start + fi + $ECHO "Loading Standard Test Databases" + mysql_loadstd fi -$ECHO "Loading Standard Test Databases" -mysql_loadstd $ECHO "Starting Tests" @@ -637,6 +646,7 @@ then do run_testcase $tf done + $RM -f $TIMEFILE # Remove for full test fi else tname=`$BASENAME $1 .test` @@ -651,8 +661,6 @@ fi $ECHO $DASH72 $ECHO -$RM -f $TIMEFILE - if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ] then mysql_stop diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 7d9ba18d933..a08b5da99a4 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -6,3 +6,17 @@ Full-text indexes are called collections a b Full-text indexes are called collections Only MyISAM tables support collections +id +id +id +3 +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment +t2 1 tig 1 ticket A NULL NULL NULL +t2 1 tix 1 inhalt A NULL 1 NULL FULLTEXT +Table Create Table +t2 CREATE TABLE `t2` ( + `ticket` int(11) default NULL, + `inhalt` text, + KEY `tig`(`ticket`), + FULLTEXT KEY `tix`(`inhalt`) +) TYPE=MyISAM diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 33d1dfe65e7..cee67a3e25c 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -16,7 +16,7 @@ pow(10,log10(10)) power(2,4) 10.000000 16.000000 rand(999999) rand() 0.18435012473199 0.76373626176616 -PI() sin(pi()/2) cos(pi()/2) tan(pi()) cot(1) asin(1) acos(0) atan(1) -3.141593 1.000000 0.000000 -0.000000 0.64209262 1.570796 1.570796 0.785398 +PI() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1) +3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398 degrees(pi()) radians(360) 180 6.2831853071796 diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index ad7c97022f5..3e3061fcd4d 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -2,6 +2,8 @@ # Test of fulltext index # +drop table if exists t1,t2; + CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),('Full-text indexes', 'are called collections'),('Only MyISAM tables','support collections'),('Function MATCH ... AGAINST()','is used to do a search'),('Full-text search in MySQL', 'implements vector space model'); select * from t1 where MATCH(a,b) AGAINST ("collections"); @@ -9,3 +11,37 @@ select * from t1 where MATCH(a,b) AGAINST ("indexes"); select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); delete from t1 where a like "MySQL%"; drop table t1; + +# +# Check bug reported by Matthias Urlichs +# + +CREATE TABLE t1 ( + id int(11), + ticket int(11), + KEY ti (id), + KEY tit (ticket) +)/*! type=MyISAM */; +INSERT INTO t1 VALUES (2,3),(1,2); + +CREATE TABLE t2 ( + ticket int(11), + inhalt text, + KEY tig (ticket), + fulltext index tix (inhalt(1)) /* this line modified by hand */ +)/*! type=MyISAM */; +INSERT INTO t2 VALUES (1,'foo'),(2,'bar'),(3,'foobar'); + +select t1.id FROM t2 as ttxt,t1,t1 as ticket2 WHERE ticket2.id = ttxt.ticket AND t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); + +# In the following query MySQL didn't use the fulltext index +select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); + +INSERT INTO t1 VALUES (3,3); +select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); + +# Check that we get 'fulltext' index in SHOW CREATE + +show keys from t2; +show create table t2; +drop table t1,t2; diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index f6b4672f91a..ab7990eea79 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -11,5 +11,5 @@ select abs(-10), sign(-5), sign(5), sign(0); select log(exp(10)),exp(log(sqrt(10))*2); select pow(10,log10(10)),power(2,4); select rand(999999),rand(); -select pi(),sin(pi()/2),cos(pi()/2),tan(pi()),cot(1),asin(1),acos(0),atan(1); +select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); select degrees(pi()),radians(360); |