Commit b371f638 authored by gluh@mysql.com/eagle.(none)'s avatar gluh@mysql.com/eagle.(none)
Browse files

additional after merge fix

parent 5244d7dc
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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
+20 −20
Original line number Diff line number Diff line
@@ -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));

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;
#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;
#drop table t1, t2;
+1 −1
Original line number Diff line number Diff line
@@ -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);
}