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
dc935404
Commit
dc935404
authored
Sep 13, 2005
by
timour@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-2486
parents
ffc213a1
9d862db7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
mysql-test/r/view.result
mysql-test/r/view.result
+6
-2
mysql-test/t/view.test
mysql-test/t/view.test
+11
-2
sql/sql_parse.cc
sql/sql_parse.cc
+4
-1
No files found.
mysql-test/r/view.result
View file @
dc935404
...
...
@@ -1146,11 +1146,11 @@ create view v2 as select * from v1;
alter view v1 as select * from v2;
ERROR 42S02: Table 'test.v1' doesn't exist
alter view v1 as select * from v1;
ERROR 42
000: Not unique table/alias: 'v1'
ERROR 42
S02: Table 'test.v1' doesn't exist
create or replace view v1 as select * from v2;
ERROR 42S02: Table 'test.v1' doesn't exist
create or replace view v1 as select * from v1;
ERROR 42
000: Not unique table/alias: 'v1'
ERROR 42
S02: Table 'test.v1' doesn't exist
drop view v2,v1;
drop table t1;
create table t1 (a int);
...
...
@@ -2186,3 +2186,7 @@ r_object_id users_names
120001a080000542 guser02
drop view v1, v2;
drop table t1, t2;
create table t1 (s1 int);
create view abc as select * from t1 as abc;
drop table t1;
drop view abc;
mysql-test/t/view.test
View file @
dc935404
...
...
@@ -1083,11 +1083,11 @@ create view v1 as select * from t1;
create
view
v2
as
select
*
from
v1
;
--
error
1146
alter
view
v1
as
select
*
from
v2
;
--
error
1
06
6
--
error
1
14
6
alter
view
v1
as
select
*
from
v1
;
--
error
1146
create
or
replace
view
v1
as
select
*
from
v2
;
--
error
1
06
6
--
error
1
14
6
create
or
replace
view
v1
as
select
*
from
v1
;
drop
view
v2
,
v1
;
drop
table
t1
;
...
...
@@ -2059,3 +2059,12 @@ order by users_names;
drop
view
v1
,
v2
;
drop
table
t1
,
t2
;
#
# Bug #6808 - Views: CREATE VIEW v ... FROM t AS v fails
#
create
table
t1
(
s1
int
);
create
view
abc
as
select
*
from
t1
as
abc
;
drop
table
t1
;
drop
view
abc
;
sql/sql_parse.cc
View file @
dc935404
...
...
@@ -6056,7 +6056,10 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
/* check that used name is unique */
if
(
lock_type
!=
TL_IGNORE
)
{
for
(
TABLE_LIST
*
tables
=
(
TABLE_LIST
*
)
table_list
.
first
;
TABLE_LIST
*
first_table
=
(
TABLE_LIST
*
)
table_list
.
first
;
if
(
lex
->
sql_command
==
SQLCOM_CREATE_VIEW
)
first_table
=
first_table
?
first_table
->
next_local
:
NULL
;
for
(
TABLE_LIST
*
tables
=
first_table
;
tables
;
tables
=
tables
->
next_local
)
{
...
...
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