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
618e65cd
Commit
618e65cd
authored
Aug 23, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error processing of prepare in VIEW creation (BUG#4801)
parent
8d73def9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
mysql-test/r/view.result
mysql-test/r/view.result
+6
-0
mysql-test/t/view.test
mysql-test/t/view.test
+7
-0
sql/sql_view.cc
sql/sql_view.cc
+8
-1
No files found.
mysql-test/r/view.result
View file @
618e65cd
...
@@ -1036,3 +1036,9 @@ a
...
@@ -1036,3 +1036,9 @@ a
4
4
drop view v1;
drop view v1;
drop table t1;
drop table t1;
CREATE VIEW v02 AS SELECT * FROM DUAL;
ERROR HY000: No tables used
SHOW TABLES;
Tables_in_test table_type
t2 BASE TABLE
v4 VIEW
mysql-test/t/view.test
View file @
618e65cd
...
@@ -973,3 +973,10 @@ select * from t1;
...
@@ -973,3 +973,10 @@ select * from t1;
drop
view
v1
;
drop
view
v1
;
drop
table
t1
;
drop
table
t1
;
#
# error on preparation
#
--
error
1096
CREATE
VIEW
v02
AS
SELECT
*
FROM
DUAL
;
SHOW
TABLES
;
sql/sql_view.cc
View file @
618e65cd
...
@@ -183,8 +183,15 @@ int mysql_create_view(THD *thd,
...
@@ -183,8 +183,15 @@ int mysql_create_view(THD *thd,
// prepare select to resolve all fields
// prepare select to resolve all fields
lex
->
view_prepare_mode
=
1
;
lex
->
view_prepare_mode
=
1
;
if
((
res
=
unit
->
prepare
(
thd
,
0
,
0
)))
if
(
unit
->
prepare
(
thd
,
0
,
0
))
{
/*
some errors from prepare are reported to user, if is not then
it will be checked after err: label
*/
res
=
1
;
goto
err
;
goto
err
;
}
/* view list (list of view fields names) */
/* view list (list of view fields names) */
if
(
lex
->
view_list
.
elements
)
if
(
lex
->
view_list
.
elements
)
...
...
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