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
f4216c52
Commit
f4216c52
authored
Apr 08, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for a bug with empty item list in UNION's
parent
eaa27ad4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
mysql-test/r/union.result
mysql-test/r/union.result
+2
-0
mysql-test/t/union.test
mysql-test/t/union.test
+2
-0
sql/item.cc
sql/item.cc
+4
-3
No files found.
mysql-test/r/union.result
View file @
f4216c52
...
@@ -273,3 +273,5 @@ SELECT @a:=1 UNION SELECT @a:=@a+1;
...
@@ -273,3 +273,5 @@ SELECT @a:=1 UNION SELECT @a:=@a+1;
@a:=1
@a:=1
1
1
2
2
(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
Unknown column 'a' in 'field list'
mysql-test/t/union.test
View file @
f4216c52
...
@@ -146,3 +146,5 @@ drop table t1,t2;
...
@@ -146,3 +146,5 @@ drop table t1,t2;
(
select
1
)
union
(
select
2
)
order
by
0
;
(
select
1
)
union
(
select
2
)
order
by
0
;
SELECT
@
a
:=
1
UNION
SELECT
@
a
:=@
a
+
1
;
SELECT
@
a
:=
1
UNION
SELECT
@
a
:=@
a
+
1
;
--
error
1054
(
SELECT
1
)
UNION
(
SELECT
2
)
ORDER
BY
(
SELECT
a
);
sql/item.cc
View file @
f4216c52
...
@@ -701,9 +701,10 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
...
@@ -701,9 +701,10 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
(
last
=
sl
)
->
get_table_list
(),
&
where
,
(
last
=
sl
)
->
get_table_list
(),
&
where
,
0
))
!=
not_found_field
)
0
))
!=
not_found_field
)
break
;
break
;
if
((
refer
=
find_item_in_list
(
this
,
sl
->
item_list
,
&
counter
,
if
(
sl
->
item_list
.
elements
&&
((
refer
=
find_item_in_list
(
this
,
sl
->
item_list
,
&
counter
,
REPORT_EXCEPT_NOT_FOUND
))
!=
REPORT_EXCEPT_NOT_FOUND
))
!=
(
Item
**
)
not_found_item
)
(
Item
**
)
not_found_item
)
)
break
;
break
;
if
(
sl
->
master_unit
()
->
first_select
()
->
linkage
==
if
(
sl
->
master_unit
()
->
first_select
()
->
linkage
==
DERIVED_TABLE_TYPE
)
DERIVED_TABLE_TYPE
)
...
...
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