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
f3be2ca0
Commit
f3be2ca0
authored
May 31, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for the optimiser problem caused by the fact that with derived
tables one (or more tables) is opened / closed twice.
parent
1bc4c113
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
mysql-test/r/derived.result
mysql-test/r/derived.result
+1
-1
sql/sql_derived.cc
sql/sql_derived.cc
+2
-0
No files found.
mysql-test/r/derived.result
View file @
f3be2ca0
...
...
@@ -137,7 +137,7 @@ a t
explain select count(*) from t1 as tt1, (select * from t1) as tt2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
2 DERIVED tt1
index NULL a 4 NULL 10000 Using index
2 DERIVED tt1
ALL NULL NULL NULL NULL 10000
drop table t1;
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
(SELECT * FROM (SELECT 1 as a) as a )
...
...
sql/sql_derived.cc
View file @
f3be2ca0
...
...
@@ -219,6 +219,8 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
/* Add new temporary table to list of open derived tables */
table
->
next
=
thd
->
derived_tables
;
thd
->
derived_tables
=
table
;
thd
->
query_id
++
;
query_id
++
;
}
exit:
...
...
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