1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fixed bugs in view code with prepared statemnts

This commit is contained in:
bell@sanja.is.com.ua
2005-01-04 18:04:16 +02:00
parent a99921fb39
commit a8a5f3590c
8 changed files with 116 additions and 48 deletions

View File

@ -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);