1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -350,6 +350,8 @@ typedef Comp_creator* (*chooser_compare_func_creator)(bool invert);
/* sql_parse.cc */
void free_items(Item *item);
void cleanup_items(Item *item);
class THD;
void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0);
#include "sql_class.h"
#include "opt_range.h"
@ -687,7 +689,6 @@ bool rm_temporary_table(enum db_type base, char *path);
void free_io_cache(TABLE *entry);
void intern_close_table(TABLE *entry);
bool close_thread_table(THD *thd, TABLE **table_ptr);
void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0);
void close_temporary_tables(THD *thd);
TABLE_LIST * find_table_in_list(TABLE_LIST *table,
const char *db_name, const char *table_name);