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
50d3fc7d
Commit
50d3fc7d
authored
Mar 14, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed uncachable union (bug #150)
parent
b5bc52c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
mysql-test/r/union.result
mysql-test/r/union.result
+4
-0
mysql-test/t/union.test
mysql-test/t/union.test
+2
-0
sql/sql_lex.h
sql/sql_lex.h
+6
-4
No files found.
mysql-test/r/union.result
View file @
50d3fc7d
...
...
@@ -269,3 +269,7 @@ id select_type table type possible_keys key key_len ref rows Extra
drop table t1,t2;
(select 1) union (select 2) order by 0;
Unknown column '0' in 'order clause'
SELECT @a:=1 UNION SELECT @a:=@a+1;
@a:=1
1
2
mysql-test/t/union.test
View file @
50d3fc7d
...
...
@@ -144,3 +144,5 @@ explain (select * from t1 where a=1) union (select * from t1 where b=1);
drop
table
t1
,
t2
;
--
error
1054
(
select
1
)
union
(
select
2
)
order
by
0
;
SELECT
@
a
:=
1
UNION
SELECT
@
a
:=@
a
+
1
;
sql/sql_lex.h
View file @
50d3fc7d
...
...
@@ -501,11 +501,13 @@ typedef struct st_lex
but we should merk all subselects as uncacheable from current till
most upper
*/
for
(
SELECT_LEX_NODE
*
sl
=
current_select
;
sl
!=
&
select_lex
;
sl
=
sl
->
outer_select
())
SELECT_LEX_NODE
*
sl
;
SELECT_LEX_UNIT
*
un
;
for
(
sl
=
current_select
,
un
=
sl
->
master_unit
();
un
!=
&
unit
;
sl
=
sl
->
outer_select
(),
un
=
sl
->
master_unit
())
{
sl
->
uncacheable
=
sl
->
master_unit
()
->
uncacheable
=
1
;
sl
->
uncacheable
=
un
->
uncacheable
=
1
;
}
}
}
LEX
;
...
...
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