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
e230217f
Commit
e230217f
authored
Sep 02, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b5232
parents
ac55058d
bf268802
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
mysql-test/r/merge.result
mysql-test/r/merge.result
+9
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+14
-0
sql/sql_parse.cc
sql/sql_parse.cc
+13
-0
No files found.
mysql-test/r/merge.result
View file @
e230217f
...
...
@@ -610,3 +610,12 @@ x y
1 3
1 2
drop table t1,t2,t3;
create table t1 (a int);
create table t2 (a int);
insert into t1 values (0);
insert into t2 values (1);
create table t3 engine=merge union=(t1, t2) select * from t1;
INSERT TABLE 't1' isn't allowed in FROM table list
create table t3 engine=merge union=(t1, t2) select * from t2;
INSERT TABLE 't2' isn't allowed in FROM table list
drop table t1, t2;
mysql-test/t/merge.test
View file @
e230217f
...
...
@@ -250,3 +250,17 @@ select * from t3 where x = 1 and y < 5 order by y;
# Bug is that followng query returns empty set while it must be same as above
select
*
from
t3
where
x
=
1
and
y
<
5
order
by
y
desc
;
drop
table
t1
,
t2
,
t3
;
#
# Bug#5232: CREATE TABLE ... SELECT
#
create
table
t1
(
a
int
);
create
table
t2
(
a
int
);
insert
into
t1
values
(
0
);
insert
into
t2
values
(
1
);
--
error
1093
create
table
t3
engine
=
merge
union
=
(
t1
,
t2
)
select
*
from
t1
;
--
error
1093
create
table
t3
engine
=
merge
union
=
(
t1
,
t2
)
select
*
from
t2
;
drop
table
t1
,
t2
;
sql/sql_parse.cc
View file @
e230217f
...
...
@@ -1655,6 +1655,19 @@ mysql_execute_command(void)
net_printf
(
&
thd
->
net
,
ER_INSERT_TABLE_USED
,
tables
->
real_name
);
DBUG_VOID_RETURN
;
}
if
(
lex
->
create_info
.
used_fields
&
HA_CREATE_USED_UNION
)
{
TABLE_LIST
*
tab
;
for
(
tab
=
tables
;
tab
;
tab
=
tab
->
next
)
{
if
(
check_dup
(
tables
->
db
,
tab
->
real_name
,
(
TABLE_LIST
*
)
lex
->
create_info
.
merge_list
.
first
))
{
net_printf
(
&
thd
->
net
,
ER_INSERT_TABLE_USED
,
tab
->
real_name
);
DBUG_VOID_RETURN
;
}
}
}
if
(
tables
->
next
)
{
TABLE_LIST
*
table
;
...
...
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