Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d117f519
Commit
d117f519
authored
Jul 22, 2011
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a crash with pbxt.subselect when 'derived_merge' is set off in
the optimizer switch.
parent
20924364
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
9 deletions
+1
-9
mysql-test/suite/pbxt/r/subselect.result
mysql-test/suite/pbxt/r/subselect.result
+0
-3
mysql-test/suite/pbxt/t/subselect.test
mysql-test/suite/pbxt/t/subselect.test
+0
-5
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/suite/pbxt/r/subselect.result
View file @
d117f519
...
@@ -2627,8 +2627,6 @@ createDate datetime NOT NULL,
...
@@ -2627,8 +2627,6 @@ createDate datetime NOT NULL,
modifyDate timestamp NOT NULL
modifyDate timestamp NOT NULL
);
);
INSERT INTO t5 VALUES (5141,12,'2004-08-06','2004-08-06');
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
select
count(distinct t2.userid) pass,
count(distinct t2.userid) pass,
groupstuff.*,
groupstuff.*,
...
@@ -2670,7 +2668,6 @@ pass userid parentid parentgroup childid groupname grouptypeid crse categoryid c
...
@@ -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 1 87 Oct04
1 5141 12 group2 12 group2 5 1 2 88 Oct04
1 5141 12 group2 12 group2 5 1 2 88 Oct04
1 5141 12 group2 12 group2 5 1 2 89 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;
drop table t1, t2, t3, t4, t5;
create table t1 (a int);
create table t1 (a int);
insert into t1 values (1), (2), (3);
insert into t1 values (1), (2), (3);
...
...
mysql-test/suite/pbxt/t/subselect.test
View file @
d117f519
...
@@ -1674,9 +1674,6 @@ CREATE TABLE t5 (
...
@@ -1674,9 +1674,6 @@ CREATE TABLE t5 (
);
);
INSERT
INTO
t5
VALUES
(
5141
,
12
,
'2004-08-06'
,
'2004-08-06'
);
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
select
count
(
distinct
t2
.
userid
)
pass
,
count
(
distinct
t2
.
userid
)
pass
,
groupstuff
.*
,
groupstuff
.*
,
...
@@ -1709,8 +1706,6 @@ join
...
@@ -1709,8 +1706,6 @@ join
group
by
group
by
groupstuff
.
groupname
,
colhead
,
t2
.
courseid
;
groupstuff
.
groupname
,
colhead
,
t2
.
courseid
;
set
optimizer_switch
=@
save_optimizer_switch
;
drop
table
t1
,
t2
,
t3
,
t4
,
t5
;
drop
table
t1
,
t2
,
t3
,
t4
,
t5
;
#
#
...
...
sql/sql_select.cc
View file @
d117f519
...
@@ -5365,7 +5365,7 @@ best_access_path(JOIN *join,
...
@@ -5365,7 +5365,7 @@ best_access_path(JOIN *join,
/* Estimate the cost of the hash join access to the table */
/* Estimate the cost of the hash join access to the table */
ha_rows
rnd_records
=
matching_candidates_in_table
(
s
,
found_constraint
);
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
;
tmp
+=
(
s
->
records
-
rnd_records
)
/
(
double
)
TIME_FOR_COMPARE
;
/* We read the table as many times as join buffer becomes full. */
/* We read the table as many times as join buffer becomes full. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment