summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-09-09 16:52:22 +0300
committerunknown <bell@sanja.is.com.ua>2004-09-09 16:52:22 +0300
commited2c4854dd9d6b75f052d0f7e824b68cc68e35d0 (patch)
tree7615ce281add0dfaa6366a6776a26995613845cb /sql/sql_view.cc
parent7de077f7dfc209bdfcc847920a394ff4c55a2e96 (diff)
parentbc787254247cb66a5e1adc0af6834c10737ecc6e (diff)
downloadmariadb-git-ed2c4854dd9d6b75f052d0f7e824b68cc68e35d0.tar.gz
merge
mysql-test/r/view.result: Auto merged mysql-test/t/view.test: Auto merged sql/item.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_view.cc: Auto merged
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index cddeca33ebf..649953897e7 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -280,9 +280,9 @@ int mysql_create_view(THD *thd,
}
#endif
- if (wait_if_global_read_lock(thd, 0))
+ if (wait_if_global_read_lock(thd, 0, 0))
{
- VOID(pthread_mutex_unlock(&LOCK_open));
+ res= -1;
goto err;
}
VOID(pthread_mutex_lock(&LOCK_open));
@@ -523,7 +523,9 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
will be TRUE as far as we make new table cache).
*/
Item_arena *arena= thd->current_arena, backup;
- if (arena)
+ if (!arena->is_stmt_prepare())
+ arena= 0;
+ else
thd->set_n_backup_item_arena(arena, &backup);
/* init timestamp */