diff options
Diffstat (limited to 'mysql-test')
79 files changed, 617 insertions, 224 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 46d6819b819..c343f313d47 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1,7 +1,7 @@ #! /bin/sh # mysql-test-run - originally written by Matt Wagner <matt@mysql.com> # modified by Sasha Pachev <sasha@mysql.com> -# Sligtly updated by Monty +# Slightly updated by Monty # Cleaned up again by Matt # Fixed by Sergei # :-) @@ -575,7 +575,7 @@ show_failed_diff () $DIFF -c $result_file $reject_file echo "-------------------------------------------------------" echo "Please follow the instructions outlined at" - echo "http://www.mysql.com/doc/R/e/Reporting_mysqltest_bugs.html" + echo "http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html" echo "to find the reason to this problem and how to report this." fi } @@ -1311,7 +1311,7 @@ run_testcase () show_failed_diff $tname $ECHO if [ x$FORCE != x1 ] ; then - $ECHO "Aborting. To continue, re-run with '--force'." + $ECHO "Aborting: $tname failed. To continue, re-run with '--force'." $ECHO if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ] then diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 9d3a0461f9f..b82255bf652 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -319,6 +319,29 @@ alter table t1 change a a char(10) character set koi8r; select a,hex(a) from t1; a hex(a) D4C5D3D4 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(10) character set koi8r default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 DEFAULT CHARACTER SET latin1; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(10) character set koi8r default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 CHARACTER SET latin1; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(10) default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 DEFAULT CHARACTER SET cp1251; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(10) character set latin1 default NULL +) TYPE=MyISAM DEFAULT CHARSET=cp1251 drop table t1; CREATE TABLE t1 ( Host varchar(16) binary NOT NULL default '', diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 93214ae8479..4c6e1645451 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -18,9 +18,11 @@ select -(0-3),round(-(0-3)), round(9999999999999999999); -(0-3) round(-(0-3)) round(9999999999999999999) 3 3 10000000000000000000 create table t1 (a bigint unsigned not null, primary key(a)); -insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE); +insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); select * from t1; a +18446744073709551612 +18446744073709551613 18446744073709551614 18446744073709551615 select * from t1 where a=18446744073709551615; @@ -29,6 +31,8 @@ a delete from t1 where a=18446744073709551615; select * from t1; a +18446744073709551612 +18446744073709551613 18446744073709551614 drop table t1; create table t1 ( a int not null default 1, big bigint ); @@ -70,3 +74,13 @@ select * from t1 limit 9999999999; id a 9999999999 1 drop table t1; +CREATE TABLE t1 ( quantity decimal(60,0)); +insert into t1 values (10000000000000000000); +insert into t1 values (10000000000000000000.0); +insert into t1 values ('10000000000000000000'); +select * from t1; +quantity +-8446744073709551616 +10000000000000000000 +10000000000000000000 +drop table t1; diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 4aab3defa2b..e9d432de077 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -90,20 +90,22 @@ CASE WHEN 1 THEN 1 ELSE 'a' END AS c4, CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5, CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6, CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7, -CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8 +CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8, +CASE WHEN 1 THEN 1.0 END AS c9 ; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(1) character set latin1 collate latin1_danish_ci default NULL, - `c2` char(1) character set latin1 collate latin1_danish_ci default NULL, - `c3` char(1) default NULL, - `c4` char(1) default NULL, - `c5` char(3) default NULL, - `c6` char(3) default NULL, - `c7` double(3,1) default NULL, - `c8` double(3,1) default NULL -) TYPE=MyISAM CHARSET=latin1 + `c1` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '', + `c2` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '', + `c3` char(1) NOT NULL default '', + `c4` char(1) NOT NULL default '', + `c5` char(3) NOT NULL default '', + `c6` char(3) NOT NULL default '', + `c7` double(3,1) NOT NULL default '0.0', + `c8` double(3,1) NOT NULL default '0.0', + `c9` double(3,1) default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SELECT CASE WHEN 1 @@ -150,5 +152,5 @@ t1 CREATE TABLE `t1` ( `COALESCE(1,'1')` char(1) NOT NULL default '', `COALESCE(1.1,'1')` char(3) NOT NULL default '', `COALESCE('a' COLLATE latin1_bin,'b')` char(1) character set latin1 collate latin1_bin NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 974a79580ae..43afd02169c 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -45,7 +45,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `t` char(4) character set cp1251 NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select cast(_latin1'ab' AS char) as c1, @@ -72,7 +72,7 @@ t1 CREATE TABLE `t1` ( `c3` char(2) binary NOT NULL default '', `c4` char(2) binary NOT NULL default '', `c5` char(2) binary NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select cast(_koi8r'' AS nchar) as c1, @@ -99,7 +99,7 @@ t1 CREATE TABLE `t1` ( `c3` char(2) character set utf8 NOT NULL default '', `c4` char(2) character set utf8 NOT NULL default '', `c5` char(2) character set utf8 NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select cast("2001-1-1" as date) = "2001-01-01"; cast("2001-1-1" as date) = "2001-01-01" diff --git a/mysql-test/r/count_distinct3.result b/mysql-test/r/count_distinct3.result index 633bb2fa252..086e1360b0c 100644 --- a/mysql-test/r/count_distinct3.result +++ b/mysql-test/r/count_distinct3.result @@ -5,3 +5,4 @@ COUNT(*) 4181000 SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp; DROP TABLE t1; +set @@read_buffer_size=default; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index d61614180b3..28f06f0bf47 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -179,7 +179,7 @@ t1 CREATE TABLE `t1` ( KEY `b_29` (`b`), KEY `b_30` (`b`), KEY `b_31` (`b`) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 select if(1,'1','0'), month("2002-08-02"); drop table t1; @@ -197,7 +197,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0' -) TYPE=HEAP CHARSET=latin1 +) TYPE=HEAP DEFAULT CHARSET=latin1 drop table t1; SET SESSION table_type="gemini"; SELECT @@table_type; @@ -210,7 +210,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SET SESSION table_type=default; drop table t1; create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2)); @@ -275,7 +275,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `id` int(11) NOT NULL default '0', `name` char(20) default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id name create table if not exists t3 like t1; @@ -289,7 +289,7 @@ show create table t3; Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `id` int(11) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id drop table t3; @@ -298,7 +298,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `id` int(11) NOT NULL default '0', `name` char(20) default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id name drop table t2, t3; @@ -313,14 +313,14 @@ Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `id` int(11) NOT NULL default '0', `name` char(20) default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 create table t2 like t3; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `id` int(11) NOT NULL default '0', `name` char(20) default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 select * from t2; id name create table t3 like t1; @@ -346,7 +346,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0' -) TYPE=HEAP CHARSET=latin1 +) TYPE=HEAP DEFAULT CHARSET=latin1 drop table t1; SET SESSION table_type="gemini"; SELECT @@table_type; @@ -359,7 +359,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SET SESSION table_type=default; drop table t1; create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob); diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index 6a9da97042b..2186b155f99 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -491,7 +491,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `latin1_f` char(32) NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SHOW FIELDS FROM t1; Field Type Null Key Default Extra latin1_f char(32) @@ -501,7 +501,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `latin1_f` char(32) character set latin1 collate latin1_bin default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SHOW FIELDS FROM t1; Field Type Null Key Default Extra latin1_f char(32) YES NULL @@ -509,8 +509,8 @@ ALTER TABLE t1 CHARACTER SET latin1 COLLATE latin1_bin; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `latin1_f` char(32) collate latin1_bin default NULL -) TYPE=MyISAM CHARSET=latin1 COLLATE=latin1_bin + `latin1_f` char(32) character set latin1 collate latin1_bin default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 SHOW FIELDS FROM t1; Field Type Null Key Default Extra latin1_f char(32) YES NULL diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index 07ea97258d9..f1049b81d26 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -225,7 +225,7 @@ t1 CREATE TABLE `t1` ( `word` varchar(255) collate latin1_german2_ci NOT NULL default '', `word2` varchar(255) collate latin1_german2_ci NOT NULL default '', KEY `word` (`word`) -) TYPE=MyISAM CHARSET=latin1 COLLATE=latin1_german2_ci +) TYPE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae'); update t1 set word2=word; select word, word=binary 0xdf as t from t1 having t > 0; @@ -284,7 +284,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `s1` char(5) collate latin1_german2_ci default NULL -) TYPE=MyISAM CHARSET=latin1 COLLATE=latin1_german2_ci +) TYPE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci INSERT INTO t1 VALUES (''); INSERT INTO t1 VALUES ('ue'); SELECT DISTINCT s1 FROM t1; diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result index c465655473d..764503f9e22 100644 --- a/mysql-test/r/ctype_many.result +++ b/mysql-test/r/ctype_many.result @@ -9,14 +9,14 @@ Table Create Table t1 CREATE TABLE `t1` ( `comment` char(32) character set latin1 NOT NULL default '', `koi8_ru_f` char(32) character set koi8r NOT NULL default '' -) TYPE=MyISAM CHARSET=latin5 +) TYPE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 CHANGE comment comment CHAR(32) CHARACTER SET latin2 NOT NULL; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `comment` char(32) character set latin2 NOT NULL default '', `koi8_ru_f` char(32) character set koi8r NOT NULL default '' -) TYPE=MyISAM CHARSET=latin5 +) TYPE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 ADD latin5_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; Table Create Table @@ -24,8 +24,8 @@ t1 CREATE TABLE `t1` ( `comment` char(32) character set latin2 NOT NULL default '', `koi8_ru_f` char(32) character set koi8r NOT NULL default '', `latin5_f` char(32) NOT NULL default '' -) TYPE=MyISAM CHARSET=latin5 -ALTER TABLE t1 CHARSET=latin2; +) TYPE=MyISAM DEFAULT CHARSET=latin5 +ALTER TABLE t1 DEFAULT CHARSET=latin2; ALTER TABLE t1 ADD latin2_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; Table Create Table @@ -34,14 +34,14 @@ t1 CREATE TABLE `t1` ( `koi8_ru_f` char(32) character set koi8r NOT NULL default '', `latin5_f` char(32) character set latin5 NOT NULL default '', `latin2_f` char(32) NOT NULL default '' -) TYPE=MyISAM CHARSET=latin2 +) TYPE=MyISAM DEFAULT CHARSET=latin2 ALTER TABLE t1 DROP latin2_f, DROP latin5_f; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `comment` char(32) NOT NULL default '', `koi8_ru_f` char(32) character set koi8r NOT NULL default '' -) TYPE=MyISAM CHARSET=latin2 +) TYPE=MyISAM DEFAULT CHARSET=latin2 INSERT INTO t1 (koi8_ru_f,comment) VALUES ('a','LAT SMALL A'); INSERT INTO t1 (koi8_ru_f,comment) VALUES ('b','LAT SMALL B'); INSERT INTO t1 (koi8_ru_f,comment) VALUES ('c','LAT SMALL C'); diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index ce4a4f98b42..88cd1b4f7fe 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -5,7 +5,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c1` char(4) character set utf8 NOT NULL default '', `c2` char(4) character set utf8 NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 DELETE FROM t1; ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8; SHOW CREATE TABLE t1; @@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` ( `c1` char(4) character set utf8 NOT NULL default '', `c2` char(4) character set utf8 NOT NULL default '', `c3` char(4) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); Warnings: Warning 1264 Data truncated for column 'c1' at row 1 @@ -30,7 +30,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` char(4) character set utf8 default NULL, KEY `key_a` (`a`(3)) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 key_a 1 a A NULL 9 NULL YES BTREE @@ -40,7 +40,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` char(4) default NULL, KEY `key_a` (`a`(3)) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 key_a 1 a A NULL 3 NULL YES BTREE @@ -50,7 +50,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` char(4) character set utf8 default NULL, KEY `key_a` (`a`(3)) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 key_a 1 a A NULL 9 NULL YES BTREE diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 1fe07692290..5afd2c041c8 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -6,7 +6,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` char(10) character set cp1251 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SELECT a FROM t1; a @@ -25,7 +25,7 @@ SHOW CREATE TABLE ; Table Create Table CREATE TABLE `` ( `` char(32) character set koi8r NOT NULL default '' COMMENT ' ' -) TYPE=MyISAM CHARSET=latin1 COMMENT=' ' +) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT=' ' SHOW FIELDS FROM ; Field Type Null Key Default Extra char(32) @@ -37,7 +37,7 @@ SHOW CREATE TABLE ; Table Create Table CREATE TABLE `` ( `` char(32) character set koi8r NOT NULL default '' COMMENT ' ' -) TYPE=MyISAM CHARSET=latin1 COMMENT=' ' +) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT=' ' SHOW FIELDS FROM ; Field Type Null Key Default Extra char(32) @@ -49,7 +49,7 @@ SHOW CREATE TABLE таблица; Table Create Table таблица CREATE TABLE `таблица` ( `поле` char(32) character set koi8r NOT NULL default '' COMMENT 'комментарий поля' -) TYPE=MyISAM CHARSET=latin1 COMMENT='комментарий таблицы' +) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='комментарий таблицы' SHOW FIELDS FROM таблица; Field Type Null Key Default Extra поле char(32) diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index db626c8acb1..977797f0278 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -45,7 +45,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `l` char(10) character set ucs2 NOT NULL default '', `r` char(10) character set ucs2 NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SET NAMES koi8r; SET character_set_connection=ucs2; diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 346d086f34c..5eb21c40a3e 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -120,7 +120,7 @@ date format str_to_date 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.000044 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 -15 SEPTEMB 2001 %d %M %Y 2001-01-15 00:00:00 +15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 @@ -144,7 +144,7 @@ date format con 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.000044 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 -15 SEPTEMB 2001 %d %M %Y 2001-01-15 00:00:00 +15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 @@ -168,7 +168,7 @@ date format datetime 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.000044 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 -15 SEPTEMB 2001 %d %M %Y 2001-01-15 00:00:00 +15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 @@ -192,7 +192,7 @@ date format date2 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 15 September 2001 %d %M %Y 2001-09-15 -15 SEPTEMB 2001 %d %M %Y 2001-01-15 +15 SEPTEMB 2001 %d %M %Y 2001-09-15 15 MAY 2001 %d %b %Y 2001-05-15 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index cd45cf03853..62724c19576 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1,t11,t12,t2; CREATE TABLE t1 (a tinyint(3), b tinyint(5)); INSERT INTO t1 VALUES (1,1); INSERT LOW_PRIORITY INTO t1 VALUES (1,2); @@ -58,3 +58,65 @@ select count(*) from t1; count(*) 0 drop table t1; +create table t11 (a int NOT NULL, b int, primary key (a)); +create table t12 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t11 values (0, 10),(1, 11),(2, 12); +insert into t12 values (33, 10),(0, 11),(2, 12); +insert into t2 values (1, 21),(2, 12),(3, 23); +select * from t11; +a b +0 10 +1 11 +2 12 +select * from t12; +a b +33 10 +0 11 +2 12 +select * from t2; +a b +1 21 +2 12 +3 23 +delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); +ERROR 21000: Subquery returns more than 1 row +select * from t11; +a b +0 10 +1 11 +2 12 +select * from t12; +a b +33 10 +0 11 +2 12 +delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); +Warnings: +Error 1241 Subquery returns more than 1 row +Error 1241 Subquery returns more than 1 row +select * from t11; +a b +0 10 +1 11 +select * from t12; +a b +33 10 +0 11 +insert into t11 values (2, 12); +delete from t11 where t11.b <> (select b from t2 where t11.a < t2.a); +ERROR 21000: Subquery returns more than 1 row +select * from t11; +a b +0 10 +1 11 +2 12 +delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a); +Warnings: +Error 1241 Subquery returns more than 1 row +Error 1241 Subquery returns more than 1 row +select * from t11; +a b +0 10 +1 11 +drop table t11, t12, t2; diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index c59b68e4c4d..bb268cd1094 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -164,7 +164,7 @@ create table t1 (mat_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, create table t2 (mat_id MEDIUMINT UNSIGNED NOT NULL, pla_id MEDIUMINT UNSIGNED NOT NULL); insert into t1 values (NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd', 4), (NULL, 'e', 5), (NULL, 'f', 6), (NULL, 'g', 7), (NULL, 'h', 8), (NULL, 'i', 9); insert into t2 values (1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), (3, 101), (3, 102), (3, 105); -SELECT d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; pla_id mat_id 100 1 101 1 @@ -172,7 +172,7 @@ pla_id mat_id 103 2 104 2 105 3 -SELECT d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; pla_id test 100 1 101 1 @@ -180,13 +180,13 @@ pla_id test 103 2 104 2 105 3 -explain SELECT d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY m2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m2 index NULL PRIMARY 3 NULL 9 Using index -explain SELECT d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY m2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 56f95ff0c90..5cb4263f649 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -201,7 +201,7 @@ t2 CREATE TABLE `t2` ( `inhalt` text, KEY `tig` (`ticket`), FULLTEXT KEY `tix` (`inhalt`) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 select * from t2 where MATCH inhalt AGAINST (NULL); ticket inhalt select * from t2 where MATCH inhalt AGAINST ('foobar'); @@ -306,18 +306,27 @@ INSERT t1 VALUES ('Mit freundlichem Gr'), ('aus Osnabrck'); SET NAMES koi8r; INSERT t1 VALUES (" - "),(", !"), (" , !"),(" !"); -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST (''); -t charset(t) - - utf8 -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('*' IN BOOLEAN MODE); -t charset(t) - ! utf8 +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST (''); +t collation(t) + - utf8_general_ci +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('*' IN BOOLEAN MODE); +t collation(t) + ! utf8_general_ci SELECT * FROM t1 WHERE MATCH t AGAINST ('' IN BOOLEAN MODE); t -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); -t charset(t) +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +t collation(t) SET NAMES latin1; -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); -t charset(t) -aus Osnabrck utf8 +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +t collation(t) +aus Osnabrck utf8_general_ci +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); +t collation(t) +alter table t1 modify t varchar(200) collate latin1_german2_ci not null; +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +t collation(t) +aus Osnabrck latin1_german2_ci +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); +t collation(t) +aus Osnabrck latin1_german2_ci DROP TABLE t1; diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index e43f9a9119e..64b6d7e65f9 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -539,7 +539,7 @@ t1 CREATE TABLE `t1` ( `substring(_latin2'ab',1)` char(2) character set latin2 NOT NULL default '', `insert(_latin2'abcd',2,3,_latin2'ef')` char(6) character set latin2 NOT NULL default '', `replace(_latin2'abcd',_latin2'b',_latin2'B')` char(4) character set latin2 NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select SUBSTR('abcdefg',3,2); SUBSTR('abcdefg',3,2) diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index 9d370b43099..d045d4865dc 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -49,7 +49,7 @@ t1 CREATE TABLE `t1` ( `database()` char(34) character set utf8 NOT NULL default '', `user()` char(77) character set utf8 NOT NULL default '', `version` char(40) default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select TRUE,FALSE,NULL; TRUE FALSE NULL diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 9d38083f48a..feaebc9b514 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -468,6 +468,23 @@ select date_add(time,INTERVAL 1 SECOND) from t1; date_add(time,INTERVAL 1 SECOND) 2006-07-08 00:00:01 drop table t1; +select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2, +last_day('2003-03-32') as f3, last_day('2003-04-01') as f4, +last_day('2001-01-01 01:01:01') as f5, last_day(NULL), +last_day('2001-02-12'); +f1 f2 f3 f4 f5 last_day(NULL) last_day('2001-02-12') +2000-02-29 2002-12-31 NULL 2003-04-30 2001-01-31 NULL 2001-02-28 +create table t1 select last_day('2000-02-05') as a; +describe t1; +Field Type Null Key Default Extra +a date 0000-00-00 +select * from t1; +a +2000-02-29 +drop table t1; +select last_day('2000-02-05'); +last_day('2000-02-05') +2000-02-29 select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0; strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0 1 diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 173a065adc2..ca54ec59938 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -11,7 +11,7 @@ t1 CREATE TABLE `t1` ( `g` geometry NOT NULL default '', PRIMARY KEY (`fid`), SPATIAL KEY `g` (`g`(32)) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(150 150, 150 150)')); INSERT INTO t1 (g) VALUES (GeomFromText('LineString(149 149, 151 151)')); INSERT INTO t1 (g) VALUES (GeomFromText('LineString(148 148, 152 152)')); @@ -294,7 +294,7 @@ t2 CREATE TABLE `t2` ( `g` geometry NOT NULL default '', PRIMARY KEY (`fid`), SPATIAL KEY `g` (`g`(32)) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 SELECT count(*) FROM t2; count(*) 100 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index af39dbf51f1..0ebf3d50ab8 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3,t4; drop database if exists mysqltest; create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=innodb; insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt'); @@ -819,7 +819,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` char(20) default NULL, KEY `a` (`a`(5)) -) TYPE=InnoDB CHARSET=latin1 +) TYPE=InnoDB DEFAULT CHARSET=latin1 drop table t1; create temporary table t1 (a int not null auto_increment, primary key(a)) type=innodb; insert into t1 values (NULL),(NULL),(NULL); diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 79fe0599bc4..4bc4cad40a4 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -1,3 +1,4 @@ +drop table if exists t1, t2, t3; SET @save_key_buffer=@@key_buffer_size; SELECT @@key_buffer_size, @@small.key_buffer_size; @@key_buffer_size @@small.key_buffer_size @@ -74,15 +75,15 @@ select @@keycache1.key_buffer_size; 0 select @@keycache1.key_cache_block_size; @@keycache1.key_cache_block_size -0 +2048 select @@key_buffer_size; @@key_buffer_size 2097152 select @@key_cache_block_size; @@key_cache_block_size 1024 -drop table if exists t1, t2; -create table t1 (p int primary key, a char(10)); +set global keycache1.key_buffer_size=1024*1024; +create table t1 (p int primary key, a char(10)) delay_key_write=1; create table t2 (p int primary key, i int, a char(10), key k1(i), key k2(a)); insert into t1 values (1, 'qqqq'), (11, 'yyyy'); insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'), @@ -99,7 +100,7 @@ p i a 4 3 zzzz update t1 set p=2 where p=1; update t2 set i=2 where i=1; -cache index t1 keys in keycache1; +cache index t1 keys (`primary`) in keycache1; Table Op Msg_type Msg_text test.t1 assign_to_keycache status OK explain select p from t1; @@ -125,15 +126,15 @@ id select_type table type possible_keys key key_len ref rows Extra select count(*) from t1, t2 where t1.p = t2.i; count(*) 3 -cache index t2 keys in keycache1; +cache index t2 in keycache1; Table Op Msg_type Msg_text test.t2 assign_to_keycache status OK update t2 set p=p+1000, i=2 where a='qqqq'; -cache index t2 keys in keycache2; +cache index t2 in keycache2; Table Op Msg_type Msg_text test.t2 assign_to_keycache status OK insert into t2 values (2000, 3, 'yyyy'); -cache index t2 keys in keycache1; +cache index t2 in keycache1; Table Op Msg_type Msg_text test.t2 assign_to_keycache status OK update t2 set p=3000 where a='zzzz'; @@ -174,6 +175,12 @@ qqqq yyyy yyyy zzzz +cache index t1 in unknown_key_cache; +ERROR HY000: Unknown key cache 'unknown_key_cache' +cache index t1 keys (unknown_key) in keycache1; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache error Key column 'unknown_key' doesn't exist in table +test.t1 assign_to_keycache status Operation failed select @@keycache2.key_buffer_size; @@keycache2.key_buffer_size 4194304 @@ -186,7 +193,11 @@ select @@keycache2.key_buffer_size; 0 select @@keycache2.key_cache_block_size; @@keycache2.key_cache_block_size -0 +1024 +set global keycache2.key_buffer_size=1024*1024; +select @@keycache2.key_buffer_size; +@@keycache2.key_buffer_size +1048576 update t2 set p=4000 where a='zzzz'; update t1 set p=p+1; set global keycache1.key_buffer_size=0; @@ -232,3 +243,17 @@ select p from t1; p 3 12 +create table t3 (like t1); +cache index t3 in small; +Table Op Msg_type Msg_text +test.t3 assign_to_keycache status OK +insert into t3 select * from t1; +cache index t3 in keycache2; +Table Op Msg_type Msg_text +test.t3 assign_to_keycache status OK +cache index t1,t2 in default; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +test.t2 assign_to_keycache status OK +drop table t1,t2,t3; +set global keycache1.key_buffer_size=0; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 9a99d1c64fb..01635313590 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -175,7 +175,7 @@ t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL default '0', `b` char(20) default NULL, KEY `a` (`a`) -) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`t2`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) create table t4 (a int not null, b char(10), key(a)) type=MERGE UNION=(t1,t2); select * from t4; ERROR HY000: Can't open file: 't4.MRG' (errno: 143) @@ -190,7 +190,7 @@ t5 CREATE TABLE `t5` ( `a` int(11) NOT NULL default '0', `b` char(20) default NULL, KEY `a` (`a`) -) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`mysqltest`.`t6`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`mysqltest`.`t6`) alter table t5 type=myisam; drop table t5, mysqltest.t6; drop database mysqltest; @@ -263,14 +263,14 @@ t3 CREATE TABLE `t3` ( `incr` int(11) NOT NULL default '0', `othr` int(11) NOT NULL default '0', PRIMARY KEY (`incr`) -) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`t2`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) alter table t3 drop primary key; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( `incr` int(11) NOT NULL default '0', `othr` int(11) NOT NULL default '0' -) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`t2`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) drop table t3,t2,t1; create table t1 (a int not null, key(a)) type=merge; select * from t1; @@ -299,28 +299,28 @@ t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', KEY `a` (`a`,`b`) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 show create table t4; Table Create Table t4 CREATE TABLE `t4` ( `a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', KEY `a` (`a`,`b`) -) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`t2`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) show create table t5; Table Create Table t5 CREATE TABLE `t5` ( `a` int(11) NOT NULL default '0', `b` int(11) NOT NULL auto_increment, PRIMARY KEY (`a`,`b`) -) TYPE=MRG_MyISAM CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`) show create table t6; Table Create Table t6 CREATE TABLE `t6` ( `a` int(11) NOT NULL default '0', `b` int(11) NOT NULL auto_increment, PRIMARY KEY (`a`,`b`) -) TYPE=MRG_MyISAM CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`) insert into t1 values (1,NULL),(1,NULL),(1,NULL),(1,NULL); insert into t2 values (2,NULL),(2,NULL),(2,NULL),(2,NULL); select * from t3 order by b,a limit 3; @@ -385,7 +385,7 @@ t4 CREATE TABLE `t4` ( `a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', KEY `a` (`a`,`b`) -) TYPE=MRG_MyISAM CHARSET=latin1 UNION=(`t1`,`t2`,`t3`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`,`t3`) select * from t4 order by a,b; a b 1 1 @@ -411,7 +411,7 @@ t4 CREATE TABLE `t4` ( `a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', KEY `a` (`a`,`b`) -) TYPE=MRG_MyISAM CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`,`t3`) +) TYPE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`,`t3`) insert into t4 values (4,1),(4,2); select * from t1 order by a,b; a b diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index a7579b538b5..b0d597f238a 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -341,3 +341,25 @@ select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and a b a b 2 2 NULL NULL drop table t1,t2; +create table t1 ( a int not null, b int not null) ; +alter table t1 add index i1(a); +delete from t1 where a > 2000000; +create table t2 like t1; +insert into t2 select * from t1; +select 't2 rows before small delete', count(*) from t1; +t2 rows before small delete count(*) +t2 rows before small delete 2000000 +delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 2; +select 't2 rows after small delete', count(*) from t2; +t2 rows after small delete count(*) +t2 rows after small delete 1999999 +select 't1 rows after small delete', count(*) from t1; +t1 rows after small delete count(*) +t1 rows after small delete 1999999 +delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 100*1000; +select 't2 rows after big delete', count(*) from t2; +t2 rows after big delete count(*) +t2 rows after big delete 1900001 +select 't1 rows after big delete', count(*) from t1; +t1 rows after big delete count(*) +t1 rows after big delete 1900001 diff --git a/mysql-test/r/preload.result b/mysql-test/r/preload.result index 4d9293c7929..bd7b828d5b9 100644 --- a/mysql-test/r/preload.result +++ b/mysql-test/r/preload.result @@ -69,7 +69,7 @@ flush status; select @@preload_buffer_size; @@preload_buffer_size 32768 -load index into cache t1 keys; +load index into cache t1; Table Op Msg_type Msg_text test.t1 preload_keys status OK show status like "key_read%"; @@ -93,7 +93,7 @@ set session preload_buffer_size=256*1024; select @@preload_buffer_size; @@preload_buffer_size 262144 -load index into cache t1 keys ignore leaves; +load index into cache t1 ignore leaves; Table Op Msg_type Msg_text test.t1 preload_keys status OK show status like "key_read%"; @@ -117,7 +117,7 @@ set session preload_buffer_size=1*1024; select @@preload_buffer_size; @@preload_buffer_size 1024 -load index into cache t1 keys, t2 keys (primary,b) ignore leaves; +load index into cache t1, t2 keys (primary,b) ignore leaves; Table Op Msg_type Msg_text test.t1 preload_keys status OK test.t2 preload_keys status OK @@ -141,7 +141,7 @@ show status like "key_read%"; Variable_name Value Key_read_requests 0 Key_reads 0 -load index into cache t3 keys, t2 keys (primary,b) ; +load index into cache t3, t2 keys (primary,b) ; Table Op Msg_type Msg_text test.t3 preload_keys error Table 'test.t3' doesn't exist test.t2 preload_keys status OK diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index e91153cae15..e668b9031cc 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -586,7 +586,7 @@ select * from t1; a set GLOBAL query_cache_size=1024; Warnings: -Warning 1285 Query cache failed to set size 1024, new query cache size is 0 +Warning 1281 Query cache failed to set size 1024, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -594,7 +594,7 @@ select * from t1; a set GLOBAL query_cache_size=10240; Warnings: -Warning 1285 Query cache failed to set size 10240, new query cache size is 0 +Warning 1281 Query cache failed to set size 10240, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -602,7 +602,7 @@ select * from t1; a set GLOBAL query_cache_size=20480; Warnings: -Warning 1285 Query cache failed to set size 20480, new query cache size is 0 +Warning 1281 Query cache failed to set size 20480, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -610,7 +610,7 @@ select * from t1; a set GLOBAL query_cache_size=40960; Warnings: -Warning 1285 Query cache failed to set size 40960, new query cache size is 0 +Warning 1281 Query cache failed to set size 40960, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 diff --git a/mysql-test/r/rpl000015.result b/mysql-test/r/rpl000015.result index 98ad998f2ed..8cbbe3ab0e8 100644 --- a/mysql-test/r/rpl000015.result +++ b/mysql-test/r/rpl000015.result @@ -1,22 +1,22 @@ reset master; show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 79 reset slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master change master to master_host='127.0.0.1'; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123 None 0 No # drop table if exists t1; create table t1 (n int); diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result new file mode 100644 index 00000000000..883cb65171c --- /dev/null +++ b/mysql-test/r/rpl_change_master.result @@ -0,0 +1,32 @@ +stop slave; +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; +start slave; +select get_lock("a",5); +get_lock("a",5) +1 +create table t1(n int); +insert into t1 values(1+get_lock("a",10)*0); +insert into t1 values(2); +stop slave; +select * from t1; +n +1 +show slave status; +Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +# 127.0.0.1 root 9306 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No # +change master to master_user='root'; +show slave status; +Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +# 127.0.0.1 root 9306 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No # +select release_lock("a"); +release_lock("a") +1 +start slave; +select * from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/r/rpl_empty_master_crash.result b/mysql-test/r/rpl_empty_master_crash.result index 41c5ebe47e1..3e234d4ef59 100644 --- a/mysql-test/r/rpl_empty_master_crash.result +++ b/mysql-test/r/rpl_empty_master_crash.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master load table t1 from master; ERROR 08S01: Error connecting to master: Master is not configured load table t1 from master; diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result index 2baa69d4aad..8d5bbf91561 100644 --- a/mysql-test/r/rpl_error_ignored_table.result +++ b/mysql-test/r/rpl_error_ignored_table.result @@ -8,7 +8,7 @@ create table t1 (a int primary key); insert into t1 values (1),(1); ERROR 23000: Duplicate entry '1' for key 1 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 213 slave-relay-bin.000002 257 master-bin.000001 Yes Yes test.t1 0 0 213 257 None 0 No # show tables like 't1'; Tables_in_test (t1) diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result index e0f85210616..6992b635672 100644 --- a/mysql-test/r/rpl_flush_log_loop.result +++ b/mysql-test/r/rpl_flush_log_loop.result @@ -13,5 +13,5 @@ master_password='',master_port=SLAVE_PORT; start slave; flush logs; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000002 4 slave-bin.000001 Yes Yes 0 0 79 4 None 0 No # diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index 092b14cacfb..65fc9d1b415 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -21,7 +21,7 @@ day id category name 2003-03-22 2161 c asdf 2003-03-22 2416 a bbbbb show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB slave-bin.000001 964 drop table t1; drop table t2; @@ -32,7 +32,7 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1; set global sql_slave_skip_counter=1; start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1311 slave-relay-bin.000002 1355 master-bin.000001 Yes Yes 0 0 1311 1355 None 0 No # set sql_log_bin=0; delete from t1; @@ -42,8 +42,8 @@ stop slave; change master to master_user='test'; change master to master_user='root'; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1442 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1442 4 None 0 No # +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1419 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1419 4 None 0 No # set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -53,7 +53,7 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1; stop slave; reset slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), @@ -63,6 +63,6 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 1 show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 491 drop table t2; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 6860067a2d4..2f8a54369c9 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -95,7 +95,7 @@ slave-bin.000002 4 Query 1 4 use `test`; create table t1 (n int) slave-bin.000002 62 Query 1 62 use `test`; insert into t1 values (1) slave-bin.000002 122 Query 1 122 use `test`; drop table t1 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000003 214 master-bin.000002 Yes Yes 0 0 276 214 None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index 098fb056cc6..10c78272de6 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -5,10 +5,10 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 79 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 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 123 None 0 No # stop slave; change master to master_log_pos=73; @@ -16,20 +16,20 @@ start slave; stop slave; change master to master_log_pos=73; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4 None 0 No # start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 48 master-bin.000001 No Yes 0 0 73 48 None 0 No # stop slave; change master to master_log_pos=173; start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4 None 0 No # show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 79 create table if not exists t1 (n int); drop table if exists t1; diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result index 2d08ca6e3a3..5c3360b0f66 100644 --- a/mysql-test/r/rpl_max_relay_size.result +++ b/mysql-test/r/rpl_max_relay_size.result @@ -15,7 +15,7 @@ select @@global.max_relay_log_size; 4096 start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000014 1221 master-bin.000001 Yes Yes 0 0 50477 1221 None 0 No # stop slave; reset slave; @@ -25,7 +25,7 @@ select @@global.max_relay_log_size; 20480 start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000004 9457 master-bin.000001 Yes Yes 0 0 50477 9457 None 0 No # stop slave; reset slave; @@ -35,27 +35,27 @@ select @@global.max_relay_log_size; 0 start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000008 1283 master-bin.000001 Yes Yes 0 0 50477 1283 None 0 No # stop slave; reset slave; flush logs; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # reset slave; start slave; flush logs; create table t1 (a int); show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50535 slave-relay-bin.000009 62 master-bin.000001 Yes Yes 0 0 50535 62 None 0 No # flush logs; drop table t1; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50583 slave-relay-bin.000010 52 master-bin.000001 Yes Yes 0 0 50583 52 None 0 No # flush logs; show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000002 4 diff --git a/mysql-test/r/rpl_openssl.result b/mysql-test/r/rpl_openssl.result index 32760f2c870..ad7251fd631 100644 --- a/mysql-test/r/rpl_openssl.result +++ b/mysql-test/r/rpl_openssl.result @@ -19,12 +19,12 @@ select * from t1; t 1 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 replssl MASTER_MYPORT 1 master-bin.000001 289 slave-relay-bin.000001 108 master-bin.000001 Yes Yes 0 0 289 108 None 0 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # stop slave; change master to master_user='root',master_password='', master_ssl=0; start slave; drop table t1; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 337 slave-relay-bin.000001 96 master-bin.000001 Yes Yes 0 0 337 96 None 0 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # diff --git a/mysql-test/r/rpl_redirect.result b/mysql-test/r/rpl_redirect.result index 24a0b1af541..9dd51eaba4d 100644 --- a/mysql-test/r/rpl_redirect.result +++ b/mysql-test/r/rpl_redirect.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; SHOW SLAVE STATUS; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master SHOW SLAVE HOSTS; Server_id Host Port Rpl_recovery_rank Master_id 2 127.0.0.1 SLAVE_PORT 2 1 diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index 271ee9cefa1..43de4a67ce9 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -27,5 +27,5 @@ select * from t11; ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1325 None 0 No # diff --git a/mysql-test/r/rpl_reset_slave.result b/mysql-test/r/rpl_reset_slave.result index e1fbf12786d..42d41533cb0 100644 --- a/mysql-test/r/rpl_reset_slave.result +++ b/mysql-test/r/rpl_reset_slave.result @@ -5,20 +5,20 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 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 123 None 0 No # stop slave; change master to master_user='test'; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 test MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 79 4 None 0 No # reset slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 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 123 None 0 No # stop slave; reset slave; diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index 4e31164f2ec..87ebf870f38 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -15,7 +15,7 @@ insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461 None 0 No # select * from t1; s @@ -56,7 +56,7 @@ Log_name master-bin.000003 insert into t2 values (65); show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088 None 0 No # select * from t2; m @@ -74,13 +74,13 @@ Log_name master-bin.000003 master-bin.000004 show master status; -File Position Binlog_do_db Binlog_ignore_db +File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000004 2886 select * from t4; a testing temporary tables part 2 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 60 master-bin.000004 2886 slave-relay-bin.000001 7891 master-bin.000004 Yes Yes 0 0 2886 7891 None 0 No # lock tables t3 read; select count(*) from t3 where n >= 4; diff --git a/mysql-test/r/rpl_trunc_binlog.result b/mysql-test/r/rpl_trunc_binlog.result index caca15ab4ef..39b754dec47 100644 --- a/mysql-test/r/rpl_trunc_binlog.result +++ b/mysql-test/r/rpl_trunc_binlog.result @@ -9,5 +9,5 @@ flush logs; reset slave; start slave; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. Probably cause is that the master died while writing the transaction to it's binary log. 0 79 326 None 0 No # diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 3ee902cfc09..854a8605abb 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -30,7 +30,7 @@ n 3 4 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 332 master-bin.000001 Yes No 0 0 244 649 Master master-bin.000001 244 No # start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; @@ -40,7 +40,7 @@ n 3 4 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 332 master-bin.000001 Yes No 0 0 244 649 Master master-no-such-bin.000001 291 No # start slave until relay_log_file='slave-relay-bin.000002', relay_log_pos=537; select * from t2; @@ -48,13 +48,13 @@ n 1 2 show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 537 master-bin.000001 Yes No 0 0 449 649 Relay slave-relay-bin.000002 537 No # start slave; stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=561; show slave status; -Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State 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 Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 649 master-bin.000001 Yes No 0 0 561 693 Master master-bin.000001 561 No # start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 2a5955e6d87..2f29dcfdb47 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -77,13 +77,13 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 alter table t1 rename t2; show create table t2; Table Create Table t2 CREATE TEMPORARY TABLE `t2` ( `a` int(11) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t2; create table t1 ( test_set set( 'val1', 'val2', 'val3' ) not null default '', @@ -96,7 +96,7 @@ t1 CREATE TABLE `t1` ( `test_set` set('val1','val2','val3') NOT NULL default '', `name` char(20) default 'O''Brien' COMMENT 'O''Brien as default', `c` int(11) NOT NULL default '0' COMMENT 'int column' -) TYPE=MyISAM CHARSET=latin1 COMMENT='it''s a table' +) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table' show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment test_set set('val1','val2','val3') latin1_swedish_ci select,insert,update,references @@ -109,7 +109,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', UNIQUE KEY `aa` (`a`) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, primary key (a)); show create table t1; @@ -117,7 +117,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', PRIMARY KEY (`a`) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; flush tables; show open tables; @@ -135,7 +135,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', `b` char(10) default NULL, KEY `b` (`b`) -) TYPE=MyISAM CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' +) TYPE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0; show create table t1; Table Create Table @@ -143,7 +143,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', `b` varchar(10) default NULL, KEY `b` (`b`) -) TYPE=MyISAM CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test' +) TYPE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test' ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK_KEYS=DEFAULT DELAY_KEY_WRITE=0 ROW_FORMAT=default; show create table t1; Table Create Table @@ -151,7 +151,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', `b` varchar(10) default NULL, KEY `b` (`b`) -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a decimal(9,2), b decimal (9,0), e double(9,2), f double(5,0), h float(3,2), i float(3,0)); show columns from t1; @@ -221,7 +221,7 @@ t1 CREATE TABLE `t1` ( `type_long_blob` longblob, PRIMARY KEY (`type_tiny`), KEY `type_short` (`type_short`) -) TYPE=MyISAM CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' +) TYPE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' insert into t1 (type_timestamp) values ("2003-02-07 10:00:01"); select * from t1; type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_numeric empty_char type_char type_varchar type_timestamp type_date type_time type_datetime type_year type_enum type_set type_tinyblob type_blob type_medium_blob type_long_blob diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 06451b8ac34..dddfe2432ee 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -18,7 +18,7 @@ t1 CREATE TABLE `t1` ( `email` varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY (`a`), UNIQUE KEY `email` TYPE BTREE (`email`) -) TYPE=HEAP CHARSET=latin1 ROW_FORMAT=DYNAMIC +) TYPE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set @@sql_mode="ansi_quotes"; show variables like 'sql_mode'; Variable_name Value @@ -31,7 +31,7 @@ t1 CREATE TABLE "t1" ( "email" varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY ("a"), UNIQUE KEY "email" TYPE BTREE ("email") -) TYPE=HEAP CHARSET=latin1 ROW_FORMAT=DYNAMIC +) TYPE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set @@sql_mode="no_table_options"; show variables like 'sql_mode'; Variable_name Value @@ -57,7 +57,7 @@ t1 CREATE TABLE `t1` ( `email` varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY (`a`), UNIQUE KEY `email` (`email`) -) TYPE=HEAP CHARSET=latin1 ROW_FORMAT=DYNAMIC +) TYPE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set @@sql_mode="no_field_options,mysql323,mysql40"; show variables like 'sql_mode'; Variable_name Value diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 31b5ff84365..95638cbee41 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1071,7 +1071,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` bigint(1) NOT NULL default '0', `(SELECT 1)` bigint(1) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a; SHOW CREATE TABLE t1; @@ -1079,7 +1079,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` bigint(1) NOT NULL default '0', `(SELECT a)` bigint(1) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a; SHOW CREATE TABLE t1; @@ -1087,7 +1087,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` bigint(1) NOT NULL default '0', `(SELECT a+0)` bigint(17) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a; select * from t1; @@ -1097,7 +1097,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` bigint(17) NOT NULL default '0' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int); insert into t1 values (1), (2), (3); diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index c31d1019d89..a56fe3e1462 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -40,7 +40,7 @@ t9 CREATE TABLE `t9` ( `b` char(16) NOT NULL default '', `c` int(11) NOT NULL default '0', PRIMARY KEY (`a`) -) TYPE=MyISAM CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' +) TYPE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' alter table t9 rename t8, add column d int not null; alter table t8 rename t7; rename table t7 to t9; @@ -62,5 +62,5 @@ t9 CREATE TABLE `t9` ( `c` int(11) NOT NULL default '0', `d` int(11) NOT NULL default '0', PRIMARY KEY (`a`) -) TYPE=MyISAM CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' +) TYPE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' drop database mysqltest; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 82aefa78bb2..d1147e55119 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -23,7 +23,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` mediumtext, `b` mediumblob -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2,t3 #; CREATE TABLE t1 (a char(257) default "hello"); diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index c0f0be246c9..f30feb4c0e6 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1627,12 +1627,12 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` enum('','a','b') NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a enum (' ','a','b ') not null default 'b '); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` enum('','a','b') NOT NULL default 'b' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/type_nchar.result b/mysql-test/r/type_nchar.result index c495853cd4c..63193418f77 100644 --- a/mysql-test/r/type_nchar.result +++ b/mysql-test/r/type_nchar.result @@ -4,47 +4,47 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c national char(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c national varchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` varchar(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c nvarchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` varchar(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c nchar varchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` varchar(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c national character varying(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` varchar(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c nchar varying(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` varchar(10) character set utf8 default NULL -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 086f55a47a5..e98ec2c3fc4 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -4,14 +4,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` set('','a','b') NOT NULL default '' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a set (' ','a','b ') not null default 'b '); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` set('','a','b') NOT NULL default 'b' -) TYPE=MyISAM CHARSET=latin1 +) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 ( user varchar(64) NOT NULL default '', path varchar(255) NOT NULL default '', privilege set('select','RESERVED30','RESERVED29','RESERVED28','RESERVED27','RESERVED26', 'RESERVED25','RESERVED24','data.delete','RESERVED22','RESERVED21', 'RESERVED20','data.insert.none','data.insert.approve', 'data.insert.delete','data.insert.move','data.insert.propose', 'data.insert.reject','RESERVED13','RESERVED12','RESERVED11','RESERVED10', 'RESERVED09','data.update','RESERVED07','RESERVED06','RESERVED05', 'RESERVED04','metadata.delete','metadata.put','RESERVED01','RESERVED00') NOT NULL default '', KEY user (user) ) TYPE=MyISAM CHARSET=utf8; DROP TABLE t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 5729d3b32ee..00eddd596cf 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -486,7 +486,7 @@ a b 2 2 3 3 4 4 -explain (select * from t1 where a=1 and b=10) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a); +explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 612c1f53bcf..fc3dc4eddcd 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -101,3 +101,22 @@ drop table t1; select @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b, @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b; @a:=10 @b:=2 @a>@b @a:="10" @b:="2" @a>@b @a:=10 @b:=2 @a>@b @a:="10" @b:="2" @a>@b 10 2 1 10 2 1 10 2 1 10 2 1 +create table t1 (i int not null); +insert t1 values (1),(2),(2),(3),(3),(3); +select @a:=0; +@a:=0 +0 +select @a, @a:=@a+count(*), count(*), @a from t1 group by i; +@a @a:=@a+count(*) count(*) @a +0 1 1 0 +0 2 2 0 +0 3 3 0 +select @a:=0; +@a:=0 +0 +select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i; +@a+0 @a:=@a+0+count(*) count(*) @a+0 +0 1 1 0 +1 3 2 0 +3 6 3 0 +drop table t1; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 06a5db13ea3..11fe997e789 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -170,6 +170,17 @@ select a,hex(a) from t1; alter table t1 change a a char(10) character set koi8r; select a,hex(a) from t1; +# +# Test ALTER TABLE .. CHARACTER SET .. +# +show create table t1; +alter table t1 DEFAULT CHARACTER SET latin1; +show create table t1; +alter table t1 CHARACTER SET latin1; +show create table t1; +alter table t1 DEFAULT CHARACTER SET cp1251; +show create table t1; + drop table t1; # diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 9ac44c8ba0a..5c977983087 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -22,7 +22,7 @@ select -(0-3),round(-(0-3)), round(9999999999999999999); # create table t1 (a bigint unsigned not null, primary key(a)); -insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE); +insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); select * from t1; select * from t1 where a=18446744073709551615; # select * from t1 where a='18446744073709551615'; @@ -54,3 +54,17 @@ insert into t1 values (null,1); select * from t1; select * from t1 limit 9999999999; drop table t1; + +# +# Item_uint::save_to_field() +# BUG#1845 +# This can't be fixed in MySQL 4.0 without loosing precisions for bigints +# + +CREATE TABLE t1 ( quantity decimal(60,0)); +insert into t1 values (10000000000000000000); +insert into t1 values (10000000000000000000.0); +insert into t1 values ('10000000000000000000'); +select * from t1; +drop table t1; + diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 9a1b6b6bbfe..9377c6c4aef 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -57,7 +57,8 @@ CREATE TABLE t1 SELECT CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5, CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6, CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7, - CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8 + CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8, + CASE WHEN 1 THEN 1.0 END AS c9 ; SHOW CREATE TABLE t1; DROP TABLE t1; diff --git a/mysql-test/t/count_distinct3.test b/mysql-test/t/count_distinct3.test index e6cc98d47df..9d2bb0d139a 100644 --- a/mysql-test/t/count_distinct3.test +++ b/mysql-test/t/count_distinct3.test @@ -21,6 +21,7 @@ while ($1) INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev); dec $1; } +set @@read_buffer_size=2*1024*1024; CREATE TABLE t2 SELECT * FROM t1; INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2; INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1; @@ -53,3 +54,5 @@ SELECT COUNT(*) FROM t1; SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp; --enable_result_log DROP TABLE t1; + +set @@read_buffer_size=default; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index cec7dd17e6d..0c1280751bc 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -40,9 +40,9 @@ create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null -- error 1044,1 create table not_existing_database.test (a int); ---error 1279 +--error 1103 create table `a/a` (a int); ---error 1279 +--error 1103 create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int); --error 1059 create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int); @@ -66,11 +66,11 @@ create table test_$1.test2$ (a int); drop table test_$1.test2$; drop database test_$1; ---error 1279 +--error 1103 create table `` (a int); ---error 1279 +--error 1103 drop table if exists ``; ---error 1279 +--error 1166 create table t1 (`` int); --error 1279 create table t1 (i int, index `` (i)); @@ -262,7 +262,7 @@ create table non_existing_database.t1 like t1; create table t3 like non_existing_table; --error 1050 create temporary table t3 like t1; ---error 1279 +--error 1103 create table t3 like `a/a`; drop table t1, t2, t3; drop table t3; diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test index a1549f952e5..7b44439aa50 100644 --- a/mysql-test/t/ctype_many.test +++ b/mysql-test/t/ctype_many.test @@ -16,7 +16,7 @@ ALTER TABLE t1 CHANGE comment comment CHAR(32) CHARACTER SET latin2 NOT NULL; SHOW CREATE TABLE t1; ALTER TABLE t1 ADD latin5_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; -ALTER TABLE t1 CHARSET=latin2; +ALTER TABLE t1 DEFAULT CHARSET=latin2; ALTER TABLE t1 ADD latin2_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; ALTER TABLE t1 DROP latin2_f, DROP latin5_f; diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index f1f751d728b..c529994f31b 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -3,7 +3,7 @@ # --disable_warnings -drop table if exists t1; +drop table if exists t1,t11,t12,t2; --enable_warnings CREATE TABLE t1 (a tinyint(3), b tinyint(5)); INSERT INTO t1 VALUES (1,1); @@ -71,3 +71,30 @@ delete from t1 where 3 > 2; select count(*) from t1; drop table t1; + +# +# IGNORE option +# +create table t11 (a int NOT NULL, b int, primary key (a)); +create table t12 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t11 values (0, 10),(1, 11),(2, 12); +insert into t12 values (33, 10),(0, 11),(2, 12); +insert into t2 values (1, 21),(2, 12),(3, 23); +select * from t11; +select * from t12; +select * from t2; +-- error 1241 +delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +select * from t12; +delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +select * from t12; +insert into t11 values (2, 12); +-- error 1241 +delete from t11 where t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +drop table t11, t12, t2; diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index ca881f73a4f..caf673d95c1 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -83,11 +83,11 @@ create table t2 (mat_id MEDIUMINT UNSIGNED NOT NULL, pla_id MEDIUMINT UNSIGNED N insert into t1 values (NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd', 4), (NULL, 'e', 5), (NULL, 'f', 6), (NULL, 'g', 7), (NULL, 'h', 8), (NULL, 'i', 9); insert into t2 values (1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), (3, 101), (3, 102), (3, 105); -SELECT d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; -SELECT d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; -explain SELECT d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; -explain SELECT d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; drop table t1,t2; # diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 3437e0a1440..a0292740c8d 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -133,9 +133,9 @@ select * from t2 having MATCH inhalt AGAINST ('foobar'); # check of fulltext errors # ---error 1286 +--error 1282 CREATE TABLE t3 (t int(11),i text,fulltext tix (t,i)); ---error 1286 +--error 1282 CREATE TABLE t3 (t int(11),i text, j varchar(200) CHARACTER SET latin2, fulltext tix (i,j)); @@ -245,11 +245,16 @@ INSERT t1 VALUES ('Mit freundlichem Gr'), ('aus Osnabrck'); SET NAMES koi8r; INSERT t1 VALUES (" - "),(", !"), (" , !"),(" !"); -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST (''); -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('*' IN BOOLEAN MODE); +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST (''); +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('*' IN BOOLEAN MODE); SELECT * FROM t1 WHERE MATCH t AGAINST ('' IN BOOLEAN MODE); -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); SET NAMES latin1; -SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); +#alter table t1 modify t text character set latin1 collate latin1_german2_ci not null; +alter table t1 modify t varchar(200) collate latin1_german2_ci not null; +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck'); +SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); DROP TABLE t1; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 96bdb547469..f1a24a4c3cb 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -224,6 +224,19 @@ select date_add(date,INTERVAL "1 1:1:1" DAY_SECOND) from t1; select date_add(time,INTERVAL 1 SECOND) from t1; drop table t1; +# test for last_day +select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2, + last_day('2003-03-32') as f3, last_day('2003-04-01') as f4, + last_day('2001-01-01 01:01:01') as f5, last_day(NULL), + last_day('2001-02-12'); + +create table t1 select last_day('2000-02-05') as a; +describe t1; +select * from t1; +drop table t1; +select last_day('2000-02-05'); + + # Test SAPDB UTC_% functions. This part is TZ dependant (It is supposed that # TZ variable set to GMT-3 select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index f298b1abf53..3349ea21c45 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -5,7 +5,7 @@ # --disable_warnings -drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3,t4; drop database if exists mysqltest; --enable_warnings diff --git a/mysql-test/t/isam.test b/mysql-test/t/isam.test index a31ba864b2f..e35ed0dfd4a 100644 --- a/mysql-test/t/isam.test +++ b/mysql-test/t/isam.test @@ -12,12 +12,14 @@ create table t1 (a tinyint not null auto_increment, b blob not null, primary key let $1=100; disable_query_log; +--disable_warnings while ($1) { eval insert into t1 (b) values(repeat(char(65+$1),65540-$1)); dec $1; } enable_query_log; +--enable_warnings delete from t1 where (a & 1); select sum(length(b)) from t1; drop table t1; diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index e8977ae9b62..8cef925cc24 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -112,7 +112,7 @@ drop table t1, t2; create table t1 (a int primary key); insert into t1 values(1),(2); select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a); ---replace_result "31 tables" "XX tables" "62 tables" "XX tables" +--replace_result "31 tables" "XX tables" "61 tables" "XX tables" --error 1116 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); drop table t1; diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index 371d610eb5f..a3b8bca847d 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -1,6 +1,9 @@ # # Test of multiple key caches # +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings SET @save_key_buffer=@@key_buffer_size; @@ -58,12 +61,9 @@ select @@keycache1.key_cache_block_size; select @@key_buffer_size; select @@key_cache_block_size; +set global keycache1.key_buffer_size=1024*1024; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -create table t1 (p int primary key, a char(10)); +create table t1 (p int primary key, a char(10)) delay_key_write=1; create table t2 (p int primary key, i int, a char(10), key k1(i), key k2(a)); insert into t1 values (1, 'qqqq'), (11, 'yyyy'); @@ -75,7 +75,7 @@ select * from t2; update t1 set p=2 where p=1; update t2 set i=2 where i=1; -cache index t1 keys in keycache1; +cache index t1 keys (`primary`) in keycache1; explain select p from t1; select p from t1; @@ -84,11 +84,11 @@ select i from t2; explain select count(*) from t1, t2 where t1.p = t2.i; select count(*) from t1, t2 where t1.p = t2.i; -cache index t2 keys in keycache1; +cache index t2 in keycache1; update t2 set p=p+1000, i=2 where a='qqqq'; -cache index t2 keys in keycache2; +cache index t2 in keycache2; insert into t2 values (2000, 3, 'yyyy'); -cache index t2 keys in keycache1; +cache index t2 in keycache1; update t2 set p=3000 where a='zzzz'; select * from t2; explain select p from t2; @@ -98,12 +98,18 @@ select i from t2; explain select a from t2; select a from t2; +# Test some error conditions +--error 1283 +cache index t1 in unknown_key_cache; +cache index t1 keys (unknown_key) in keycache1; + select @@keycache2.key_buffer_size; select @@keycache2.key_cache_block_size; set global keycache2.key_buffer_size=0; select @@keycache2.key_buffer_size; select @@keycache2.key_cache_block_size; - +set global keycache2.key_buffer_size=1024*1024; +select @@keycache2.key_buffer_size; update t2 set p=4000 where a='zzzz'; update t1 set p=p+1; @@ -119,4 +125,14 @@ select a from t2; select * from t1; select p from t1; +# Use the 'small' key cache +create table t3 (like t1); +cache index t3 in small; +insert into t3 select * from t1; +cache index t3 in keycache2; +cache index t1,t2 in default; +drop table t1,t2,t3; +# Cleanup +# We don't reset keycache2 as we want to ensure that mysqld will reset it +set global keycache1.key_buffer_size=0; diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test index 314587feda6..26f7cbf22a0 100644 --- a/mysql-test/t/mix_innodb_myisam_binlog.test +++ b/mysql-test/t/mix_innodb_myisam_binlog.test @@ -3,7 +3,7 @@ # It would be nice to make this a replication test, but in 4.0 the # slave is always with --skip-innodb in the testsuite. I (Guilhem) however # did some tests manually on a slave; tables are replicated fine and -# Exec_master_log_pos advances as expected. +# Exec_Master_Log_Pos advances as expected. -- source include/have_innodb.inc diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 6b59778bbce..b3c742e0b30 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -275,3 +275,38 @@ insert into t2 values (1,1), (3,1); update t1 left join t2 on t1.a=t2.a set t1.b=2, t2.b=2 where t1.b=1 and t2.b=1 or t2.a is NULL; select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and t2.b=1 or t2.a is NULL; drop table t1,t2; + +# +# Test for bug #1820. +# + +create table t1 ( a int not null, b int not null) ; +--disable_query_log +insert into t1 values (1,1),(2,2),(3,3),(4,4); +let $1=19; +set @d=4; +while ($1) +{ + eval insert into t1 select a+@d,b+@d from t1; + eval set @d=@d*2; + dec $1; +} + +--enable_query_log +alter table t1 add index i1(a); +delete from t1 where a > 2000000; +create table t2 like t1; +insert into t2 select * from t1; + +select 't2 rows before small delete', count(*) from t1; +delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 2; +select 't2 rows after small delete', count(*) from t2; +select 't1 rows after small delete', count(*) from t1; + +## Try deleting many rows + +delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 100*1000; +select 't2 rows after big delete', count(*) from t2; +select 't1 rows after big delete', count(*) from t1; + +#drop table t1,t2; diff --git a/mysql-test/t/overflow.test b/mysql-test/t/overflow.test index 7a9616fd24e..17e443d51f8 100644 --- a/mysql-test/t/overflow.test +++ b/mysql-test/t/overflow.test @@ -1,4 +1,4 @@ connect (con1,localhost,boo,,); connection con1; --- error 1064,1102,1279 +-- error 1064,1102,1280 drop database AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA; diff --git a/mysql-test/t/preload.test b/mysql-test/t/preload.test index 7357b42c599..7eff5cee08f 100644 --- a/mysql-test/t/preload.test +++ b/mysql-test/t/preload.test @@ -63,7 +63,7 @@ show status like "key_read%"; flush tables; flush status; select @@preload_buffer_size; -load index into cache t1 keys; +load index into cache t1; show status like "key_read%"; select count(*) from t1 where b = 'test1'; show status like "key_read%"; @@ -72,7 +72,7 @@ flush tables; flush status; show status like "key_read%"; set session preload_buffer_size=256*1024; select @@preload_buffer_size; -load index into cache t1 keys ignore leaves; +load index into cache t1 ignore leaves; show status like "key_read%"; select count(*) from t1 where b = 'test1'; show status like "key_read%"; @@ -81,7 +81,7 @@ flush tables; flush status; show status like "key_read%"; set session preload_buffer_size=1*1024; select @@preload_buffer_size; -load index into cache t1 keys, t2 keys (primary,b) ignore leaves; +load index into cache t1, t2 keys (primary,b) ignore leaves; show status like "key_read%"; select count(*) from t1 where b = 'test1'; select count(*) from t2 where b = 'test1'; @@ -89,7 +89,7 @@ show status like "key_read%"; flush tables; flush status; show status like "key_read%"; -load index into cache t3 keys, t2 keys (primary,b) ; +load index into cache t3, t2 keys (primary,b) ; show status like "key_read%"; flush tables; flush status; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 65ba2ee6671..75cbb756998 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -223,7 +223,7 @@ INSERT INTO t1 VALUES (21,4),(22,5),(23,5),(24,5),(25,5),(26,5),(30,5),(31,5),(32,5),(33,5), (33,5),(33,5),(33,5),(33,5),(34,5),(35,5); -# we expect that optimizer will choose key on A +# we expect that optimizer will choose index on A EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5; SELECT * FROM t1 WHERE a IN(1,2) AND b=5; diff --git a/mysql-test/t/rpl_change_master.test b/mysql-test/t/rpl_change_master.test new file mode 100644 index 00000000000..33fc2d75dd3 --- /dev/null +++ b/mysql-test/t/rpl_change_master.test @@ -0,0 +1,28 @@ +source include/master-slave.inc; + +connection slave; +select get_lock("a",5); +connection master; +create table t1(n int); +insert into t1 values(1+get_lock("a",10)*0); +insert into t1 values(2); +save_master_pos; +connection slave; +sleep 3; # can't sync_with_master as we should be blocked +stop slave; +select * from t1; +--replace_column 1 # 33 # +show slave status; +change master to master_user='root'; +--replace_column 1 # 33 # +show slave status; +# Will restart from after the values(2), which is bug +select release_lock("a"); +start slave; +sync_with_master; +select * from t1; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/t/rpl_max_relay_size.test b/mysql-test/t/rpl_max_relay_size.test index 99f0a9fdde6..a28aed52ec8 100644 --- a/mysql-test/t/rpl_max_relay_size.test +++ b/mysql-test/t/rpl_max_relay_size.test @@ -76,7 +76,7 @@ sync_with_master; --replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT --replace_column 1 # 33 # show slave status; -# one more rotation, to be sure Relay_log_space is correctly updated +# one more rotation, to be sure Relay_Log_Space is correctly updated flush logs; connection master; drop table t1; diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test index 78213c6a750..7560d56af1c 100644 --- a/mysql-test/t/rpl_rotate_logs.test +++ b/mysql-test/t/rpl_rotate_logs.test @@ -101,7 +101,8 @@ show master logs; # we just tests if synonyms are accepted purge binary logs to 'master-bin.000002'; show binary logs; ---sleep 1; +# sleeping 10 seconds or more would make the slave believe connection is down +--real_sleep 1; purge master logs before now(); show binary logs; insert into t2 values (65); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index f356e7931c8..75ca521d24e 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1008,4 +1008,4 @@ CREATE TABLE t2(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC CHAR(1) NOT NULL,PR INSERT INTO t1 VALUES (1,1,'1A3240'), (1,2,'4W2365'); INSERT INTO t2 VALUES (100, 200, 'C'); SELECT DISTINCT COLC FROM t1 WHERE COLA = (SELECT COLA FROM t2 WHERE COLB = 200 AND COLC ='C' LIMIT 1); -DROP TABLE t1, t2;s +DROP TABLE t1, t2; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 4be0cd0c6a2..f618c342936 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -65,7 +65,7 @@ drop table t1; # disable_query_log; ---error 1279,1279 +--error 1103,1103 create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp"; # Check that we cannot link over a table from another database. @@ -75,7 +75,7 @@ create database mysqltest; --error 1,1 create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist"; ---error 1279,1279 +--error 1103,1103 create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path"; --error 1,1 diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 1f3f4085734..3cfdc14b0b8 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -280,7 +280,7 @@ explain extended (select * from t1 where a=1) union (select * from t2 where a=1) (select * from t1 where a=5 and a=6) union (select * from t2 where a=1); (select t1.a,t1.b from t1,t2 where t1.a=5) union (select * from t2 where a=1); (select * from t1 where a=1) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a); -explain (select * from t1 where a=1 and b=10) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a); +explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a); explain (select * from t1 where a=1) union (select * from t1 where b=1); drop table t1,t2; create table t1 ( id int not null auto_increment, primary key (id) ,user_name text ); diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 8fe48641fed..39742d20c7c 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -60,3 +60,14 @@ drop table t1; # just for fun :) select @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b, @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b; + +# +# bug#1739 +# Item_func_set_user_var sets update_query_id, Item_func_get_user_var checks it +# +create table t1 (i int not null); +insert t1 values (1),(2),(2),(3),(3),(3); +select @a:=0; select @a, @a:=@a+count(*), count(*), @a from t1 group by i; +select @a:=0; select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i; +drop table t1; + |