diff options
author | unknown <davi@mysql.com/endora.local> | 2008-02-21 14:58:29 -0300 |
---|---|---|
committer | unknown <davi@mysql.com/endora.local> | 2008-02-21 14:58:29 -0300 |
commit | 315665cf67dd4e56922955b051eff2c384f2298e (patch) | |
tree | 09d15a0c10b54a7ad010fa850101c4816d4e0d16 /sql/sql_view.h | |
parent | fa08b280857fde69a70c68bd07797624a52ef262 (diff) | |
download | mariadb-git-315665cf67dd4e56922955b051eff2c384f2298e.tar.gz |
Bug#32890 Crash after repeated create and drop of tables and views
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.
The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.
mysql-test/r/ps.result:
Add test case result for Bug#32890
mysql-test/t/ps.test:
Add test case for Bug#32890
sql/item.h:
Restore original field name if name is auto generated.
sql/sql_prepare.cc:
Validate and prepare a CREATE VIEW statement for execution.
sql/sql_view.cc:
Move privileges check to it's own function.
sql/sql_view.h:
Export function which check privileges of a CREATE VIEW statement.
Diffstat (limited to 'sql/sql_view.h')
-rw-r--r-- | sql/sql_view.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_view.h b/sql/sql_view.h index ab0920e0bf2..1d45283352b 100644 --- a/sql/sql_view.h +++ b/sql/sql_view.h @@ -15,6 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, + enum_view_create_mode mode); + bool mysql_create_view(THD *thd, TABLE_LIST *view, enum_view_create_mode mode); |