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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
837c6722
Commit
837c6722
authored
Jul 20, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for BUG##806524
parents
99cce189
b11eff40
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
2 deletions
+47
-2
mysql-test/r/derived.result
mysql-test/r/derived.result
+21
-0
mysql-test/t/derived.test
mysql-test/t/derived.test
+24
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-2
No files found.
mysql-test/r/derived.result
View file @
837c6722
...
...
@@ -477,3 +477,24 @@ WHERE t.f2='s' AND t.f2 LIKE '%a%' OR t.f1<>0 ORDER BY t.f2;
f1
8
DROP TABLE t1, t2;
#
# BUG##806524: Assertion `join->best_read < 1.7976931348623157e+308 with table_elimination=on and derived_merge=on
#
CREATE TABLE t1 ( f4 int) ;
CREATE TABLE t2 ( f4 int) ;
CREATE TABLE t3 ( f1 int NOT NULL , PRIMARY KEY (f1)) ;
CREATE TABLE t4 ( f2 int, f4 int) ;
SELECT *
FROM ( SELECT * FROM t1 ) AS alias1
RIGHT JOIN (
t2 AS alias2
LEFT JOIN (
SELECT t4.*
FROM ( SELECT * FROM t3 ) AS SQ1_alias1
RIGHT JOIN t4
ON t4.f2 = SQ1_alias1.f1
) AS alias3
ON alias3.f4 != 0
) ON alias3.f4 != 0;
f4 f4 f2 f4
drop table t1,t2,t3,t4;
mysql-test/t/derived.test
View file @
837c6722
...
...
@@ -385,3 +385,27 @@ SELECT DISTINCT t.f1 FROM (SELECT * FROM t1) AS t, t2
WHERE
t
.
f2
=
's'
AND
t
.
f2
LIKE
'%a%'
OR
t
.
f1
<>
0
ORDER
BY
t
.
f2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# BUG##806524: Assertion `join->best_read < 1.7976931348623157e+308 with table_elimination=on and derived_merge=on
--
echo
#
CREATE
TABLE
t1
(
f4
int
)
;
CREATE
TABLE
t2
(
f4
int
)
;
CREATE
TABLE
t3
(
f1
int
NOT
NULL
,
PRIMARY
KEY
(
f1
))
;
CREATE
TABLE
t4
(
f2
int
,
f4
int
)
;
SELECT
*
FROM
(
SELECT
*
FROM
t1
)
AS
alias1
RIGHT
JOIN
(
t2
AS
alias2
LEFT
JOIN
(
SELECT
t4
.*
FROM
(
SELECT
*
FROM
t3
)
AS
SQ1_alias1
RIGHT
JOIN
t4
ON
t4
.
f2
=
SQ1_alias1
.
f1
)
AS
alias3
ON
alias3
.
f4
!=
0
)
ON
alias3
.
f4
!=
0
;
drop
table
t1
,
t2
,
t3
,
t4
;
sql/sql_select.cc
View file @
837c6722
...
...
@@ -12003,8 +12003,8 @@ static uint reset_nj_counters(JOIN *join, List<TABLE_LIST> *join_list)
if
(
!
nested_join
->
n_tables
)
is_eliminated_nest
=
TRUE
;
}
if
((
!
table
->
table
&&
!
is_eliminated_nest
)
||
(
table
->
table
&&
(
table
->
table
->
map
&
~
join
->
eliminated_tables
)))
if
((
table
->
nested_join
&&
!
is_eliminated_nest
)
||
(
!
table
->
nested_join
&&
(
table
->
table
->
map
&
~
join
->
eliminated_tables
)))
n
++
;
}
DBUG_RETURN
(
n
);
...
...
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