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
054cdbe7
Commit
054cdbe7
authored
Jul 20, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix case what VIEW have not tables (BUG#4614)
parent
1e3f10a4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
mysql-test/r/view.result
mysql-test/r/view.result
+6
-0
mysql-test/t/view.test
mysql-test/t/view.test
+9
-0
sql/sql_view.cc
sql/sql_view.cc
+5
-0
No files found.
mysql-test/r/view.result
View file @
054cdbe7
...
...
@@ -950,3 +950,9 @@ v1 CREATE VIEW test.v1 AS select `test`.`t1`.`a*b` AS `a*b` from `test`.`t1`
drop view v1;
drop table t1;
set sql_mode=default;
create table t1 (t_column int);
create view v1 as select 'a';
select * from v1, t1;
a t_column
drop view v1;
drop table t1;
mysql-test/t/view.test
View file @
054cdbe7
...
...
@@ -861,3 +861,12 @@ show create view v1;
drop
view
v1
;
drop
table
t1
;
set
sql_mode
=
default
;
#
# VIEW without tables
#
create
table
t1
(
t_column
int
);
create
view
v1
as
select
'a'
;
select
*
from
v1
,
t1
;
drop
view
v1
;
drop
table
t1
;
sql/sql_view.cc
View file @
054cdbe7
...
...
@@ -677,6 +677,11 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
if
((
tbl_end
->
next_global
=
old_next
))
tbl_end
->
next_global
->
prev_global
=
&
tbl_end
->
next_global
;
}
else
{
/* VIEW do not contain tables */
table
->
next_global
=
old_next
;
}
}
table
->
derived
=
&
lex
->
unit
;
...
...
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