diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-13 02:31:19 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-13 02:31:19 +0200 |
commit | 33a096829b0f2a294b162e11ad81df788732c384 (patch) | |
tree | 47a4c1a60e94a3e70ea5564124a296f7cd71605e /mysql-test | |
parent | f0f71accfc2b6fcc6dfeaa1ac4b8b73d071ff3a1 (diff) | |
download | mariadb-git-33a096829b0f2a294b162e11ad81df788732c384.tar.gz |
Fixed sleep time in mysql-test-run
Fixed bug in query cache.
Cleaned up des_crypt code.
BitKeeper/deleted/.del-fsck.mysql~87170d4358b50d60:
Delete: fs/fsck.mysql
Docs/manual.texi:
Changed != to <>
mysql-test/mysql-test-run.sh:
Fix sleep times to take into account creation of InnoDB tables.
mysql-test/r/group_by.result:
More tests
mysql-test/r/query_cache.result:
More tests
mysql-test/r/union.result:
More tests
mysql-test/t/func_str.test:
Fix for FreeBSD
mysql-test/t/query_cache.test:
More tests
mysql-test/t/union.test:
More tests
mysys/my_winsem.c:
Cleanup comments
sql/des_key_file.cc:
Cleanup des_crypt code
sql/item_strfunc.cc:
Cleanup des_crypt code
sql/item_strfunc.h:
Cleanup des_crypt code
sql/mysql_priv.h:
Cleanup des_crypt code
sql/mysqld.cc:
Cleanup des_crypt code
sql/sql_acl.cc:
For for GRANT and lower-case-table names
sql/sql_cache.cc:
Function for integrity checking.
Fixed bug when merging blocks.
sql/sql_cache.h:
Function for integrity checking.
sql/sql_delete.cc:
Cleanup
sql/sql_parse.cc:
For for GRANT and lower-case-table names
sql/sql_union.cc:
Cleanup & fixed bug in LIMIT handling
sql/sql_yacc.yy:
C
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 27 | ||||
-rw-r--r-- | mysql-test/r/group_by.result | 47 | ||||
-rw-r--r-- | mysql-test/r/innodb_cache.result | 15 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 16 | ||||
-rw-r--r-- | mysql-test/r/union.result | 8 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 1 | ||||
-rw-r--r-- | mysql-test/t/innodb_cache-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/innodb_cache.test | 14 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 15 | ||||
-rw-r--r-- | mysql-test/t/union.test | 2 |
10 files changed, 110 insertions, 36 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 3a1fed143d1..4a7cb555dba 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -46,7 +46,7 @@ which () sleep_until_file_deleted () { file=$1 - loop=$SLEEP_TIME + loop=$SLEEP_TIME_FOR_DELETE while (test $loop -gt 0) do sleep 1 @@ -61,7 +61,8 @@ sleep_until_file_deleted () sleep_until_file_exists () { file=$1 - loop=60 # Should be long enough enough for all cases + loop=$2 + org_time=$2 while (test $loop -gt 0) do sleep 1 @@ -71,7 +72,7 @@ sleep_until_file_exists () fi loop=`expr $loop - 1` done - echo "ERROR: $file was not created in 60 seconds; Aborting" + echo "ERROR: $file was not created in $org_time seconds; Aborting" exit 1; } @@ -172,7 +173,11 @@ DO_GCOV="" DO_GDB="" DO_DDD="" DO_CLIENT_GDB="" -SLEEP_TIME=10 +SLEEP_TIME_FOR_DELETE=10 +SLEEP_TIME_FOR_FIRST_MASTER=200 # Enough time to create innodb tables +SLEEP_TIME_FOR_SECOND_MASTER=30 +SLEEP_TIME_FOR_FIRST_SLAVE=30 +SLEEP_TIME_FOR_SECOND_SLAVE=30 CHARACTER_SET=latin1 DBUSER="" START_WAIT_TIMEOUT=3 @@ -235,7 +240,6 @@ while test $# -gt 0; do EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1" ;; --sleep=*) EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1" - SLEEP_TIME=`$ECHO "$1" | $SED -e "s;--sleep=;;"` ;; --mysqld=*) TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"` @@ -260,8 +264,9 @@ while test $# -gt 0; do fi DO_GDB=1 # We must use manager, as things doesn't work on Linux without it - USE_MANAGER=1 - USE_RUNNING_SERVER="" + # This needs to be checked properly + # USE_MANAGER=1 + # USE_RUNNING_SERVER="" ;; --client-gdb ) if [ x$BINARY_DIST = x1 ] ; then @@ -755,7 +760,8 @@ EOF else manager_launch master $MYSQLD $master_args fi - sleep_until_file_exists $MASTER_MYPID + sleep_until_file_exists $MASTER_MYPID $wait_for_master + wait_for_master=$SLEEP_TIME_FOR_SECOND_MASTER MASTER_RUNNING=1 } @@ -847,7 +853,8 @@ start_slave() manager_launch $slave_ident $SLAVE_MYSQLD $slave_args fi eval "SLAVE$1_RUNNING=1" - sleep_until_file_exists $slave_pid + sleep_until_file_exists $slave_pid $wait_for_slave + wait_for_slave=$SLEEP_TIME_FOR_SECOND_SLAVE } mysql_start () @@ -1143,6 +1150,8 @@ then # Remove files that can cause problems $RM -f $MYSQL_TEST_DIR/var/run/* $MYSQL_TEST_DIR/var/tmp/* + wait_for_master=$SLEEP_TIME_FOR_FIRST_MASTER + wait_for_slave=$SLEEP_TIME_FOR_FIRST_SLAVE $ECHO "Installing Test Databases" mysql_install_db start_manager diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index d0b4ab4efff..a0e234aa69c 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -216,3 +216,50 @@ select 1+1,"a",count(*) from t1 where foo in (2); 1+1 a count(*) 2 a 0 drop table t1; +CREATE TABLE t1 ( +spID int(10) unsigned, +userID int(10) unsigned, +score smallint(5) unsigned, +key (spid), +key (score) +); +INSERT INTO t1 VALUES (1,1,1),(2,2,2),(2,1,1),(3,3,3),(4,3,3),(5,3,3); +explain select userid,count(*) from t1 group by userid desc; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 6 Using temporary +select userid,count(*) from t1 group by userid desc; +userid count(*) +3 3 +2 1 +1 2 +explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc; +table type possible_keys key key_len ref rows Extra +t1 range spID spID 5 NULL 2 where used; Using index +explain select spid,count(*) from t1 where spid between 1 and 2 group by spid; +table type possible_keys key key_len ref rows Extra +t1 range spID spID 5 NULL 2 where used; Using index +select spid,count(*) from t1 where spid between 1 and 2 group by spid; +spid count(*) +1 1 +2 2 +select spid,count(*) from t1 where spid between 1 and 2 group by spid desc; +spid count(*) +explain select sql_big_result spid,sum(userid) from t1 group by spid desc; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 6 Using filesort +select sql_big_result spid,sum(userid) from t1 group by spid desc; +spid sum(userid) +5 3 +4 3 +3 3 +2 3 +1 1 +explain select sql_big_result score,count(*) from t1 group by score desc; +table type possible_keys key key_len ref rows Extra +t1 index NULL score 3 NULL 6 Using index +select sql_big_result score,count(*) from t1 group by score desc; +score count(*) +3 3 +2 1 +1 2 +drop table t1; diff --git a/mysql-test/r/innodb_cache.result b/mysql-test/r/innodb_cache.result new file mode 100644 index 00000000000..df331addb99 --- /dev/null +++ b/mysql-test/r/innodb_cache.result @@ -0,0 +1,15 @@ +drop table if exists t1; +set autocommit=0; +create table t1 (a int not null) type=innodb; +insert into t1 values (1),(2),(3); +select * from t1; +a +1 +2 +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +drop table t1; +commit; +set autocommit=1; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index e6ba5fa83de..973d693d9aa 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1,3 +1,5 @@ +flush query cache; +flush query cache; reset query cache; flush status; drop table if exists t1,t2,t3; @@ -148,20 +150,6 @@ show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 drop table t1, t2, t3; -set autocommit=0; -create table t1 (a int not null) type=innodb; -insert into t1 values (1),(2),(3); -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -drop table t1; -commit; -set autocommit=1; create table t1 (a int not null); insert into t1 values (1),(2),(3); create table t2 (a int not null); diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index f2572321d61..6a27df648b5 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -74,6 +74,14 @@ a b 2 b 3 c 4 d +(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1); +a b +1 a +(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; +a b +3 c +2 b +1 a explain select a,b from t1 union all select a,b from t2; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 4 diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 49f5c6143f3..27d7f2e68d5 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -35,6 +35,7 @@ select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es'); select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c'); select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') ; select soundex(''),soundex('he'),soundex('hello all folks'); +--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l. select password('test'),length(encrypt('test')),encrypt('test','aa'); select md5('hello'); select repeat('monty',5),concat('*',space(5),'*'); diff --git a/mysql-test/t/innodb_cache-master.opt b/mysql-test/t/innodb_cache-master.opt new file mode 100644 index 00000000000..5f0ebff98f6 --- /dev/null +++ b/mysql-test/t/innodb_cache-master.opt @@ -0,0 +1 @@ +--set-variable=query_cache_size=1M diff --git a/mysql-test/t/innodb_cache.test b/mysql-test/t/innodb_cache.test new file mode 100644 index 00000000000..0a162a9debe --- /dev/null +++ b/mysql-test/t/innodb_cache.test @@ -0,0 +1,14 @@ +-- source include/have_innodb.inc + +# +# Without auto_commit. +# +drop table if exists t1; +set autocommit=0; +create table t1 (a int not null) type=innodb; +insert into t1 values (1),(2),(3); +select * from t1; +show status like "Qcache_queries_in_cache"; +drop table t1; +commit; +set autocommit=1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 59ea6d8777b..d2af702e566 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1,11 +1,11 @@ --- source include/have_innodb.inc - # # Tests with query cache # # Reset query cache variables. +flush query cache; # This crashed in some versions +flush query cache; # This crashed in some versions reset query cache; flush status; drop table if exists t1,t2,t3; @@ -73,17 +73,6 @@ delete from t3 where a=10; show status like "Qcache_queries_in_cache"; drop table t1, t2, t3; # -# Without auto_commit. -# -set autocommit=0; -create table t1 (a int not null) type=innodb; -insert into t1 values (1),(2),(3); -select * from t1; -show status like "Qcache_queries_in_cache"; -drop table t1; -commit; -set autocommit=1; -# # FLUSH QUERY CACHE # create table t1 (a int not null); diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 0d391f6f37b..8d98e6e0389 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -18,6 +18,8 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g #test alternate syntax for unions (select a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 4; +(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1); +(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; # Test some error conditions with UNION explain select a,b from t1 union all select a,b from t2; |