Fixed a crash with pbxt.subselect when 'derived_merge' is set off in
the optimizer switch.
This commit is contained in:
parent
2092436457
commit
d117f51901
@ -2627,8 +2627,6 @@ createDate datetime NOT NULL,
|
||||
modifyDate timestamp NOT NULL
|
||||
);
|
||||
INSERT INTO t5 VALUES (5141,12,'2004-08-06','2004-08-06');
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=on';
|
||||
select
|
||||
count(distinct t2.userid) pass,
|
||||
groupstuff.*,
|
||||
@ -2670,7 +2668,6 @@ pass userid parentid parentgroup childid groupname grouptypeid crse categoryid c
|
||||
1 5141 12 group2 12 group2 5 1 1 87 Oct04
|
||||
1 5141 12 group2 12 group2 5 1 2 88 Oct04
|
||||
1 5141 12 group2 12 group2 5 1 2 89 Oct04
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
drop table t1, t2, t3, t4, t5;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1), (2), (3);
|
||||
|
@ -1674,9 +1674,6 @@ CREATE TABLE t5 (
|
||||
);
|
||||
INSERT INTO t5 VALUES (5141,12,'2004-08-06','2004-08-06');
|
||||
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=on';
|
||||
|
||||
select
|
||||
count(distinct t2.userid) pass,
|
||||
groupstuff.*,
|
||||
@ -1709,8 +1706,6 @@ join
|
||||
group by
|
||||
groupstuff.groupname, colhead , t2.courseid;
|
||||
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
||||
drop table t1, t2, t3, t4, t5;
|
||||
|
||||
#
|
||||
|
@ -5365,7 +5365,7 @@ best_access_path(JOIN *join,
|
||||
/* Estimate the cost of the hash join access to the table */
|
||||
ha_rows rnd_records= matching_candidates_in_table(s, found_constraint);
|
||||
|
||||
tmp= s->quick ? s->quick->read_time : s->table->file->scan_time();
|
||||
tmp= s->quick ? s->quick->read_time : s->scan_time();
|
||||
tmp+= (s->records - rnd_records)/(double) TIME_FOR_COMPARE;
|
||||
|
||||
/* We read the table as many times as join buffer becomes full. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user