From 7cc9c3c6bf6d39ba057d6573a2d95fc7d987cc8e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Dec 2002 22:49:16 +0200 Subject: Don't initialize fulltext functions twice in multi-table-update mysql-test/mysql-test-run.sh: Added option --extern (from 4.1) mysql-test/r/multi_update.result: Portability fix mysql-test/t/multi_update.test: Portability fix --- mysql-test/mysql-test-run.sh | 1 + mysql-test/r/multi_update.result | 14 +++++++------- mysql-test/t/multi_update.test | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 928beaf0aa4..5c80e7d538a 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -217,6 +217,7 @@ while test $# -gt 0; do --slave-binary=*) SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;; --local) USE_RUNNING_SERVER="" ;; + --extern) USE_RUNNING_SERVER="1" ;; --tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;; --local-master) MASTER_MYPORT=3306; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 7d1f5bd53f6..8cf035343b1 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -182,13 +182,13 @@ insert into t1 values(1,1,NULL); insert into t2 values(1,10,NULL),(2,20,NULL); set timestamp=1038000000; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; -select * from t1; -n d t -1 10 20021123002000 -select * from t2; -n d t -1 10 20021127154957 -2 20 20021127154957 +select n,d,unix_timestamp(t) from t1; +n d unix_timestamp(t) +1 10 1038000000 +select n,d,unix_timestamp(t) from t2; +n d unix_timestamp(t) +1 10 1038401397 +2 20 1038401397 UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1 drop table t1,t2; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index b79b0749c82..ff456b710c1 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -183,8 +183,8 @@ insert into t1 values(1,1,NULL); insert into t2 values(1,10,NULL),(2,20,NULL); set timestamp=1038000000; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; -select * from t1; -select * from t2; +select n,d,unix_timestamp(t) from t1; +select n,d,unix_timestamp(t) from t2; --error 1064 UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; drop table t1,t2; -- cgit v1.2.1 From 6271ea35b83501781cf3ee51a62fd95870b3fb96 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Dec 2002 22:40:20 +0100 Subject: bulk insert code optimized mysql-test/r/distinct.result: updated mysql-test/r/fulltext.result: updated mysql-test/r/select.result: updated mysql-test/r/show_check.result: updated mysql-test/t/insert.test: updated --- mysql-test/r/distinct.result | 8 ++++---- mysql-test/r/fulltext.result | 4 ++-- mysql-test/r/select.result | 4 ++-- mysql-test/r/show_check.result | 2 +- mysql-test/t/insert.test | 2 ++ 5 files changed, 11 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 020d6c6534f..919478c7265 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -173,9 +173,9 @@ INSERT INTO t2 values (1),(2),(3); INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2'); explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; table type possible_keys key key_len ref rows Extra -t3 index a a 5 NULL 6 Using index; Using temporary -t2 index a a 4 NULL 5 Using index; Distinct -t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 Using where; Distinct +t1 ALL PRIMARY NULL NULL NULL 2 Using temporary +t2 ref a a 4 t1.a 1 Using index +t3 ref a a 5 t1.b 1 Using where; Using index SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; a 1 @@ -190,7 +190,7 @@ insert into t3 select * from t4; explain select distinct t1.a from t1,t3 where t1.a=t3.a; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary -t3 ref a a 5 t1.a 10 Using where; Using index; Distinct +t3 ref a a 5 t1.a 1 Using where; Using index; Distinct select distinct t1.a from t1,t3 where t1.a=t3.a; a 1 diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index edf109fcc93..fc1e0788087 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -135,8 +135,8 @@ id 3 show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t2 1 tig 1 ticket A NULL NULL NULL YES BTREE -t2 1 tix 1 inhalt A NULL 1 NULL YES FULLTEXT +t2 1 tig 1 ticket A 3 NULL NULL YES BTREE +t2 1 tix 1 inhalt A 1 1 NULL YES FULLTEXT show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index a921d75f20a..51cd67ac832 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3239,8 +3239,8 @@ Field Type Null Key Default Extra Privileges show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE -t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE -t2 1 fld3 1 fld3 A NULL NULL NULL BTREE +t2 0 fld1 1 fld1 A 0 NULL NULL BTREE +t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE drop table t4, t3, t2, t1; DO 1; DO benchmark(100,1+1),1,1; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 2c32d766a38..70548311e26 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -9,7 +9,7 @@ Table Op Msg_type Msg_text test.t1 check status Table is already up to date check table t1 changed; Table Op Msg_type Msg_text -test.t1 check status OK +test.t1 check status Table is already up to date insert into t1 values (5,5,5); check table t1 changed; Table Op Msg_type Msg_text diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 0bca8dc5890..9b06b522028 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -46,6 +46,8 @@ drop table t1; create table t1 (sid char(20), id int(2) NOT NULL auto_increment, key(sid, id)); insert into t1 values ('skr',NULL),('skr',NULL),('test',NULL); select * from t1; +insert into t1 values ('rts',NULL),('rts',NULL),('test',NULL); +select * from t1; drop table t1; # -- cgit v1.2.1 From 5fcd6ce31e2bdc0ebf5106ca27f96a11294d7209 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Dec 2002 21:38:00 +0100 Subject: order_by.result, key_diff.result: updated mysql-test/r/key_diff.result: updated mysql-test/r/order_by.result: updated --- mysql-test/r/key_diff.result | 2 +- mysql-test/r/order_by.result | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/key_diff.result b/mysql-test/r/key_diff.result index 4eaccc696f9..f8671639e2c 100644 --- a/mysql-test/r/key_diff.result +++ b/mysql-test/r/key_diff.result @@ -36,7 +36,7 @@ a a a a explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B; table type possible_keys key key_len ref rows Extra t1 ALL a NULL NULL NULL 5 -t2 ALL b NULL NULL NULL 5 Using where +t2 ref b b 4 t1.a 1 Using where select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a; a b a b A B a a diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 48773bfa916..62a42150eb3 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -450,9 +450,9 @@ gid sid uid 103853 5 250 EXPLAIN select t1.gid, t2.sid, t3.uid from t3, t2, t1 where t2.gid = t1.gid and t2.uid = t3.uid order by t1.gid, t3.uid; table type possible_keys key key_len ref rows Extra -t1 index PRIMARY PRIMARY 4 NULL 6 Using index -t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1 -t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 Using where; Using index +t3 index PRIMARY PRIMARY 2 NULL 6 Using index; Using temporary; Using filesort +t2 ref PRIMARY,uid uid 2 t3.uid 1 Using where +t1 eq_ref PRIMARY PRIMARY 4 t2.gid 1 Using index EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t1.gid,t3.skr; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 6 Using index -- cgit v1.2.1 From 934f5cc4662ded62609ce64be15c54d327cc554e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Dec 2002 15:46:39 +0200 Subject: Ensure that BEGIN / COMMIT is handled properly if slave dies Added syntax support for CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1; Docs/internals.texi: Update binary protocol description innobase/include/db0err.h: Merge from 3.23 mysql-test/r/insert.result: Updated test result from 3.23 sql/log.cc: Fixed bug in replication and log rotation sql/log_event.cc: Ensure that BEGIN / COMMIT is handled properly if slave dies sql/slave.cc: Fixed bug in replication and log rotation sql/slave.h: Ensure that BEGIN / COMMIT is handled properly if slave dies sql/sql_analyse.cc: Moved usage of res before res is destroyed (by bzero(&s...)) sql/sql_yacc.yy: Added syntax support for CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1; To be able to read MySQL 4.1 dump files. --- mysql-test/r/insert.result | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 2ffa9d88618..dedde4cc408 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -46,8 +46,17 @@ insert into t1 values ('skr',NULL),('skr',NULL),('test',NULL); select * from t1; sid id skr 1 -skr 2 +skr 1 +test 1 +insert into t1 values ('rts',NULL),('rts',NULL),('test',NULL); +select * from t1; +sid id +rts 1 +rts 2 +skr 1 +skr 1 test 1 +test 2 drop table t1; drop database if exists foo; create database foo; -- cgit v1.2.1 From 6a2ce08600d55898d3a4487f8d502aa3d9d988c9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Dec 2002 12:05:24 +0200 Subject: RESET SLAVE and CHANGE MASTER will now give an error if slave is running. This fixes a problem in replication where RESET SLAVE could crash a running slave. mysql-test/r/rpl_failsafe.result: Added missing drop mysql-test/r/rpl_log_pos.result: Added slave stop before change master mysql-test/t/rpl_log_pos.test: Added slave stop before change master sql/sql_parse.cc: reset_slave() sends it's own errors sql/sql_repl.cc: reset_slave() sends it own error. RESET SLAVE and CHANGE MASTER will now give an error if slave is running. This fixes a problem in replication where RESET SLAVE could crash a running slave. --- mysql-test/r/rpl_failsafe.result | 1 + mysql-test/r/rpl_log_pos.result | 4 ++++ mysql-test/t/rpl_log_pos.test | 4 ++++ 3 files changed, 9 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_failsafe.result b/mysql-test/r/rpl_failsafe.result index 14b749fada9..7e8aeea64f7 100644 --- a/mysql-test/r/rpl_failsafe.result +++ b/mysql-test/r/rpl_failsafe.result @@ -1,4 +1,5 @@ slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index 6883da76180..e76b565813f 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -10,7 +10,9 @@ master-bin.001 79 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 79 slave-relay-bin.002 120 master-bin.001 Yes Yes 0 0 79 124 +slave stop; change master to master_log_pos=73; +slave start; slave stop; change master to master_log_pos=73; show slave status; @@ -20,6 +22,7 @@ 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 No Yes 0 0 73 4 +slave stop; change master to master_log_pos=173; slave start; show slave status; @@ -32,6 +35,7 @@ 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); +slave stop; change master to master_log_pos=79; slave start; select * from t1; diff --git a/mysql-test/t/rpl_log_pos.test b/mysql-test/t/rpl_log_pos.test index f585fa233c5..e11ba92cfa7 100644 --- a/mysql-test/t/rpl_log_pos.test +++ b/mysql-test/t/rpl_log_pos.test @@ -8,7 +8,9 @@ connection slave; sync_with_master; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT show slave status; +slave stop; change master to master_log_pos=73; +slave start; sleep 5; slave stop; @@ -19,6 +21,7 @@ slave start; sleep 5; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT show slave status; +slave stop; change master to master_log_pos=173; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT slave start; @@ -32,6 +35,7 @@ create table t1 (n int); insert into t1 values (1),(2),(3); save_master_pos; connection slave; +slave stop; change master to master_log_pos=79; slave start; sync_with_master; -- cgit v1.2.1 From b512c8b83a52a7ef44e33b1b2c7e53dc64d28826 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Dec 2002 12:45:31 +0200 Subject: Transactions in AUTOCOMMIT=0 mode didn't rotate binary log Don't enable any bulk insert or record caching code if inserting less than MIN_ROWS_TO_USE_BULK_INSERT rows (100) myisam/mi_check.c: Fixed bug in copying statistics for disabled index mysql-test/r/distinct.result: Fix result after not doing key statistics for first insert. mysql-test/r/fulltext.result: Fix result after not doing key statistics for first insert. mysql-test/r/insert.result: Fix result after not doing key statistics for first insert. mysql-test/r/key_diff.result: Fix result after not doing key statistics for first insert. mysql-test/r/order_by.result: Fix result after not doing key statistics for first insert. mysql-test/r/select.result: Fix result after not doing key statistics for first insert. mysql-test/r/show_check.result: Fix result after not doing key statistics for first insert. sql/ha_myisam.cc: Don't disable index when inserting only a few rows sql/log.cc: Transactions in AUTOCOMMIT=0 mode didn't rotate binary log. sql/sql_insert.cc: Don't enable any bulk insert or record caching code if inserting less than MIN_ROWS_TO_USE_BULK_INSERT --- mysql-test/r/distinct.result | 8 ++++---- mysql-test/r/fulltext.result | 4 ++-- mysql-test/r/insert.result | 4 ++-- mysql-test/r/key_diff.result | 2 +- mysql-test/r/order_by.result | 6 +++--- mysql-test/r/select.result | 4 ++-- mysql-test/r/show_check.result | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 919478c7265..020d6c6534f 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -173,9 +173,9 @@ INSERT INTO t2 values (1),(2),(3); INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2'); explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; table type possible_keys key key_len ref rows Extra -t1 ALL PRIMARY NULL NULL NULL 2 Using temporary -t2 ref a a 4 t1.a 1 Using index -t3 ref a a 5 t1.b 1 Using where; Using index +t3 index a a 5 NULL 6 Using index; Using temporary +t2 index a a 4 NULL 5 Using index; Distinct +t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 Using where; Distinct SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; a 1 @@ -190,7 +190,7 @@ insert into t3 select * from t4; explain select distinct t1.a from t1,t3 where t1.a=t3.a; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary -t3 ref a a 5 t1.a 1 Using where; Using index; Distinct +t3 ref a a 5 t1.a 10 Using where; Using index; Distinct select distinct t1.a from t1,t3 where t1.a=t3.a; a 1 diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index fc1e0788087..edf109fcc93 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -135,8 +135,8 @@ id 3 show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t2 1 tig 1 ticket A 3 NULL NULL YES BTREE -t2 1 tix 1 inhalt A 1 1 NULL YES FULLTEXT +t2 1 tig 1 ticket A NULL NULL NULL YES BTREE +t2 1 tix 1 inhalt A NULL 1 NULL YES FULLTEXT show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index dedde4cc408..69b790ff35b 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -46,7 +46,7 @@ insert into t1 values ('skr',NULL),('skr',NULL),('test',NULL); select * from t1; sid id skr 1 -skr 1 +skr 2 test 1 insert into t1 values ('rts',NULL),('rts',NULL),('test',NULL); select * from t1; @@ -54,7 +54,7 @@ sid id rts 1 rts 2 skr 1 -skr 1 +skr 2 test 1 test 2 drop table t1; diff --git a/mysql-test/r/key_diff.result b/mysql-test/r/key_diff.result index f8671639e2c..4eaccc696f9 100644 --- a/mysql-test/r/key_diff.result +++ b/mysql-test/r/key_diff.result @@ -36,7 +36,7 @@ a a a a explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B; table type possible_keys key key_len ref rows Extra t1 ALL a NULL NULL NULL 5 -t2 ref b b 4 t1.a 1 Using where +t2 ALL b NULL NULL NULL 5 Using where select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a; a b a b A B a a diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 62a42150eb3..48773bfa916 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -450,9 +450,9 @@ gid sid uid 103853 5 250 EXPLAIN select t1.gid, t2.sid, t3.uid from t3, t2, t1 where t2.gid = t1.gid and t2.uid = t3.uid order by t1.gid, t3.uid; table type possible_keys key key_len ref rows Extra -t3 index PRIMARY PRIMARY 2 NULL 6 Using index; Using temporary; Using filesort -t2 ref PRIMARY,uid uid 2 t3.uid 1 Using where -t1 eq_ref PRIMARY PRIMARY 4 t2.gid 1 Using index +t1 index PRIMARY PRIMARY 4 NULL 6 Using index +t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1 +t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 Using where; Using index EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t1.gid,t3.skr; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 6 Using index diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 51cd67ac832..a921d75f20a 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3239,8 +3239,8 @@ Field Type Null Key Default Extra Privileges show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE -t2 0 fld1 1 fld1 A 0 NULL NULL BTREE -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE +t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE +t2 1 fld3 1 fld3 A NULL NULL NULL BTREE drop table t4, t3, t2, t1; DO 1; DO benchmark(100,1+1),1,1; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 70548311e26..2c32d766a38 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -9,7 +9,7 @@ Table Op Msg_type Msg_text test.t1 check status Table is already up to date check table t1 changed; Table Op Msg_type Msg_text -test.t1 check status Table is already up to date +test.t1 check status OK insert into t1 values (5,5,5); check table t1 changed; Table Op Msg_type Msg_text -- cgit v1.2.1 From e003d42e4af56c5785010f1f2426bd5bfa778ba3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Dec 2002 22:16:57 +0200 Subject: fix for a bug in CASE ...WHEN ... sql/sql_db.cc: fix for lower case ... --- mysql-test/r/case.result | 4 ++++ mysql-test/t/case.test | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 073164aa035..9ba33daaa4d 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -40,3 +40,7 @@ fcase count(*) nothing 2 one 1 two 1 +color +orange +yellow +green diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 79511f5f546..f2b8d42e07c 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -30,3 +30,8 @@ insert into t1 values(1),(2),(3),(4); select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase; select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase; drop table t1; +drop table if exists t; +create table t1 (row int not null, col int not null, val varchar(255) not null); +insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); +select max(case col when 1 then val else null end) as color from t1 group by row; +drop table if exists t; -- cgit v1.2.1 From 53239a714a17549863330facf3a8ea3bf74924c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Dec 2002 19:00:00 +0200 Subject: Fix for found rows in multi-table updates --- mysql-test/r/multi_update.result | 10 ++++++++++ mysql-test/t/multi_update.test | 10 ++++++++++ 2 files changed, 20 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 8cf035343b1..fe028a4cb95 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -236,3 +236,13 @@ n d 1 30 1 30 drop table t1,t2; +drop table if exists t1,t2,t3; +CREATE TABLE t1 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t1 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'),(10,''),(11,''),(12,''),(13,''); +CREATE TABLE t2 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t2 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'); +CREATE TABLE t3 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t3 VALUES (1,'jedan'),(2,'dva'); +update t1,t2 set t1.naziv="aaaa" where t1.broj=t2.broj; +update t1,t2,t3 set t1.naziv="bbbb", t2.naziv="aaaa" where t1.broj=t2.broj and t2.broj=t3.broj; +drop table if exists t1,t2,t3; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index ff456b710c1..088b355a17c 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -214,3 +214,13 @@ UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; select * from t1; select * from t2; drop table t1,t2; +drop table if exists t1,t2,t3; +CREATE TABLE t1 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t1 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'),(10,''),(11,''),(12,''),(13,''); +CREATE TABLE t2 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t2 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'); +CREATE TABLE t3 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t3 VALUES (1,'jedan'),(2,'dva'); +update t1,t2 set t1.naziv="aaaa" where t1.broj=t2.broj; +update t1,t2,t3 set t1.naziv="bbbb", t2.naziv="aaaa" where t1.broj=t2.broj and t2.broj=t3.broj; +drop table if exists t1,t2,t3; -- cgit v1.2.1 From 791e9fb37ea10f3e91e56e15c869906d90313c06 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Dec 2002 14:58:27 +0200 Subject: Changed thd variables max_join_size and select_limit to type ha_rows. This fixed some optimization problems when using -DBIG_TABLES Portabilty fixes for OpenUnix and HPUX Added C and C++ version numbers to mysqlbug Docs/mysqld_error.txt: Added new error message acinclude.m4: Fix for configure problem on OpenUnix configure.in: Fix for OpenUnix Added C and C++ versions to mysqlbug mysql-test/r/variables.result: Update of max_join_size handling mysql-test/t/variables.test: Update of max_join_size handling mysys/Makefile.am: Removed duplicate row mysys/my_alloc.c: Safety fixes (not fatal) scripts/Makefile.am: Added C and C++ compiler versions to mysqlbug scripts/mysqlbug.sh: Added C and C++ compiler versions to mysqlbug sql/item_func.cc: Fixed that user variables that changes are not threated as constants. sql/item_func.h: Fixed that user variables that changes are not threated as constants. sql/mysqld.cc: Changed thd variables max_join_size and select_limit to type ha_rows sql/repl_failsafe.cc: Removed not needed cast sql/set_var.cc: Changed thd variables max_join_size and select_limit to type ha_rows sql/set_var.h: Changed thd variables max_join_size and select_limit to type ha_rows sql/slave.cc: Removed not needed cast sql/sql_class.h: Changed thd variables max_join_size and select_limit to type ha_rows sql/sql_parse.cc: Removed not needed cast Fixed security problem with mysql_drop_db() sql/sql_show.cc: Changed thd variables max_join_size and select_limit to type ha_rows sql/structs.h: Changed thd variables max_join_size and select_limit to type ha_rows --- mysql-test/r/variables.result | 4 ++-- mysql-test/t/variables.test | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index f8ac13477a9..ed477a8519b 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -50,7 +50,7 @@ Variable_name Value max_join_size 100 show global variables like 'max_join_size'; Variable_name Value -max_join_size 4294967295 +max_join_size HA_POS_ERROR set GLOBAL max_join_size=2000; show global variables like 'max_join_size'; Variable_name Value @@ -62,7 +62,7 @@ max_join_size 2000 set GLOBAL max_join_size=DEFAULT; show global variables like 'max_join_size'; Variable_name Value -max_join_size 4294967295 +max_join_size HA_POS_ERROR set @@max_join_size=1000, @@global.max_join_size=2000; select @@local.max_join_size, @@global.max_join_size; @@session.max_join_size @@global.max_join_size diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index e21fbd975e6..5863cb97d57 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -34,12 +34,15 @@ drop table t1; set max_join_size=100; show variables like 'max_join_size'; +--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR show global variables like 'max_join_size'; set GLOBAL max_join_size=2000; show global variables like 'max_join_size'; set max_join_size=DEFAULT; +--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR show variables like 'max_join_size'; set GLOBAL max_join_size=DEFAULT; +--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR show global variables like 'max_join_size'; set @@max_join_size=1000, @@global.max_join_size=2000; select @@local.max_join_size, @@global.max_join_size; -- cgit v1.2.1 From 8753e655d93f7616220132f13b8ea426e4f4cea7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Dec 2002 14:33:11 +0200 Subject: fix for an error in the merge from 3.23 --- mysql-test/r/case.result | 5 +++++ mysql-test/t/case.test | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 183e2692d7a..e5fc7218c50 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -63,7 +63,12 @@ nothing 2 one 1 two 1 drop table t1; +drop table if exists t1; +create table t1 (row int not null, col int not null, val varchar(255) not null); +insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); +select max(case col when 1 then val else null end) as color from t1 group by row; color orange yellow green +drop table if exists t1; diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index f2b8d42e07c..b5a1a60f15b 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -30,8 +30,8 @@ insert into t1 values(1),(2),(3),(4); select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase; select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase; drop table t1; -drop table if exists t; +drop table if exists t1; create table t1 (row int not null, col int not null, val varchar(255) not null); insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); select max(case col when 1 then val else null end) as color from t1 group by row; -drop table if exists t; +drop table if exists t1; -- cgit v1.2.1 From 868ed1135fb1501e69f58a4792fb04e822cf754a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Dec 2002 15:24:40 +0200 Subject: Update of test results --- mysql-test/r/case.result | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 183e2692d7a..661ffa99f2c 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -63,7 +63,12 @@ nothing 2 one 1 two 1 drop table t1; +drop table if exists t; +create table t1 (row int not null, col int not null, val varchar(255) not null); +insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); +select max(case col when 1 then val else null end) as color from t1 group by row; color orange yellow green +drop table if exists t; -- cgit v1.2.1 From ad22d0cbacd59f7dcac4ccc121486c614e609b93 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Dec 2002 15:55:22 +0200 Subject: Test cleanup mysql-test/r/case.result: Removed unnecessary drop commands mysql-test/t/case.test: Removed unnecessary drop commands --- mysql-test/r/case.result | 3 +-- mysql-test/t/case.test | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 661ffa99f2c..4c16b375400 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -63,7 +63,6 @@ nothing 2 one 1 two 1 drop table t1; -drop table if exists t; create table t1 (row int not null, col int not null, val varchar(255) not null); insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); select max(case col when 1 then val else null end) as color from t1 group by row; @@ -71,4 +70,4 @@ color orange yellow green -drop table if exists t; +drop table t1; diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index b5a1a60f15b..3ba3a292c77 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -30,8 +30,12 @@ insert into t1 values(1),(2),(3),(4); select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase; select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase; drop table t1; -drop table if exists t1; + +# +# Test MAX(CASE ... ) that can return null +# + create table t1 (row int not null, col int not null, val varchar(255) not null); insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); select max(case col when 1 then val else null end) as color from t1 group by row; -drop table if exists t1; +drop table t1; -- cgit v1.2.1 From e229fe9801cc9fb7e3783cf708bc7cb695606c64 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 4 Jan 2003 15:37:20 +0200 Subject: Added support for DROP TEMPORARY TABLE Removed mysql_warnings() API function. Post merge fixes. client/mysqltest.c: Don't use mysql_warnings(). include/mysql.h: Removed mysql_warnings() API function libmysql/libmysql.c: Removed mysql_warnings() API function mysql-test/r/rpl_log_pos.result: Updated results mysql-test/t/connect.test: Removed empty lines mysql-test/t/rpl_log_pos.test: Update to new syntax sql/item.h: Fix after merge sql/item_create.cc: Fix after merge sql/mysql_priv.h: Added support for DROP TEMPORARY TABLE sql/sql_db.cc: Added support for DROP TEMPORARY TABLE sql/sql_parse.cc: SHOW WARNINGS now shows notes, warnings and errors. Support for DROP TEMPORARY TABLE Post merge fixes sql/sql_repl.cc: Post merge fixes sql/sql_table.cc: Added support for DROP TEMPORARY TABLE --- mysql-test/r/rpl_log_pos.result | 6 +++--- mysql-test/t/connect.test | 2 -- mysql-test/t/rpl_log_pos.test | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index 4ba3736604e..fa38e42ae73 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -10,9 +10,9 @@ master-bin.000001 79 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.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127 -slave stop; +stop slave; change master to master_log_pos=73; -slave start; +start slave; stop slave; change master to master_log_pos=73; show slave status; @@ -35,7 +35,7 @@ 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); -slave stop; +stop slave; change master to master_log_pos=79; start slave; select * from t1; diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index 0bc5ca3914f..192d3eaf3e0 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -63,5 +63,3 @@ show tables; #--error 1045 #connect (con1,localhost,test,zorro,); #--error 1045 - - diff --git a/mysql-test/t/rpl_log_pos.test b/mysql-test/t/rpl_log_pos.test index 03c86137ae0..bc1349a959a 100644 --- a/mysql-test/t/rpl_log_pos.test +++ b/mysql-test/t/rpl_log_pos.test @@ -6,9 +6,9 @@ show master status; sync_slave_with_master; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT show slave status; -slave stop; +stop slave; change master to master_log_pos=73; -slave start; +start slave; sleep 5; stop slave; @@ -19,7 +19,7 @@ start slave; sleep 5; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT show slave status; -slave stop; +stop slave; change master to master_log_pos=173; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT start slave; @@ -34,7 +34,7 @@ create table t1 (n int); insert into t1 values (1),(2),(3); save_master_pos; connection slave; -slave stop; +stop slave; change master to master_log_pos=79; start slave; sync_with_master; -- cgit v1.2.1