From f61f5f72f55b44d33ff77de00432649134eab25c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Dec 2007 21:34:05 +0400 Subject: [PATCH] additional after merge fix mysql-test/r/partition_range.result: removed fix for bug#30573 mysql-test/suite/parts/r/rpl_partition.result: updated result file mysql-test/t/partition_range.test: removed test case for bug#30573 sql/ha_partition.cc: removed fix for bug#30573 --- mysql-test/r/partition_range.result | 20 ----------- mysql-test/suite/parts/r/rpl_partition.result | 2 +- mysql-test/t/partition_range.test | 36 +++++++++---------- sql/ha_partition.cc | 2 +- 4 files changed, 20 insertions(+), 40 deletions(-) diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index f75cbbf5470..4da79704ec3 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -709,23 +709,3 @@ WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; -create table t1 (a int); -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -CREATE TABLE t2 ( -defid int(10) unsigned NOT NULL, -day int(10) unsigned NOT NULL, -count int(10) unsigned NOT NULL, -filler char(200), -KEY (defid,day) -) -PARTITION BY RANGE (day) ( -PARTITION p7 VALUES LESS THAN (20070401) , -PARTITION p8 VALUES LESS THAN (20070501)); -insert into t2 select 20, 20070311, 1, 'filler' from t1 A, t1 B; -insert into t2 select 20, 20070411, 1, 'filler' from t1 A, t1 B; -insert into t2 values(52, 20070321, 123, 'filler') ; -insert into t2 values(52, 20070322, 456, 'filler') ; -select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid; -sum(count) -579 -drop table t1, t2; diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result index 79a95fd613b..bd77d4317bd 100644 --- a/mysql-test/suite/parts/r/rpl_partition.result +++ b/mysql-test/suite/parts/r/rpl_partition.result @@ -121,7 +121,7 @@ Create Table CREATE TABLE `t3` ( `fkid` mediumint(9) DEFAULT NULL, `filler` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +) ENGINE=MyISAM AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ show slave status; Slave_IO_State # Master_Host 127.0.0.1 diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index a9f6d410fa3..6ed3abab46a 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -762,24 +762,24 @@ DROP TABLE t1; # # BUG#30573: get wrong result with "group by" on PARTITIONed table # -create table t1 (a int); -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -CREATE TABLE t2 ( - defid int(10) unsigned NOT NULL, - day int(10) unsigned NOT NULL, - count int(10) unsigned NOT NULL, - filler char(200), - KEY (defid,day) -) -PARTITION BY RANGE (day) ( - PARTITION p7 VALUES LESS THAN (20070401) , - PARTITION p8 VALUES LESS THAN (20070501)); +#create table t1 (a int); +#insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +#CREATE TABLE t2 ( +# defid int(10) unsigned NOT NULL, +# day int(10) unsigned NOT NULL, +# count int(10) unsigned NOT NULL, +# filler char(200), +# KEY (defid,day) +#) +#PARTITION BY RANGE (day) ( +# PARTITION p7 VALUES LESS THAN (20070401) , +# PARTITION p8 VALUES LESS THAN (20070501)); -insert into t2 select 20, 20070311, 1, 'filler' from t1 A, t1 B; -insert into t2 select 20, 20070411, 1, 'filler' from t1 A, t1 B; -insert into t2 values(52, 20070321, 123, 'filler') ; -insert into t2 values(52, 20070322, 456, 'filler') ; +#insert into t2 select 20, 20070311, 1, 'filler' from t1 A, t1 B; +#insert into t2 select 20, 20070411, 1, 'filler' from t1 A, t1 B; +#insert into t2 values(52, 20070321, 123, 'filler') ; +#insert into t2 values(52, 20070322, 456, 'filler') ; -select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid; -drop table t1, t2; +#select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid; +#drop table t1, t2; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index a792d5c4161..d251e056c3e 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3853,7 +3853,7 @@ int ha_partition::read_range_first(const key_range *start_key, start_key->key, start_key->keypart_map, start_key->flag); } - DBUG_RETURN (error? error: compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE); + DBUG_RETURN(error); }