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
e447b888
Commit
e447b888
authored
Jan 31, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed problem in view over view setup (BUG#7433)
parent
25042ae7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
mysql-test/r/view.result
mysql-test/r/view.result
+8
-0
mysql-test/t/view.test
mysql-test/t/view.test
+11
-0
sql/table.cc
sql/table.cc
+1
-1
No files found.
mysql-test/r/view.result
View file @
e447b888
...
...
@@ -1750,3 +1750,11 @@ c1
1
drop view v2, v1;
drop table t1, t2;
CREATE TABLE t1 (C1 INT, C2 INT);
CREATE TABLE t2 (C2 INT);
CREATE VIEW v1 AS SELECT C2 FROM t2;
CREATE VIEW v2 AS SELECT C1 FROM t1 LEFT OUTER JOIN v1 USING (C2);
SELECT * FROM v2;
C1
drop view v2, v1;
drop table t1, t2;
mysql-test/t/view.test
View file @
e447b888
...
...
@@ -1679,3 +1679,14 @@ select * from v1;
select
*
from
v2
;
drop
view
v2
,
v1
;
drop
table
t1
,
t2
;
#
# view over other view setup (BUG#7433)
#
CREATE
TABLE
t1
(
C1
INT
,
C2
INT
);
CREATE
TABLE
t2
(
C2
INT
);
CREATE
VIEW
v1
AS
SELECT
C2
FROM
t2
;
CREATE
VIEW
v2
AS
SELECT
C1
FROM
t1
LEFT
OUTER
JOIN
v1
USING
(
C2
);
SELECT
*
FROM
v2
;
drop
view
v2
,
v1
;
drop
table
t1
,
t2
;
sql/table.cc
View file @
e447b888
...
...
@@ -1613,7 +1613,7 @@ void st_table_list::set_ancestor()
tbl
->
table
->
grant
=
grant
;
}
/* if view contain only one table, substitute TABLE of it */
if
(
!
ancestor
->
next_local
)
if
(
ancestor
&&
!
ancestor
->
next_local
)
{
table
=
ancestor
->
table
;
schema_table
=
ancestor
->
schema_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