From 1c459785127d40db78cf763f0e9e99e99693387c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Nov 2003 18:14:49 +0400 Subject: Fix for bug #1564: CREATE TABLE + UNION + same table name = crash --- mysql-test/r/union.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 9899b8279e2..cd5d600edf4 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -419,4 +419,7 @@ a 3 (SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1; Wrong usage/placement of 'SQL_CALC_FOUND_ROWS' +create temporary table t1 select a from t1 union select a from t2; +create table t1 select a from t1 union select a from t2; +INSERT TABLE 't1' isn't allowed in FROM table list drop table t1,t2; -- cgit v1.2.1 From dcf29d5ec82cdc5320d42c86d2fb61c4c13cb848 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Nov 2003 15:58:27 +0200 Subject: Fix for bug when zeros are to be prepended to decimal field --- mysql-test/r/type_decimal.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index b74765696a2..df5402c89a8 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -363,3 +363,9 @@ CREATE TABLE t1 (a_dec DECIMAL(-2,1)); Too big column length for column 'a_dec' (max = 255). Use BLOB instead CREATE TABLE t1 (a_dec DECIMAL(-1,1)); Too big column length for column 'a_dec' (max = 255). Use BLOB instead +create table t1(a decimal(10,4)); +insert into t1 values ("+0000100000000"); +select * from t1; +a +9999999.9999 +drop table t1; -- cgit v1.2.1 From 03e04c02cdf33c443db5b46b48f8c4ef02ad1b9e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Nov 2003 18:12:49 +0200 Subject: database invalidation invalidate queries only of given database (BUG#1898) mysql-test/r/query_cache.result: test of drop database mysql-test/t/query_cache.test: test of drop database sql/sql_cache.cc: database invalidation invalidate queries only of given database every freed block header marked as FREE even if it will be merged to make moving & deleting tables block safe layout fixed (too long line) --- mysql-test/r/query_cache.result | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 83d2e439fbc..c7554211a1a 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -365,16 +365,23 @@ insert into mysqltest.t1 (a) values (1); select * from mysqltest.t1 where i is null; i a 1 1 +create table t1(a int); +select * from t1; +a +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 select * from mysqltest.t1; i a 1 1 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 1 +Qcache_queries_in_cache 2 drop database mysqltest; show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 +drop table t1; create table t1 (a char(1) not null); insert into t1 values("á"); select * from t1; -- cgit v1.2.1 From 3f355523ba3e9eb814bbd37c0092755330fd2db9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Nov 2003 00:03:04 +0300 Subject: fix for bug #1790: "BIT_AND() result in GROUP BY different when SQL_BIG_RESULT used" return value of BIT_AND changed to BIGINT SIGNED Also the patch fixes another bug: when temporary table is in use and one of values in group is NULL, BIT_AND always returns zero. Fixed it to always skip null values. mysql-test/r/func_group.result: bug #1790: test results fixed sql/item_sum.cc: fix for bug #1790: update_field() rewritten to use add() and thus was moved to Item_sum_bit::update_field() Item_sum_bit::reset_field() was rewritten to take into account reset_bits. sql/item_sum.h: fix for bug #1790: Item_sum::update_field() and Item_sum::reset_field() commented Item_sum_and changed to return BIGINT SIGNED Item_sum_and::update_field() and Item_sum_or::update_field) were replaced with generic Item_sum_bit::update_field() --- mysql-test/r/func_group.result | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 80ccb6c7bb8..a1563271917 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -47,7 +47,7 @@ sum(all a) count(all a) avg(all a) std(all a) bit_or(all a) bit_and(all a) min(a 21 6 3.5000 1.7078 7 0 1 6 E select grp, sum(a),count(a),avg(a),std(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp; grp sum(a) count(a) avg(a) std(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c) -NULL NULL 0 NULL NULL 0 0 NULL NULL +NULL NULL 0 NULL NULL 0 -1 NULL NULL 1 1 1 1.0000 0.0000 1 1 1 1 a a 2 5 2 2.5000 0.5000 3 2 2 3 b c 3 15 3 5.0000 0.8165 7 4 4 6 C E @@ -218,8 +218,8 @@ insert into t1 values (1,null); insert into t1 values (2,null); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL 0 0 -2 0 NULL NULL NULL NULL NULL 0 0 +1 0 NULL NULL NULL NULL NULL -1 0 +2 0 NULL NULL NULL NULL NULL -1 0 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 1 0 NULL NULL NULL NULL NULL -1 0 @@ -227,8 +227,8 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) insert into t1 values (2,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL 0 0 -2 1 1 1.0000 0.0000 1 1 0 1 +1 0 NULL NULL NULL NULL NULL -1 0 +2 1 1 1.0000 0.0000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 1 0 NULL NULL NULL NULL NULL -1 0 @@ -236,8 +236,8 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) insert into t1 values (3,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL 0 0 -2 1 1 1.0000 0.0000 1 1 0 1 +1 0 NULL NULL NULL NULL NULL -1 0 +2 1 1 1.0000 0.0000 1 1 1 1 3 1 1 1.0000 0.0000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -- cgit v1.2.1 From a2bdd6218c7ed36bf245eb378fa3b128ebf266ce Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Dec 2003 19:39:51 +0300 Subject: Post-review fixes for bug #1790 'BIT_AND() result in GROUP BY different when SQL_BIG_RESULT used': - BIT_AND now returns BIGINT UNSIGNED - in case there were no matching rows BIT_AND returns 18446744073709551615 (but not NULL), BIT_OR returns 0 (but not NULL). That's how Monty wants it and how is described in our docs. include/my_global.h: Added definition for ULONGLONG_MAX. This is also a check that ULL type specifier can be used on all supported platforms. mysql-test/r/func_group.result: bug #1790, post-review work: test results fixed sql/item_sum.cc: small cleanup sql/item_sum.h: few style fixes. BIT_AND and BIT_OR now are both BIGINT UNSIGNED --- mysql-test/r/func_group.result | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index a1563271917..f6a30813bb0 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -47,7 +47,7 @@ sum(all a) count(all a) avg(all a) std(all a) bit_or(all a) bit_and(all a) min(a 21 6 3.5000 1.7078 7 0 1 6 E select grp, sum(a),count(a),avg(a),std(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp; grp sum(a) count(a) avg(a) std(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c) -NULL NULL 0 NULL NULL 0 -1 NULL NULL +NULL NULL 0 NULL NULL 0 18446744073709551615 NULL NULL 1 1 1 1.0000 0.0000 1 1 1 1 a a 2 5 2 2.5000 0.5000 3 2 2 3 b c 3 15 3 5.0000 0.8165 7 4 4 6 C E @@ -218,8 +218,8 @@ insert into t1 values (1,null); insert into t1 values (2,null); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 -2 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 +2 0 NULL NULL NULL NULL NULL 18446744073709551615 0 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 1 0 NULL NULL NULL NULL NULL -1 0 @@ -227,7 +227,7 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) insert into t1 values (2,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 2 1 1 1.0000 0.0000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) @@ -236,7 +236,7 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) insert into t1 values (3,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 2 1 1 1.0000 0.0000 1 1 1 1 3 1 1 1.0000 0.0000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; -- cgit v1.2.1 From f5d7229762e3c0e4cf98f223b41cb6d381a767bf Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Dec 2003 20:25:45 +0300 Subject: Fix for Bug #1448 "Date parsing fails, and fails to complain about it". Now numbers representing illegal timestamps are converted to 0 value if they are stored as timestamp or datetime. This behaviour is consistent with manual and with behaviour of string -> timestamp conversion. mysql-test/r/type_datetime.result: Added test if ranges are checked during integer, string -> timestamp conversion mysql-test/r/type_timestamp.result: Added test if ranges are checked during integer, string -> datetime conversion mysql-test/t/type_datetime.test: Added test if ranges are checked during integer, string -> datetime conversion mysql-test/t/type_timestamp.test: Added test if ranges are checked during integer, string -> timestamp conversion sql/field.cc: Checks of month, day, hour, minute and second ranges were added to storing of integer into Field_datetime and Field_timestamp and so for integer -> datetime, timestamp conversion. --- mysql-test/r/type_datetime.result | 15 +++++++++++++-- mysql-test/r/type_timestamp.result | 20 +++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 5df4f355cfb..756deab80e0 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -1,6 +1,6 @@ drop table if exists t1; create table t1 (t datetime); -insert into t1 values(101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959); +insert into t1 values(101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030102030460),(20030102036301),(20030102240401),(20030132030401),(20031302030460); select * from t1; t 2000-01-01 00:00:00 @@ -15,6 +15,11 @@ t 1999-12-31 23:59:59 1000-01-01 00:00:00 9999-12-31 23:59:59 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 delete from t1 where t > 0; optimize table t1; Table Op Msg_type Msg_text @@ -22,7 +27,8 @@ test.t1 optimize status OK check table t1; Table Op Msg_type Msg_text test.t1 check status OK -insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"); +delete from t1; +insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030102030460"),("20030102036301"),("20030102240401"),("20030132030401"),("20031302030460"); select * from t1; t 2000-01-01 00:00:00 @@ -38,6 +44,11 @@ t 1999-12-31 23:59:59 1000-01-01 00:00:00 9999-12-31 23:59:59 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 drop table t1; CREATE TABLE t1 (a timestamp, b date, c time, d datetime); insert into t1 (b,c,d) values(now(),curtime(),now()); diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 3d5d74709c1..9403b73d459 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -43,7 +43,7 @@ date_format(a,"%Y %y") year(a) year(now()) 1970 70 1970 1970 drop table t1; create table t1 (ix timestamp); -insert into t1 values (19991101000000),(19990102030405),(19990630232922),(19990601000000),(19990930232922),(19990531232922),(19990501000000),(19991101000000),(19990501000000); +insert into t1 values (19991101000000),(19990102030405),(19990630232922),(19990601000000),(19990930232922),(19990531232922),(19990501000000),(19991101000000),(19990501000000),(20030101010160),(20030101016001),(20030101240101),(20030132010101),(20031301010101); select * from t1; ix 19991101000000 @@ -55,6 +55,24 @@ ix 19990501000000 19991101000000 19990501000000 +00000000000000 +00000000000000 +00000000000000 +00000000000000 +00000000000000 +delete from t1; +insert into t1 values ("19991101000000"),("19990102030405"),("19990630232922"),("19990601000000"),("20030101010160"),("20030101016001"),("20030101240101"),("20030132010101"),("20031301010101"); +select * from t1; +ix +19991101000000 +19990102030405 +19990630232922 +19990601000000 +00000000000000 +00000000000000 +00000000000000 +00000000000000 +00000000000000 drop table t1; CREATE TABLE t1 (date date, date_time datetime, time_stamp timestamp); INSERT INTO t1 VALUES ("1998-12-31","1998-12-31 23:59:59",19981231235959); -- cgit v1.2.1 From 8be4234f6162da34e1ecd007b67b3ef0650b16d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Dec 2003 21:05:40 +0300 Subject: Fix for bug #1980 BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- mysql-test/r/multi_update.result | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 350cea420b6..233c99fb22b 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -327,3 +327,29 @@ 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; +set @ttype_save=@@table_type; +set @@table_type=innodb; +create table t1 ( c char(8) not null ); +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); +alter table t1 add b char(8) not null; +alter table t1 add a char(8) not null; +alter table t1 add primary key (a,b,c); +update t1 set a=c, b=c; +create table t2 like t1; +insert into t2 select * from t1; +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; +drop table t1,t2; +set @@table_type=bdb; +create table t1 ( c char(8) not null ); +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); +alter table t1 add b char(8) not null; +alter table t1 add a char(8) not null; +alter table t1 add primary key (a,b,c); +update t1 set a=c, b=c; +create table t2 like t1; +insert into t2 select * from t1; +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; +set @@table_type=@ttype_save; +drop table t1,t2; -- cgit v1.2.1 From bc3977ca3413d0aa0f281d14068456b5b491f7d7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 3 Dec 2003 19:49:31 +0300 Subject: Fix for bug #1980 tests --- mysql-test/r/multi_update.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 233c99fb22b..d286b01c1c7 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -336,7 +336,7 @@ alter table t1 add b char(8) not null; alter table t1 add a char(8) not null; alter table t1 add primary key (a,b,c); update t1 set a=c, b=c; -create table t2 like t1; +create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)); insert into t2 select * from t1; delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; drop table t1,t2; @@ -348,7 +348,7 @@ alter table t1 add b char(8) not null; alter table t1 add a char(8) not null; alter table t1 add primary key (a,b,c); update t1 set a=c, b=c; -create table t2 like t1; +create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)); insert into t2 select * from t1; delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; set @@table_type=@ttype_save; -- cgit v1.2.1 From c2b60a6f59f12543a04497cf0196384782f3fbdd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Dec 2003 14:12:01 +0400 Subject: Fix for bug#1944 'Function RPad() sometimes produce unexpected result' --- mysql-test/r/func_str.result | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 0bac5111a05..dcb788f520f 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -119,12 +119,12 @@ montymontymontymontymonty * * select reverse('abc'),reverse('abcd'); reverse('abc') reverse('abcd') cba dcba -select rpad('a',4,'1'),rpad('a',4,'12'),rpad('abcd',3,'12'); -rpad('a',4,'1') rpad('a',4,'12') rpad('abcd',3,'12') -a111 a121 abc -select lpad('a',4,'1'),lpad('a',4,'12'),lpad('abcd',3,'12'); -lpad('a',4,'1') lpad('a',4,'12') lpad('abcd',3,'12') -111a 121a abc +select rpad('a',4,'1'),rpad('a',4,'12'),rpad('abcd',3,'12'), rpad(11, 10 , 22), rpad("ab", 10, 22); +rpad('a',4,'1') rpad('a',4,'12') rpad('abcd',3,'12') rpad(11, 10 , 22) rpad("ab", 10, 22) +a111 a121 abc 1122222222 ab22222222 +select lpad('a',4,'1'),lpad('a',4,'12'),lpad('abcd',3,'12'), lpad(11, 10 , 22); +lpad('a',4,'1') lpad('a',4,'12') lpad('abcd',3,'12') lpad(11, 10 , 22) +111a 121a abc 2222222211 select rpad(741653838,17,'0'),lpad(741653838,17,'0'); rpad(741653838,17,'0') lpad(741653838,17,'0') 74165383800000000 00000000741653838 @@ -134,6 +134,12 @@ abcdaba abaabcd select rpad('abcd',1,'ab'),lpad('abcd',1,'ab'); rpad('abcd',1,'ab') lpad('abcd',1,'ab') a a +select rpad('STRING', 20, CONCAT('p','a','d') ); +rpad('STRING', 20, CONCAT('p','a','d') ) +STRINGpadpadpadpadpa +select lpad('STRING', 20, CONCAT('p','a','d') ); +lpad('STRING', 20, CONCAT('p','a','d') ) +padpadpadpadpaSTRING select LEAST(NULL,'HARRY','HARRIOT',NULL,'HAROLD'),GREATEST(NULL,'HARRY','HARRIOT',NULL,'HAROLD'); LEAST(NULL,'HARRY','HARRIOT',NULL,'HAROLD') GREATEST(NULL,'HARRY','HARRIOT',NULL,'HAROLD') HAROLD HARRY -- cgit v1.2.1 From ee52d2925d40f3d7e7d70a7e246023e8627be489 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Dec 2003 19:48:10 +0200 Subject: Allow space in service names move bdb/innodb tests to right places mysql-test/r/bdb.result: Update results after test changes mysql-test/r/innodb.result: Update results after test changes mysql-test/r/multi_update.result: Update results after test changes mysql-test/t/bdb.test: Move bdb tests here mysql-test/t/innodb.test: Move innodb test here mysql-test/t/multi_update.test: move bdb/innodb tests to repective test sql/mysqld.cc: Allow space in service names --- mysql-test/r/bdb.result | 11 +++++++++++ mysql-test/r/innodb.result | 11 +++++++++++ mysql-test/r/multi_update.result | 26 -------------------------- 3 files changed, 22 insertions(+), 26 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index ebc2866183c..05845df9dd3 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1154,3 +1154,14 @@ x 7 6 drop table t1; +create table t1 ( c char(8) not null ) type=bdb; +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); +alter table t1 add b char(8) not null; +alter table t1 add a char(8) not null; +alter table t1 add primary key (a,b,c); +update t1 set a=c, b=c; +create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) type=bdb; +insert into t2 select * from t1; +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; +drop table t1,t2; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index e9cdf962022..3938fc80f10 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1222,3 +1222,14 @@ a b 111 100 111 100 drop table t1; +create table t1 ( c char(8) not null ) type=innodb; +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); +alter table t1 add b char(8) not null; +alter table t1 add a char(8) not null; +alter table t1 add primary key (a,b,c); +update t1 set a=c, b=c; +create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) type=innodb; +insert into t2 select * from t1; +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; +drop table t1,t2; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index d286b01c1c7..350cea420b6 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -327,29 +327,3 @@ 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; -set @ttype_save=@@table_type; -set @@table_type=innodb; -create table t1 ( c char(8) not null ); -insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); -insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); -alter table t1 add b char(8) not null; -alter table t1 add a char(8) not null; -alter table t1 add primary key (a,b,c); -update t1 set a=c, b=c; -create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)); -insert into t2 select * from t1; -delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; -drop table t1,t2; -set @@table_type=bdb; -create table t1 ( c char(8) not null ); -insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); -insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); -alter table t1 add b char(8) not null; -alter table t1 add a char(8) not null; -alter table t1 add primary key (a,b,c); -update t1 set a=c, b=c; -create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)); -insert into t2 select * from t1; -delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; -set @@table_type=@ttype_save; -drop table t1,t2; -- cgit v1.2.1 From 66927c51fa8e25f9d8a9d818f4ff7ed2a64c5ecb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Dec 2003 22:42:18 +0100 Subject: - Fix for BUG#1858 "SQL-Thread stops working when using optimize table": we change THD::system_thread from a 'bool' to a bitmap to be able to distinguish between delayed-insert threads and slave threads. - Fix for BUG#1701 "Update from multiple tables" (one line in sql_parse.cc, plus a new test rpl_multi_update.test). That's just adding an initialization. sql/repl_failsafe.cc: comment to warn about this unused code sql/slave.cc: Now thd->system_thread is a bitmap, not a bool. sql/sql_class.h: 'bool' for THD::system_thread is not accurate enough; sometimes we need to distinguish between delayed-insert threads and slave threads; so changing THD::system_thread to a bitmap (uint). sql/sql_insert.cc: thd.system_thread is now a bitmap sql/sql_parse.cc: We need to initialize thd->lex.select_lex.options in mysql_init_query(); it's already initialized in dispatch_command() but replication calls mysql_parse() directly, thus bypassing dispatch_command(). Not initing it here leads to a query influencing the next query, in the slave SQL thread. The initialization in dispatch_command() must be kept as this command uses the variable in tests, even when the command was not a query (i.e. when mysql_init_query() was not called). --- mysql-test/r/rpl_multi_update.result | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mysql-test/r/rpl_multi_update.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_multi_update.result b/mysql-test/r/rpl_multi_update.result new file mode 100644 index 00000000000..1fa1dd104d2 --- /dev/null +++ b/mysql-test/r/rpl_multi_update.result @@ -0,0 +1,27 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +drop table if exists t1,t2; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +) TYPE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) TYPE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; -- cgit v1.2.1 From 468dcb6092bce57a4c7529f40d10fcd7654f5ead Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 7 Dec 2003 15:10:21 +0400 Subject: WL#1175: more default_week_formats for iso compatibility New formats added for 'week()' function and 'default_week_format' option(4 - 7). Next formats is supported now: *Value* *Meaning* `0' Week starts on Sunday; First Sunday of the year starts week 1. Week() returns 0-53. `1' Week starts on Monday; Weeks numbered according to ISO 8601:1988. Week() returns 0-53. `2' Week starts on Sunday; First Sunday of the year starts week 1. Week() returns 1-53. `3' Week starts on Monday; Weeks numbered according to ISO 8601:1988. Week() returns 1-53. `4' Week starts on Sunday; Weeks numbered according to ISO 8601:1988. Week() returns 0-53. `5' Week starts on Monday; First Monday of the year starts week 1. Week() returns 0-53. `6' Week starts on Sunday; Weeks numbered according to ISO 8601:1988. Week() returns 1-53. `7' Week starts on Monday; First Monday of the year starts week 1. Week() returns 1-53. mysql-test/r/func_time.result: Test for 'default_week_format' option and 'week' function mysql-test/t/func_time.test: Test for 'default_week_format' option and 'week' function sql/item_timefunc.cc: WL#1175 more default_week_formats for iso compatibility sql/mysql_priv.h: WL#1175 more default_week_formats for iso compatibility sql/mysqld.cc: WL#1175 more default_week_formats for iso compatibility sql/time.cc: WL#1175 more default_week_formats for iso compatibility --- mysql-test/r/func_time.result | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 58a05a2336f..61aa4306c61 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -95,11 +95,34 @@ week(19981231,2) week(19981231,3) week(20000101,2) week(20000101,3) 52 53 52 52 select week(20001231,2),week(20001231,3); week(20001231,2) week(20001231,3) -1 52 +53 52 +select week(19981231,0) as '0', week(19981231,1) as '1', week(19981231,2) as '2', week(19981231,3) as '3', week(19981231,4) as '4', week(19981231,5) as '5', week(19981231,6) as '6', week(19981231,7) as '7'; +0 1 2 3 4 5 6 7 +52 53 52 53 52 52 52 52 +select week(20000101,0) as '0', week(20000101,1) as '1', week(20000101,2) as '2', week(20000101,3) as '3', week(20000101,4) as '4', week(20000101,5) as '5', week(20000101,6) as '6', week(20000101,7) as '7'; +0 1 2 3 4 5 6 7 +0 0 52 52 0 0 52 52 +select week(20000106,0) as '0', week(20000106,1) as '1', week(20000106,2) as '2', week(20000106,3) as '3', week(20000106,4) as '4', week(20000106,5) as '5', week(20000106,6) as '6', week(20000106,7) as '7'; +0 1 2 3 4 5 6 7 +1 1 1 1 1 1 1 1 +select week(20001231,0) as '0', week(20001231,1) as '1', week(20001231,2) as '2', week(20001231,3) as '3', week(20001231,4) as '4', week(20001231,5) as '5', week(20001231,6) as '6', week(20001231,7) as '7'; +0 1 2 3 4 5 6 7 +53 52 53 52 53 52 1 52 +select week(20010101,0) as '0', week(20010101,1) as '1', week(20010101,2) as '2', week(20010101,3) as '3', week(20010101,4) as '4', week(20010101,5) as '5', week(20010101,6) as '6', week(20010101,7) as '7'; +0 1 2 3 4 5 6 7 +0 1 53 1 1 1 1 1 +select yearweek(20001231,0), yearweek(20001231,1), yearweek(20001231,2), yearweek(20001231,3), yearweek(20001231,4), yearweek(20001231,5), yearweek(20001231,6), yearweek(20001231,7); +yearweek(20001231,0) yearweek(20001231,1) yearweek(20001231,2) yearweek(20001231,3) yearweek(20001231,4) yearweek(20001231,5) yearweek(20001231,6) yearweek(20001231,7) +200053 200052 200053 200052 200101 200052 200101 200052 +set default_week_format = 6; +select week(20001231), week(20001231,6); +week(20001231) week(20001231,6) +1 1 +set default_week_format = 0; set default_week_format = 2; select week(20001231),week(20001231,2),week(20001231,0); week(20001231) week(20001231,2) week(20001231,0) -1 1 53 +53 53 53 set default_week_format = 0; select date_format('1998-12-31','%x-%v'),date_format('1999-01-01','%x-%v'); date_format('1998-12-31','%x-%v') date_format('1999-01-01','%x-%v') -- cgit v1.2.1 From 6f96fb795684400b06af96ad535d7f84d33a9273 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Dec 2003 12:59:00 +0400 Subject: test for the bug #1885: mysqldump does not dumps timestamp default. --- mysql-test/r/type_timestamp.result | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 9403b73d459..b513f958787 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -122,3 +122,5 @@ t2 t4 t6 t8 t10 t12 t14 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 drop table t1; +create table t1 (a timestamp default 1); +Invalid default value for 'a' -- cgit v1.2.1 From 1c30ec097027ebef052992ac7accfcdf8a19f227 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Dec 2003 23:52:58 +0300 Subject: Fix for bug #1335: filesort is missing in EXPLAIN if ORDER BY NULL is used mysql-test/r/group_by.result: test results fixed mysql-test/t/group_by.test: added few explicit tests for bug #1335 --- mysql-test/r/group_by.result | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index f89cb8a6792..861f0f009cd 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -287,7 +287,7 @@ table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 8 Using filesort explain select sql_big_result spid,sum(userid) from t1 group by spid desc order by null; table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 8 +t1 ALL NULL NULL NULL NULL 8 Using filesort select sql_big_result spid,sum(userid) from t1 group by spid desc; spid sum(userid) 7 3 @@ -597,3 +597,18 @@ count(*) category 1 3 1 4 drop table t1; +userid count(*) +3 5 +2 1 +1 2 +EXPLAIN SELECT userid,count(*) FROM t1 GROUP BY userid DESC; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort +i COUNT(DISTINCT(i)) +1 1 +2 1 +4 4 +explain SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 6 Using filesort +DROP TABLE t1; -- cgit v1.2.1 From b0a9299efee6db1be9340d02f73739f679ddd6a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 Dec 2003 01:08:10 +0300 Subject: bug #1335 tests followup: --disable_query_log was not a good idea, Serg says mysql-test/r/group_by.result: bug #1335 tests followup: --disable_query_log was not a good idea, Serg says tests results updated --- mysql-test/r/group_by.result | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 861f0f009cd..dba95614052 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -597,6 +597,13 @@ count(*) category 1 3 1 4 drop table t1; +CREATE TABLE t1 ( +userid int(10) unsigned, +score smallint(5) unsigned, +key (score) +); +INSERT INTO t1 VALUES (1,1),(2,2),(1,1),(3,3),(3,3),(3,3),(3,3),(3,3); +SELECT userid,count(*) FROM t1 GROUP BY userid DESC; userid count(*) 3 5 2 1 @@ -604,6 +611,13 @@ userid count(*) EXPLAIN SELECT userid,count(*) FROM t1 GROUP BY userid DESC; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort +DROP TABLE t1; +CREATE TABLE t1 ( +i int(11) default NULL, +j int(11) default NULL +); +INSERT INTO t1 VALUES (1,2),(2,3),(4,5),(3,5),(1,5),(23,5); +SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL; i COUNT(DISTINCT(i)) 1 1 2 1 -- cgit v1.2.1 From 02f56e77e0f71197679ea8784f07be98fb17ce27 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 Dec 2003 15:17:23 +0300 Subject: followup to fix for bug #1790 BIT_AND() result in GROUP BY different when SQL_BIG_RESULT used": now BIT_AND() always returns 18446744073709551615 if no rows were found. This patch also fixes bug #1972: "BIT_AND() and BIT_OR() still return a *signed* 64bit value" mysql-test/r/func_group.result: followup to fix for bug #1790 BIT_AND() result in GROUP BY different when SQL_BIG_RESULT used": test results fixed bug #1972 "BIT_AND() and BIT_OR() still return a *signed* 64bit value": results of new tests mysql-test/t/func_group.test: added tests for bug #1972 "BIT_AND() and BIT_OR() still return a *signed* 64bit value" --- mysql-test/r/func_group.result | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index f6a30813bb0..99c42bb83cf 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -207,13 +207,13 @@ drop table t1,t2; CREATE TABLE t1 (a int, b int); select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1; count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -0 NULL NULL NULL NULL NULL -1 0 +0 NULL NULL NULL NULL NULL 18446744073709551615 0 select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) insert into t1 values (1,null); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 insert into t1 values (1,null); insert into t1 values (2,null); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; @@ -222,8 +222,8 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 2 0 NULL NULL NULL NULL NULL 18446744073709551615 0 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 -2 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 +2 0 NULL NULL NULL NULL NULL 18446744073709551615 0 insert into t1 values (2,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) @@ -231,7 +231,7 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 2 1 1 1.0000 0.0000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 2 1 1 1.0000 0.0000 1 1 1 1 insert into t1 values (3,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; @@ -241,7 +241,18 @@ a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 3 1 1 1.0000 0.0000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) -1 0 NULL NULL NULL NULL NULL -1 0 +1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 2 1 1 1.0000 0.0000 1 1 1 1 3 1 1 1.0000 0.0000 1 1 1 1 drop table t1; +create table t1 (col int); +insert into t1 values (-1), (-2), (-3); +select bit_and(col), bit_or(col) from t1; +bit_and(col) bit_or(col) +18446744073709551612 18446744073709551615 +select SQL_BIG_RESULT bit_and(col), bit_or(col) from t1 group by col; +bit_and(col) bit_or(col) +18446744073709551613 18446744073709551613 +18446744073709551614 18446744073709551614 +18446744073709551615 18446744073709551615 +drop table t1; -- cgit v1.2.1 From f195cf9d1455f05bd6e6b1e0225f1062dc28d9f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 Dec 2003 17:30:37 +0300 Subject: fix for bug #1993 'bit functions do not return unsigned values' introduced base class Item_func_bit for bit functions mysql-test/r/func_op.result: test results for bug #1993 'bit functions do not return unsigned values' mysql-test/t/func_op.test: added tests for bug #1993 'bit functions do not return unsigned values' --- mysql-test/r/func_op.result | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_op.result b/mysql-test/r/func_op.result index 9f49b5809df..d009a66353e 100644 --- a/mysql-test/r/func_op.result +++ b/mysql-test/r/func_op.result @@ -7,3 +7,21 @@ select 1 | (1+1),5 & 3,bit_count(7) ; select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60; 1 << 32 1 << 63 1 << 64 4 >> 2 4 >> 63 1<< 63 >> 60 4294967296 9223372036854775808 0 1 0 8 +select -1 | 0, -1 ^ 0, -1 & 0; +-1 | 0 -1 ^ 0 -1 & 0 +18446744073709551615 18446744073709551615 0 +select -1 | 1, -1 ^ 1, -1 & 1; +-1 | 1 -1 ^ 1 -1 & 1 +18446744073709551615 18446744073709551614 1 +select 1 | -1, 1 ^ -1, 1 & -1; +1 | -1 1 ^ -1 1 & -1 +18446744073709551615 18446744073709551614 1 +select 0 | -1, 0 ^ -1, 0 & -1; +0 | -1 0 ^ -1 0 & -1 +18446744073709551615 18446744073709551615 0 +select -1 >> 0, -1 << 0; +-1 >> 0 -1 << 0 +18446744073709551615 18446744073709551615 +select -1 >> 1, -1 << 1; +-1 >> 1 -1 << 1 +9223372036854775807 18446744073709551614 -- cgit v1.2.1 From 568d3a5d231cd9e3816d91bd40ae70845e7e8e64 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 Dec 2003 18:41:13 +0400 Subject: proper musqldump test result (in addition to CS 1.1623 03/12/09) --- mysql-test/r/mysqldump.result | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 085cf2788f9..01edd10b896 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -15,3 +15,51 @@ INSERT INTO t1 VALUES (1), (2); DROP TABLE t1; +CREATE TABLE t1 (a decimal(240, 20)); +INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), +("0987654321098765432109876543210987654321"); +-- MySQL dump 9.09 +-- +-- Host: localhost Database: test +-- ------------------------------------------------------ +-- Server version 4.0.17-debug-log + +-- +-- Table structure for table `t1` +-- + +CREATE TABLE t1 ( + a decimal(240,20) default NULL +) TYPE=MyISAM; + +-- +-- Dumping data for table `t1` +-- + +INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890.00000000000000000000"); +INSERT INTO t1 VALUES ("0987654321098765432109876543210987654321.00000000000000000000"); + +DROP TABLE t1; +CREATE TABLE t1 (a double); +INSERT INTO t1 VALUES (-9e999999); +-- MySQL dump 9.09 +-- +-- Host: localhost Database: test +-- ------------------------------------------------------ +-- Server version 4.0.17-debug-log + +-- +-- Table structure for table `t1` +-- + +CREATE TABLE t1 ( + a double default NULL +) TYPE=MyISAM; + +-- +-- Dumping data for table `t1` +-- + +INSERT INTO t1 VALUES (NULL); + +DROP TABLE t1; -- cgit v1.2.1 From 287661e66cc1fea6730b357bb56d48c6d065ef43 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2003 06:24:08 +0200 Subject: Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061) mysql_server_init() now returns error code if something went wrong (Bug #2062) Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened. Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062) Fixed bug in UNION statement with alias '*'. (Bug #1249) Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024). FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition. HOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385) include/config-win.h: Ensure that USE_SYMDIR is set for all windows versions (This is set in makefiles, so this is just an extra safety measure) include/my_pthread.h: Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061) include/my_sys.h: my_init() now returns error code if something went wrong include/mysql.h: mysql_once_init() now returns error code if something went wrong include/mysql_com.h: my_init() now returns error code if something went wrong libmysql/libmysql.c: mysql_server_init() and mysql_once_init() now returns error code if something went wrong (Bug #2062) mysql-test/r/limit.result: Update results mysql-test/r/select_found.result: Update results mysql-test/r/union.result: Update results mysql-test/t/limit.test: Added test for DELETE ... ORDER BY ... LIMIT (bug #1024) mysql-test/t/select_found.test: Added test for problem with impossible WHERE (Bug #1468) mysql-test/t/union.test: Added test for problem with alias '*' (Bug #1249) mysys/mf_pack.c: Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened. mysys/my_init.c: my_init() now returns error code if something went wrong mysys/my_lib.c: More debug information mysys/my_thr_init.c: Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062) sql/sql_base.cc: Fixed bug in UNION statement with alias '*'. (Bug #1249) sql/sql_delete.cc: Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024). sql/sql_select.cc: FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition. sql/sql_show.cc: SHOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385) sql/sql_yacc.yy: Allow syntax UNION DISTINCT --- mysql-test/r/limit.result | 23 ++++++++++++++++++++--- mysql-test/r/select_found.result | 19 +++++++++++++++++++ mysql-test/r/union.result | 6 +++++- 3 files changed, 44 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index 5a8edc99c12..c82105e6a49 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -36,9 +36,7 @@ a b 3 4 drop table t1; create table t1 (i int); -insert into t1 (i) values(1); -insert into t1 (i) values(1); -insert into t1 (i) values(1); +insert into t1 (i) values(1),(1),(1); delete from t1 limit 1; update t1 set i=2 limit 1; delete from t1 limit 0; @@ -50,3 +48,22 @@ i drop table t1; select 0 limit 0; 0 +CREATE TABLE t1(id int auto_increment primary key, id2 int, index(id2)); +INSERT INTO t1 (id2) values (0),(0),(0); +DELETE FROM t1 WHERE id=1; +INSERT INTO t1 SET id2=0; +SELECT * FROM t1; +id id2 +4 0 +2 0 +3 0 +DELETE FROM t1 WHERE id2 = 0 ORDER BY id LIMIT 1; +SELECT * FROM t1; +id id2 +4 0 +3 0 +DELETE FROM t1 WHERE id2 = 0 ORDER BY id desc LIMIT 1; +SELECT * FROM t1; +id id2 +3 0 +DROP TABLE t1; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 0a7f464cf7b..419ffb73d59 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -169,3 +169,22 @@ SELECT FOUND_ROWS(); FOUND_ROWS() 2 drop table t1; +create table t1 (id int, primary key (id)); +insert into t1 values (1), (2), (3), (4), (5); +select SQL_CALC_FOUND_ROWS * from t1 where id > 3 limit 0, 1; +id +4 +select FOUND_ROWS(); +FOUND_ROWS() +2 +select SQL_CALC_FOUND_ROWS * from t1 where id > 3 AND 1=2 limit 0, 1; +id +select FOUND_ROWS(); +FOUND_ROWS() +0 +select SQL_CALC_FOUND_ROWS * from t1 where id > 6 limit 0, 1; +id +select FOUND_ROWS(); +FOUND_ROWS() +0 +drop table t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index cd5d600edf4..fc5aa1ad0cb 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -3,7 +3,7 @@ CREATE TABLE t1 (a int not null, b char (10) not null); insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c'); CREATE TABLE t2 (a int not null, b char (10) not null); insert into t2 values (3,'c'),(4,'d'),(5,'f'),(6,'e'); -select a,b from t1 union select a,b from t2; +select a,b from t1 union distinct select a,b from t2; a b 1 a 2 b @@ -423,3 +423,7 @@ create temporary table t1 select a from t1 union select a from t2; create table t1 select a from t1 union select a from t2; INSERT TABLE 't1' isn't allowed in FROM table list drop table t1,t2; +select length(version()) > 1 as `*` UNION select 2; +* +1 +2 -- cgit v1.2.1 From e691523422136c11f9a029e0add3445e9553423c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2003 13:50:47 +0400 Subject: Disable some tests until replace can handle regexp --- mysql-test/r/mysqldump.result | 48 ------------------------------------------- 1 file changed, 48 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 01edd10b896..085cf2788f9 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -15,51 +15,3 @@ INSERT INTO t1 VALUES (1), (2); DROP TABLE t1; -CREATE TABLE t1 (a decimal(240, 20)); -INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), -("0987654321098765432109876543210987654321"); --- MySQL dump 9.09 --- --- Host: localhost Database: test --- ------------------------------------------------------ --- Server version 4.0.17-debug-log - --- --- Table structure for table `t1` --- - -CREATE TABLE t1 ( - a decimal(240,20) default NULL -) TYPE=MyISAM; - --- --- Dumping data for table `t1` --- - -INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890.00000000000000000000"); -INSERT INTO t1 VALUES ("0987654321098765432109876543210987654321.00000000000000000000"); - -DROP TABLE t1; -CREATE TABLE t1 (a double); -INSERT INTO t1 VALUES (-9e999999); --- MySQL dump 9.09 --- --- Host: localhost Database: test --- ------------------------------------------------------ --- Server version 4.0.17-debug-log - --- --- Table structure for table `t1` --- - -CREATE TABLE t1 ( - a double default NULL -) TYPE=MyISAM; - --- --- Dumping data for table `t1` --- - -INSERT INTO t1 VALUES (NULL); - -DROP TABLE t1; -- cgit v1.2.1 From ba249c10c41f4dde9f9fe9dafa50a7cb30bc33fa Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2003 17:37:45 +0400 Subject: Added --comments mysqldump option (default value is 1). Fixed mysqldump test. client/mysqldump.c: Added --comments option (default value is 1). mysql-test/r/mysqldump.result: fixed using --skip-comment option mysql-test/t/mysqldump.test: fixed using --skip-comment option --- mysql-test/r/mysqldump.result | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 085cf2788f9..27ca3fbaaf5 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -15,3 +15,23 @@ INSERT INTO t1 VALUES (1), (2); DROP TABLE t1; +CREATE TABLE t1 (a decimal(240, 20)); +INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), +("0987654321098765432109876543210987654321"); +CREATE TABLE t1 ( + a decimal(240,20) default NULL +) TYPE=MyISAM; + +INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890.00000000000000000000"); +INSERT INTO t1 VALUES ("0987654321098765432109876543210987654321.00000000000000000000"); + +DROP TABLE t1; +CREATE TABLE t1 (a double); +INSERT INTO t1 VALUES (-9e999999); +CREATE TABLE t1 ( + a double default NULL +) TYPE=MyISAM; + +INSERT INTO t1 VALUES (NULL); + +DROP TABLE t1; -- cgit v1.2.1 From 9570d010d571d62a9cbdc9674606b1f154b4dead Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2003 14:55:48 -0800 Subject: Many files: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). sql/sql_class.h: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). sql/sql_delete.cc: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). sql/sql_update.cc: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). mysql-test/t/multi_update.test: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). mysql-test/r/multi_update.result: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- mysql-test/r/multi_update.result | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 350cea420b6..5b265d578cd 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -327,3 +327,26 @@ 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; +drop table if exists t1, t2; +create table t1(id1 smallint(5), field char(5)); +create table t2(id2 smallint(5), field char(5)); +insert into t1 values (1, 'a'), (2, 'aa'); +insert into t2 values (1, 'b'), (2, 'bb'); +select * from t1; +id1 field +1 a +2 aa +select * from t2; +id2 field +1 b +2 bb +update t2 inner join t1 on t1.id1=t2.id2 +set t2.field=t1.field +where 0=1; +update t2, t1 set t2.field=t1.field +where t1.id1=t2.id2 and 0=1; +delete t1, t2 from t2 inner join t1 on t1.id1=t2.id2 +where 0=1; +delete t1, t2 from t2,t1 +where t1.id1=t2.id2 and 0=1; +drop table t1,t2; -- cgit v1.2.1 From 4f90f2fc6734aa920d2c6a2252c7b7c8d29ebd67 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Dec 2003 21:26:20 +0400 Subject: Proposed fix for #2093 it happens because of the LEFT JOINT optimization in add_key_part() This optimization does exactly the same in JOIN and in WHERE conditions Not right. I moved that optimization one level upper. mysql-test/r/join_outer.result: appropriate test result mysql-test/t/join_outer.test: test case sql/sql_select.cc: optimizing of the left_join now only for WHERE conditions and for first table in list --- mysql-test/r/join_outer.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index debec01fbdc..ae4d99e6241 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -667,3 +667,20 @@ left outer join t2 using (f2) left outer join t3 using (f3); Unknown column 'test.t2.f3' in 'on clause' drop table t1,t2,t3; +create table t1 (a1 int, a2 int); +create table t2 (b1 int not null, b2 int); +create table t3 (c1 int, c2 int); +insert into t1 values (1,2), (2,2), (3,2); +insert into t2 values (1,3), (2,3); +insert into t3 values (2,4), (3,4); +select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; +a1 a2 b1 b2 c1 c2 +1 2 1 3 NULL NULL +2 2 2 3 NULL NULL +3 2 NULL NULL 3 4 +explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 3 +t2 ALL NULL NULL NULL NULL 2 +t3 ALL NULL NULL NULL NULL 2 +drop table t1, t2, t3; -- cgit v1.2.1 From 759ea82ee1335543da1d484d76468b6686057e90 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Dec 2003 22:26:58 +0200 Subject: Fix autoincrement for signed columns (Bug #1366) Fixed problem with char > 128 in QUOTE() function. (Bug #1868) Disable creation of symlinks if my_disable_symlink is set Fixed searching of TEXT with end space. (Bug #1651) Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998) Fixed timestamp.test include/my_base.h: Add HA_END_SPACE_KEY to mark keys that has VARCHAR/TEXT fields. myisam/mi_check.c: Delete not used variable myisam/mi_key.c: Fix autoincrement for signed columns (Bug #1366). Patch by Holyfoot myisam/mi_open.c: Bug fix for future (doesn't affect current code) myisam/mi_search.c: Ignore end space for VARCHAR/TEXT columns mysql-test/r/auto_increment.result: Test auto_increment with signed numbers mysql-test/r/binary.result: Update results (old result was wrong) mysql-test/r/func_str.result: Added test of QUOTE() mysql-test/r/func_time.result: Add test of unix_timestamp() mysql-test/r/have_met_timezone.require: Fixed test mysql-test/r/innodb.result: Add test for InnoDB behaviour with TRUNCATE mysql-test/r/multi_update.result: Test of multi-update bug mysql-test/r/symlink.result: Test of ALTER TABLE and symlinks mysql-test/r/timezone.result: Test of from_unixtime() mysql-test/r/truncate.result: Test of truncate and auto_increment mysql-test/r/type_blob.result: Test of key search on TEXT/VARCHAR column with end space mysql-test/t/auto_increment.test: Test auto_increment with signed numbers mysql-test/t/func_str.test: Added test of QUOTE() mysql-test/t/func_time.test: Add test of unix_timestamp() mysql-test/t/innodb.test: Add test for InnoDB behaviour with TRUNCATE mysql-test/t/multi_update.test: Test of multi-update bug mysql-test/t/symlink.test: Test of ALTER TABLE and symlinks mysql-test/t/timezone.test: Test of from_unixtime() mysql-test/t/truncate.test: Test of truncate and auto_increment mysql-test/t/type_blob.test: Test of key search on TEXT/VARCHAR column with end space mysys/my_symlink2.c: Disable creation of symlinks if my_disable_symlink is set sql/field.h: Indentation cleanup sql/ha_innodb.cc: HA_PART_KEY -> HA_PART_KEY_SEG sql/item_strfunc.cc: Fixed problem with char > 128 in QUOTE() function. (Bug #1868) sql/mysql_priv.h: Make check_dup() external sql/opt_range.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/records.cc: Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) sql/sql_acl.cc: Reset ip and ip_mask if hostname is NULL sql/sql_parse.cc: Make check_dup() global sql/sql_select.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/sql_table.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/sql_update.cc: Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) sql/table.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/table.h: Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) sql/time.cc: Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998) --- mysql-test/r/auto_increment.result | 26 ++++++ mysql-test/r/binary.result | 1 + mysql-test/r/func_str.result | 3 + mysql-test/r/func_time.result | 9 ++ mysql-test/r/have_mest_timezone.require | 2 - mysql-test/r/have_met_timezone.require | 2 + mysql-test/r/innodb.result | 10 +++ mysql-test/r/multi_update.result | 10 +++ mysql-test/r/symlink.result | 20 +++++ mysql-test/r/timezone.result | 6 ++ mysql-test/r/truncate.result | 9 ++ mysql-test/r/type_blob.result | 146 ++++++++++++++++++++++++++++++++ 12 files changed, 242 insertions(+), 2 deletions(-) delete mode 100644 mysql-test/r/have_mest_timezone.require create mode 100644 mysql-test/r/have_met_timezone.require (limited to 'mysql-test/r') diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index e79e6aab56b..cbd2d48b38d 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -105,3 +105,29 @@ Table Op Msg_type Msg_text test.t1 check warning Found row where the auto_increment column has the value 0 test.t1 check status OK drop table t1; +create table t1 (a int not null auto_increment primary key); +insert into t1 values (NULL); +insert into t1 values (-1); +select last_insert_id(); +last_insert_id() +1 +insert into t1 values (NULL); +select * from t1; +a +-1 +1 +2 +drop table t1; +create table t1 (a int not null auto_increment primary key) /*!41002 type=heap */; +insert into t1 values (NULL); +insert into t1 values (-1); +select last_insert_id(); +last_insert_id() +1 +insert into t1 values (NULL); +select * from t1; +a +-1 +1 +2 +drop table t1; diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index 4d5eb62cc71..2de8b01bc3a 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -65,6 +65,7 @@ a b alter table t1 modify b tinytext not null, drop key b, add key (b(100)); select * from t1 where b="hello "; a b +hello hello select * from t1 ignore index (b) where b="hello "; a b hello hello diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index dcb788f520f..35a5ba70e86 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -164,6 +164,9 @@ NULL '\0\Z' select length(quote(concat(char(0),"test"))); length(quote(concat(char(0),"test"))) 8 +select hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235)))); +hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235)))) +27E0E3E6E7E8EAEB27 select reverse(""); reverse("") diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 61aa4306c61..4715227425e 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -431,3 +431,12 @@ select * from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; start ctime1 ctime2 2002-11-04 00:00:00 2002-10-29 16:51:06 2002-11-05 16:47:31 drop table t1,t2,t3; +select @a:=FROM_UNIXTIME(1); +@a:=FROM_UNIXTIME(1) +1970-01-01 03:00:01 +select unix_timestamp(@a); +unix_timestamp(@a) +1 +select unix_timestamp('1969-12-01 19:00:01'); +unix_timestamp('1969-12-01 19:00:01') +0 diff --git a/mysql-test/r/have_mest_timezone.require b/mysql-test/r/have_mest_timezone.require deleted file mode 100644 index 2a219f39b7e..00000000000 --- a/mysql-test/r/have_mest_timezone.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -timezone MEST diff --git a/mysql-test/r/have_met_timezone.require b/mysql-test/r/have_met_timezone.require new file mode 100644 index 00000000000..4ab263e2c0d --- /dev/null +++ b/mysql-test/r/have_met_timezone.require @@ -0,0 +1,2 @@ +Variable_name Value +timezone MET diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 3938fc80f10..ce5491a718f 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1233,3 +1233,13 @@ create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, pri insert into t2 select * from t1; delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; drop table t1,t2; +SET AUTOCOMMIT=1; +create table t1 (a integer auto_increment primary key) type=innodb; +insert into t1 (a) values (NULL),(NULL); +truncate table t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +a +3 +4 +drop table t1; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 350cea420b6..5486d9ec5f0 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -327,3 +327,13 @@ 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 auto_increment primary key, b int not null); +insert into t1 (b) values (1),(2),(3),(4); +update t1, t1 as t2 set t1.b=t2.b+1 where t1.a=t2.a; +select * from t1; +a b +1 2 +2 3 +3 4 +4 5 +drop table t1; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 2deecae7243..d07a8613883 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -64,3 +64,23 @@ t9 CREATE TABLE `t9` ( PRIMARY KEY (`a`) ) TYPE=MyISAM DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' drop database mysqltest; +create table t1 (a int not null) type=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0' +) TYPE=MyISAM +alter table t1 add b int; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + `b` int(11) default NULL +) TYPE=MyISAM +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + `b` int(11) default NULL +) TYPE=MyISAM +drop table t1; diff --git a/mysql-test/r/timezone.result b/mysql-test/r/timezone.result index b82b39da262..de75e649ee4 100644 --- a/mysql-test/r/timezone.result +++ b/mysql-test/r/timezone.result @@ -23,3 +23,9 @@ ts from_unixtime(ts) 1048989599 2003-03-30 03:59:59 1048989601 2003-03-30 04:00:01 DROP TABLE t1; +select @a:=FROM_UNIXTIME(1); +@a:=FROM_UNIXTIME(1) +1970-01-01 01:00:01 +select unix_timestamp(@a); +unix_timestamp(@a) +1 diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index ad390c9fa92..1b387214292 100644 --- a/mysql-test/r/truncate.result +++ b/mysql-test/r/truncate.result @@ -23,3 +23,12 @@ n drop table t1; truncate non_existing_table; Table 'test.non_existing_table' doesn't exist +create table t1 (a integer auto_increment primary key); +insert into t1 (a) values (NULL),(NULL); +truncate table t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +a +1 +2 +drop table t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index d7c41743bf3..0bb9146fafc 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -455,3 +455,149 @@ select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1; if(imagem is null, "ERROR", "OK") length(imagem) OK 581 drop table t1; +create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20))); +insert into t1 (txt) values ('Chevy'), ('Chevy '); +select * from t1 where txt='Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy ' or txt='Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy' or txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where id='1' or id='2'; +id txt +1 Chevy +2 Chevy +insert into t1 (txt) values('Ford'); +select * from t1 where txt='Chevy' or txt='Chevy ' or txt='Ford'; +id txt +1 Chevy +2 Chevy +3 Ford +select * from t1 where txt='Chevy' or txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy' or txt='Chevy ' or txt=' Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt in ('Chevy ','Chevy'); +id txt +1 Chevy +2 Chevy +select * from t1 where txt in ('Chevy'); +id txt +1 Chevy +2 Chevy +select * from t1 where txt between 'Chevy' and 'Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt between 'Chevy' and 'Chevy' or txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt between 'Chevy' and 'Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt < 'Chevy '; +id txt +select * from t1 where txt <= 'Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt > 'Chevy'; +id txt +3 Ford +select * from t1 where txt >= 'Chevy'; +id txt +1 Chevy +2 Chevy +3 Ford +drop table t1; +create table t1 (id integer primary key auto_increment, txt text, unique index txt_index (txt (20))); +insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL); +select * from t1 where txt='Chevy' or txt is NULL; +id txt +3 NULL +1 Chevy +2 Chevy +select * from t1 where txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy ' or txt='Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy' or txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where id='1' or id='2'; +id txt +1 Chevy +2 Chevy +insert into t1 (txt) values('Ford'); +select * from t1 where txt='Chevy' or txt='Chevy ' or txt='Ford'; +id txt +1 Chevy +2 Chevy +4 Ford +select * from t1 where txt='Chevy' or txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt='Chevy' or txt='Chevy ' or txt=' Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt in ('Chevy ','Chevy'); +id txt +1 Chevy +2 Chevy +select * from t1 where txt in ('Chevy'); +id txt +1 Chevy +2 Chevy +select * from t1 where txt between 'Chevy' and 'Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt between 'Chevy' and 'Chevy' or txt='Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt between 'Chevy' and 'Chevy '; +id txt +1 Chevy +2 Chevy +select * from t1 where txt < 'Chevy '; +id txt +select * from t1 where txt < 'Chevy ' or txt is NULL; +id txt +3 NULL +select * from t1 where txt <= 'Chevy'; +id txt +1 Chevy +2 Chevy +select * from t1 where txt > 'Chevy'; +id txt +4 Ford +select * from t1 where txt >= 'Chevy'; +id txt +1 Chevy +2 Chevy +4 Ford +drop table t1; -- cgit v1.2.1 From 51c54cd7744103b4876c61dca3662ed91d3a8dea Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Dec 2003 21:26:44 -0400 Subject: added checking for old cuted value in Field_enum::store (bug #2023) mysql-test/r/type_enum.result: added tests for wrong enum values (bug #2023) mysql-test/t/type_enum.test: added tests for wrong enum values (bug #2023) --- mysql-test/r/type_enum.result | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index ee3bd077798..03cfdc3c286 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1636,3 +1636,13 @@ t1 CREATE TABLE `t1` ( `a` enum('','a','b') NOT NULL default 'b' ) TYPE=MyISAM drop table t1; +create table t1 (a enum ('0','1')); +insert into t1 set a='foobar'; +select * from t1; +a + +update t1 set a = replace(a,'x','y'); +select * from t1; +a + +drop table t1; -- cgit v1.2.1 From afb07566181f3bca7f49f3ac5f7fc0deadccf0c7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 14 Dec 2003 06:39:52 +0200 Subject: Extend max_allowed_packet to 2G in mysql and mysqldump (Bug #2105) Don't dump data for MRG_ISAM or MRG_MYISAM tables. (Bug #1846) Ensure that 'lower_case_table_names' is always set on case insensitive file systems. (Bug #1812) One can now configure MySQL as windows service as a normal user. (Bug #1802) Database names is now compared with lower case in ON clause when lower_case_table_names is set. (Bug #1736) IGNORE ... LINES option didn't work when used with fixed length rows. (Bug #1704) Change INSERT DELAYED ... SELECT... to INSERT .... SELECT (Bug #1983) Safety fix for service 'mysql start' (Bug #1815) client/mysql.cc: Extend max_allowed_packet to 2G (Bug #2105) client/mysqldump.c: Extend max_allowed_packet to 2G (Bug #2105) Don't dump data for MRG_ISAM or MRG_MYISAM tables. (Bug #1846) configure.in: Test for file linux/config.h include/my_global.h: Portability fix (Bug #1924) mysql-test/r/insert.result: Update test results mysql-test/r/loaddata.result: Update test results mysql-test/r/lowercase_table.result: Update test results mysql-test/t/insert.test: Test INSERT ... DELAYED ... SELECT mysql-test/t/loaddata.test: Added test of LOAD DATA INFILE ... IGNORE # LINES for fixed size tables mysql-test/t/lowercase_table.test: Test mixed lower/uppercase database names sql/item.cc: Made function not inline (to make it easier to modify it without recompilation of all files) sql/item.h: Moved function to item.cc sql/mysqld.cc: Merge pidfile create code Ensure that 'lower_case_table_names' is always set on case insensitive file systems. (Bug #1812) sql/nt_servc.cc: One can now configure MySQL as windows service as a normal user. (Bug #1802) sql/sql_base.cc: Database names is now compared with lower case in ON clause when lower_case_table_names is set. (Bug #1736) sql/sql_class.h: Fixed type sql/sql_load.cc: IGNORE ... LINES option didn't work when used with fixed length rows. (Bug #1704) sql/sql_parse.cc: Change INSERT DELAYED ... SELECT... to INSERT .... SELECT strings/ctype-tis620.c: Ensure that memory is freed properly (Partly becasue of bug #1770) Bar should check the proposed patch in #1770 if we can use it support-files/mysql.server.sh: Safety fix (Bug #1815) --- mysql-test/r/insert.result | 2 +- mysql-test/r/loaddata.result | 18 ++++++++++++++++++ mysql-test/r/lowercase_table.result | 10 ++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 270994e3998..7520fd7e6cc 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -71,7 +71,7 @@ drop table t1; create table t1 (email varchar(50)); insert into t1 values ('sasha@mysql.com'),('monty@mysql.com'),('foo@hotmail.com'),('foo@aol.com'),('bar@aol.com'); create table t2(id int not null auto_increment primary key, t2 varchar(50), unique(t2)); -insert into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1; +insert delayed into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1; select * from t2; id t2 1 mysql.com diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0b7925de1c5..1730d7b5c25 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -26,3 +26,21 @@ Field 3,'Field 4| |Field 5' ,'Field 6| NULL |Field 6| | 'Field 7'| drop table t1; +create table t1 (a int, b char(10)); +load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +select * from t1; +a b +1 row 1 +2 row 2 +0 1234567890 +3 row 3 +0 1234567890 +truncate table t1; +load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +select * from t1; +a b +1 row 1 +2 row 2 +3 row 3 +0 +drop table t1; diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index 8edf43a51ad..16bc92cb711 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -1,6 +1,8 @@ -drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3,t4,T1; create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); +create table t4 (id int primary key, Word varchar(40) not null); INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +INSERT INTO T4 VALUES(1,'match'); SELECT * FROM t1; id Word 1 a @@ -12,6 +14,9 @@ id SELECT T2.id from t1 as T2 LIMIT 1; id 1 +SELECT * from t1 left join t4 on (test.t1.id= TEST.t4.id) where TEST.t1.id >= test.t4.id; +id Word id Word +1 a 1 match SELECT T2.id from t1 as t2 LIMIT 1; Unknown table 'T2' in field list RENAME TABLE T1 TO T2; @@ -20,7 +25,8 @@ ALTER TABLE T2 RENAME T3; show tables like 't_'; Tables_in_test (t_) t3 -drop table t3; +t4 +drop table t3,t4; create table t1 (a int); select count(*) from T1; count(*) -- cgit v1.2.1 From 38df192ed993ac8758f379e0402a8a8466e637a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 14 Dec 2003 21:31:02 +0100 Subject: Portablity fix mysql-test/r/have_met_timezone.require: Portability fix (For AIX 4.3 and other machines that doesn't support MET timezone) mysql-test/r/timezone.result: Portability fix (For AIX 4.3 and other machines that doesn't support MET timezone) mysql-test/t/mysqldump.test: Portablity fix (Some machines like OSF doesn't read a big double as 'inf' mysql-test/t/timezone.test: Portability fix (For AIX 4.3 and other machines that doesn't support MET timezone) --- mysql-test/r/have_met_timezone.require | 4 ++-- mysql-test/r/mysqldump.result | 2 +- mysql-test/r/timezone.result | 15 +++++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/have_met_timezone.require b/mysql-test/r/have_met_timezone.require index 4ab263e2c0d..b3fde075ebd 100644 --- a/mysql-test/r/have_met_timezone.require +++ b/mysql-test/r/have_met_timezone.require @@ -1,2 +1,2 @@ -Variable_name Value -timezone MET +FROM_UNIXTIME(24*3600) +1970-01-02 01:00:00 diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 27ca3fbaaf5..837a3627647 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -32,6 +32,6 @@ CREATE TABLE t1 ( a double default NULL ) TYPE=MyISAM; -INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (RES); DROP TABLE t1; diff --git a/mysql-test/r/timezone.result b/mysql-test/r/timezone.result index de75e649ee4..20706408075 100644 --- a/mysql-test/r/timezone.result +++ b/mysql-test/r/timezone.result @@ -1,4 +1,13 @@ DROP TABLE IF EXISTS t1; +show variables like "timezone"; +Variable_name Value +timezone MET +select @a:=FROM_UNIXTIME(1); +@a:=FROM_UNIXTIME(1) +1970-01-01 01:00:01 +select unix_timestamp(@a); +unix_timestamp(@a) +1 CREATE TABLE t1 (ts int); INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00')); INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00')); @@ -23,9 +32,3 @@ ts from_unixtime(ts) 1048989599 2003-03-30 03:59:59 1048989601 2003-03-30 04:00:01 DROP TABLE t1; -select @a:=FROM_UNIXTIME(1); -@a:=FROM_UNIXTIME(1) -1970-01-01 01:00:01 -select unix_timestamp(@a); -unix_timestamp(@a) -1 -- cgit v1.2.1 From e97722e495495468ef8a3c5e12d7080738a99841 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Dec 2003 11:10:50 +0100 Subject: Fix for BUG#2083 "EE_ error codes (EE_DELETE, EE_WRITE) end up in the binlog, making slave stop". The problem was that during execution of the command on the master, an error can occur (for example, not space left on device, then mysqld waits and when there is space it completes successfully: so finally it worked but the error EE_WRITE remains in thd->net.last_errno and thd->net.last_error). To know if finally the command succeeded, we test the 'error' variable in every place, and if it shows no failure we reset thd->net.last_err* using the function THD::clear_error() which is backported from 4.1. A new test to see if now only real errors get to the binlog (note: the test uses "rm"). Also a bit of memory free/alloc saving in log_event.cc (do not free the whole mem_root after every query in the slave SQL thread: we can keep the initial block of it; which will be freed when the thread terminates). sql/log_event.cc: In the slave SQL thread, it's a waste to free the initial block of the mem_root after every query. We can instead keep it. It will be freed when the thread terminates (in THD::~THD()). sql/sql_acl.cc: clear the error in thd->net.last_errno as there was no error sql/sql_base.cc: clear the error in thd->net.last_errno as there was no error sql/sql_class.h: Backport of THD::clear_error() from 4.1: clears the error in thd->net.last_errno sql/sql_db.cc: clear the error in thd->net.last_errno as there was no error sql/sql_delete.cc: clear the error in thd->net.last_errno as there was no error sql/sql_insert.cc: clear the error in thd->net.last_errno as there was no error sql/sql_parse.cc: clear the error in thd->net.last_errno as there was no error sql/sql_rename.cc: clear the error in thd->net.last_errno as there was no error sql/sql_table.cc: clear the error in thd->net.last_errno as there was no error sql/sql_update.cc: clear the error in thd->net.last_errno as there was no error --- mysql-test/r/rpl_EE_error.result | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 mysql-test/r/rpl_EE_error.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_EE_error.result b/mysql-test/r/rpl_EE_error.result new file mode 100644 index 00000000000..a5043250df6 --- /dev/null +++ b/mysql-test/r/rpl_EE_error.result @@ -0,0 +1,16 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +create table t1 (a int) type=myisam; +flush tables; +drop table t1; +create table t1 (a int, unique(a)) type=myisam; +set sql_log_bin=0; +insert into t1 values(2); +set sql_log_bin=1; +insert into t1 values(1),(2); +Duplicate entry '2' for key 1 +drop table t1; -- cgit v1.2.1 From 3357bc7ea31aa3432394d0a1a17c1b9b37547897 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Dec 2003 13:20:17 +0200 Subject: Portability fixes (mostly test suite) Make ENGINE= an alias for TYPE= (Compabiltiy with 4.1) Fix when using symlinked data files and realpath() is not working client/mysqltest.c: Copied mysqltest from 4.1 and modified this to compile in 4.0 This was needed to get replace_columns to work. include/my_sys.h: Stop compiler warnings about alloca on freebsd myisam/mi_check.c: Fix when using symlinked data files and realpath() is not working mysql-test/r/handler.result: test engine= mysql-test/r/rpl_max_relay_size.result: Use replace_columns to replace some 'not constant' columns mysql-test/r/rpl_rotate_logs.result: Use replace_columns to replace some 'not constant' columns mysql-test/r/rpl_trunc_binlog.result: Use replace_columns to replace some 'not constant' columns mysql-test/t/handler.test: test engine= mysql-test/t/rpl_log_pos.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_max_relay_size.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_rotate_logs.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_trunc_binlog.test: Use replace_columns to replace some 'not constant' columns mysys/my_symlink.c: More debugging sql/lex.h: Make ENGINE= an alias for TYPE= sql/mysqld.cc: Code cleanup strings/strto.c: Fix for True64 strings/strtoll.c: Fix for True64 strings/strtoull.c: Remove not needed include file --- mysql-test/r/handler.result | 2 +- mysql-test/r/rpl_max_relay_size.result | 2 +- mysql-test/r/rpl_rotate_logs.result | 11 ++++++----- mysql-test/r/rpl_trunc_binlog.result | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index 4af38807518..5467ea6dec2 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -142,7 +142,7 @@ insert into t1 values (17); handler t2 read first; Unknown table 't2' in HANDLER handler t1 open as t2; -alter table t1 type=MyISAM; +alter table t1 engine=MyISAM; handler t2 read first; Unknown table 't2' in HANDLER drop table t1; diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result index 1fa3fcd1adb..d74bc80c0ab 100644 --- a/mysql-test/r/rpl_max_relay_size.result +++ b/mysql-test/r/rpl_max_relay_size.result @@ -26,7 +26,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root MASTER_PORT 1 master-bin.001 50477 slave-relay-bin.004 9457 master-bin.001 Yes Yes 0 0 50477 9457 +127.0.0.1 root MASTER_PORT 1 master-bin.001 50477 slave-relay-bin.004 9457 master-bin.001 Yes Yes 0 0 50477 # stop slave; reset slave; set global max_relay_log_size=0; diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index 07490744d81..3ab6af6b631 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -16,13 +16,12 @@ create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root MASTER_PORT 60 master-bin.001 417 slave-relay-bin.001 458 master-bin.001 Yes Yes 0 0 417 458 +127.0.0.1 root MASTER_PORT 60 master-bin.001 417 slave-relay-bin.001 458 master-bin.001 Yes Yes 0 0 417 # select * from t1; s Could not break slave Tried hard flush logs; -drop table if exists t2; create table t2(m int not null auto_increment primary key); insert into t2 values (34),(67),(123); flush logs; @@ -48,7 +47,7 @@ master-bin.003 insert into t2 values (65); show slave status; Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root MASTER_PORT 60 master-bin.003 290 slave-relay-bin.001 1073 master-bin.003 Yes Yes 0 0 290 1073 +127.0.0.1 root MASTER_PORT 60 master-bin.003 290 slave-relay-bin.001 1073 master-bin.003 Yes Yes 0 0 290 # select * from t2; m 34 @@ -58,8 +57,10 @@ m 1234 create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables part 2"); -drop table if exists t3; create table t3 (n int); +select count(*) from t3 where n >= 4; +count(*) +100 create table t4 select * from temp_table; show master logs; Log_name @@ -73,7 +74,7 @@ a testing temporary tables part 2 show slave status; Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root MASTER_PORT 60 master-bin.004 2886 slave-relay-bin.001 7870 master-bin.004 Yes Yes 0 0 2886 7870 +127.0.0.1 root MASTER_PORT 60 master-bin.004 2886 slave-relay-bin.001 7870 master-bin.004 Yes Yes 0 0 2886 # lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_trunc_binlog.result b/mysql-test/r/rpl_trunc_binlog.result index eb5dcf7c593..272fa210807 100644 --- a/mysql-test/r/rpl_trunc_binlog.result +++ b/mysql-test/r/rpl_trunc_binlog.result @@ -10,4 +10,4 @@ reset slave; start slave; show slave status; Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root MASTER_PORT 1 master-bin.002 4 slave-relay-bin.002 161 master-bin.001 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 317 +127.0.0.1 root MASTER_PORT 1 master-bin.002 4 slave-relay-bin.002 161 master-bin.001 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 # -- cgit v1.2.1