mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed bugs in view code with prepared statemnts
sql/sql_acl.cc: block checking view underlying tables sql/sql_base.cc: item registration fixed fixed non registred item resolving fixed result of outo-merge fixed creation reference if alias used sql/sql_insert.cc: layout fixed removed unused variable sql/sql_parse.cc: block checking view underlying tables sql/sql_prepare.cc: make preparation check same as usual check sql/sql_update.cc: made want_privilege assignment simplier block checking view underlying tables sql/sql_view.cc: belong_to_view assignmebt moved after privileges check sql/table.cc: check option fix field added arena management added
This commit is contained in:
@ -679,18 +679,6 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
|
||||
if (lex->spfuns.array.buffer)
|
||||
hash_free(&lex->spfuns);
|
||||
|
||||
/*
|
||||
mark to avoid temporary table using and put view reference and find
|
||||
last view table
|
||||
*/
|
||||
for (tbl= view_tables;
|
||||
tbl;
|
||||
tbl= (view_tables_tail= tbl)->next_global)
|
||||
{
|
||||
tbl->skip_temporary= 1;
|
||||
tbl->belong_to_view= top_view;
|
||||
}
|
||||
|
||||
/*
|
||||
check rights to run commands (EXPLAIN SELECT & SHOW CREATE) which show
|
||||
underlying tables
|
||||
@ -710,6 +698,18 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
mark to avoid temporary table using and put view reference and find
|
||||
last view table
|
||||
*/
|
||||
for (tbl= view_tables;
|
||||
tbl;
|
||||
tbl= (view_tables_tail= tbl)->next_global)
|
||||
{
|
||||
tbl->skip_temporary= 1;
|
||||
tbl->belong_to_view= top_view;
|
||||
}
|
||||
|
||||
/* move SQL_NO_CACHE & Co to whole query */
|
||||
old_lex->safe_to_cache_query= (old_lex->safe_to_cache_query &&
|
||||
lex->safe_to_cache_query);
|
||||
|
Reference in New Issue
Block a user