1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

PS fixed to be compatible with derived tables (BUG#2641)

sql/mysql_priv.h:
  description moved to be accessable from sql_class.h
sql/sql_base.cc:
  put all derived table preparation in temporary memory pull
sql/sql_class.h:
  close tables to close derived tables before freeing memory pool where they are placed
sql/sql_prepare.cc:
  now temporary memory pool for prrepared statements registration is oppened in open_and_lock_tables
  thd->current_statement set only for tables preparation, because we do not need memory pool tricks for PS executing
tests/client_test.c:
  derived table added to test
  expression with aggregate functions added to test
This commit is contained in:
unknown
2004-02-12 18:50:00 +02:00
parent 0f0ca5e35b
commit fab7113f83
5 changed files with 67 additions and 30 deletions

View File

@ -934,6 +934,7 @@ public:
DBUG_ASSERT(current_statement!=0);
cleanup_items(current_statement->free_list);
free_items(free_list);
close_thread_tables(this); // to close derived tables
free_root(&mem_root, MYF(0));
set_item_arena(current_statement);
}