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
27fc8780
Commit
27fc8780
authored
Mar 22, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents
5f8cdaa4
c64c493f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/union.result
mysql-test/r/union.result
+2
-0
mysql-test/t/union.test
mysql-test/t/union.test
+2
-0
mysql-test/t/update.test
mysql-test/t/update.test
+0
-1
sql/sql_union.cc
sql/sql_union.cc
+10
-0
No files found.
mysql-test/r/union.result
View file @
27fc8780
...
@@ -422,6 +422,8 @@ Wrong usage/placement of 'SQL_CALC_FOUND_ROWS'
...
@@ -422,6 +422,8 @@ Wrong usage/placement of 'SQL_CALC_FOUND_ROWS'
create temporary table t1 select a from t1 union select a from t2;
create temporary table t1 select a from t1 union select a from t2;
create table t1 select a from t1 union select a from t2;
create table t1 select a from t1 union select a from t2;
INSERT TABLE 't1' isn't allowed in FROM table list
INSERT TABLE 't1' isn't allowed in FROM table list
select a from t1 union select a from t2 order by t2.a;
Unknown column 't2.a' in 'ORDER BY'
drop table t1,t2;
drop table t1,t2;
select length(version()) > 1 as `*` UNION select 2;
select length(version()) > 1 as `*` UNION select 2;
*
*
...
...
mysql-test/t/union.test
View file @
27fc8780
...
@@ -226,6 +226,8 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1;
...
@@ -226,6 +226,8 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1;
create
temporary
table
t1
select
a
from
t1
union
select
a
from
t2
;
create
temporary
table
t1
select
a
from
t1
union
select
a
from
t2
;
--
error
1093
--
error
1093
create
table
t1
select
a
from
t1
union
select
a
from
t2
;
create
table
t1
select
a
from
t1
union
select
a
from
t2
;
--
error
1054
select
a
from
t1
union
select
a
from
t2
order
by
t2
.
a
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
#
...
...
mysql-test/t/update.test
View file @
27fc8780
...
@@ -119,7 +119,6 @@ insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6),
...
@@ -119,7 +119,6 @@ insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6),
(
'0'
,
'1'
,
'2'
,
1
,
5
),
(
'0'
,
'2'
,
'0'
,
1
,
3
),
(
'1'
,
'0'
,
'1'
,
1
,
2
),
(
'0'
,
'1'
,
'2'
,
1
,
5
),
(
'0'
,
'2'
,
'0'
,
1
,
3
),
(
'1'
,
'0'
,
'1'
,
1
,
2
),
(
'1'
,
'2'
,
'1'
,
1
,
1
),
(
'1'
,
'2'
,
'2'
,
1
,
1
),
(
'2'
,
'0'
,
'1'
,
2
,
4
),
(
'1'
,
'2'
,
'1'
,
1
,
1
),
(
'1'
,
'2'
,
'2'
,
1
,
1
),
(
'2'
,
'0'
,
'1'
,
2
,
4
),
(
'2'
,
'2'
,
'0'
,
1
,
7
);
(
'2'
,
'2'
,
'0'
,
1
,
7
);
delete
from
t1
using
t1
m1
,
t1
m2
where
m1
.
groupid
=
m2
.
groupid
and
(
m1
.
cnt
<
m2
.
cnt
or
m1
.
cnt
=
m2
.
cnt
and
m1
.
F3
>
m2
.
F3
);
delete
from
t1
using
t1
m1
,
t1
m2
where
m1
.
groupid
=
m2
.
groupid
and
(
m1
.
cnt
<
m2
.
cnt
or
m1
.
cnt
=
m2
.
cnt
and
m1
.
F3
>
m2
.
F3
);
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
sql/sql_union.cc
View file @
27fc8780
...
@@ -100,6 +100,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
...
@@ -100,6 +100,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
else
else
{
{
Item
*
item
;
Item
*
item
;
ORDER
*
orr
;
List_iterator
<
Item
>
it
(
lex
->
select_lex
.
item_list
);
List_iterator
<
Item
>
it
(
lex
->
select_lex
.
item_list
);
TABLE_LIST
*
first_table
=
(
TABLE_LIST
*
)
lex
->
select_lex
.
table_list
.
first
;
TABLE_LIST
*
first_table
=
(
TABLE_LIST
*
)
lex
->
select_lex
.
table_list
.
first
;
...
@@ -110,6 +111,15 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
...
@@ -110,6 +111,15 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
if
(
setup_tables
(
first_table
)
||
if
(
setup_tables
(
first_table
)
||
setup_fields
(
thd
,
first_table
,
item_list
,
0
,
0
,
1
))
setup_fields
(
thd
,
first_table
,
item_list
,
0
,
0
,
1
))
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
for
(
orr
=
order
;
orr
;
orr
=
orr
->
next
)
{
item
=*
orr
->
item
;
if
(((
item
->
type
()
==
Item
::
FIELD_ITEM
)
&&
((
class
Item_field
*
)
item
)
->
table_name
))
{
my_error
(
ER_BAD_FIELD_ERROR
,
MYF
(
0
),
item
->
full_name
(),
"ORDER BY"
);
DBUG_RETURN
(
-
1
);
}
}
}
}
bzero
((
char
*
)
&
tmp_table_param
,
sizeof
(
tmp_table_param
));
bzero
((
char
*
)
&
tmp_table_param
,
sizeof
(
tmp_table_param
));
...
...
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