summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorthek@adventure.(none) <>2007-06-22 11:55:48 +0200
committerthek@adventure.(none) <>2007-06-22 11:55:48 +0200
commit3e7c1b1cb1125a3cf61b2d45f8052acd69c68fdb (patch)
tree051242c3e5d96a0fb66314e00acb396930d2fb6c /sql/sql_view.cc
parent8725f45724c2323b8a160e2e2c0398f8fd25ff45 (diff)
downloadmariadb-git-3e7c1b1cb1125a3cf61b2d45f8052acd69c68fdb.tar.gz
Bug#28846 Use of undocumented Prepared Statements crashes server
ALTER VIEW is currently not supported as a prepared statement and should be disabled as such as they otherwise could cause server crashes. ALTER VIEW is currently not supported when called from stored procedures or functions for related reasons and should also be disabled. This patch disables these DDL statements and adjusts the appropriate test cases accordingly. Additional tests has been added to reflect on the fact that we do support CREATE/ALTER/DROP TABLE for Prepared Statements (PS), Stored Procedures (SP) and PS within SP.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index bfa799ff289..54bd248fabb 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -205,18 +205,17 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view)
}
-/*
- Creating/altering VIEW procedure
+/**
+ @brief Creating/altering VIEW procedure
- SYNOPSIS
- mysql_create_view()
- thd - thread handler
- views - views to create
- mode - VIEW_CREATE_NEW, VIEW_ALTER, VIEW_CREATE_OR_REPLACE
+ @param thd thread handler
+ @param views views to create
+ @param mode VIEW_CREATE_NEW, VIEW_ALTER, VIEW_CREATE_OR_REPLACE
- RETURN VALUE
- FALSE OK
- TRUE Error
+ @note This function handles both create and alter view commands.
+
+ @retval FALSE Operation was a success.
+ @retval TRUE An error occured.
*/
bool mysql_create_view(THD *thd, TABLE_LIST *views,