1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

fixed subselects with temporary tables (SCRUM)

fixed memory leacks


mysql-test/r/subselect.result:
  some changes in subselect tests
mysql-test/t/subselect.test:
  some changes in subselect tests
sql/item.cc:
  some item made copyable
  methods for creating copy of item list
  tmp_table_field() splited
sql/item.h:
  some item made copyable
  methods for creating copy of item list
  tmp_table_field() splited
sql/item_cmpfunc.cc:
  changed references creation
sql/item_cmpfunc.h:
  changed references creation
sql/item_func.cc:
  some item made copyable
  methods for creating copy of item list
  changed references creation
sql/item_func.h:
  some item made copyable
  methods for creating copy of item list
  changed references creation
  tmp_table_field() splited
sql/item_subselect.cc:
  changed references creation
sql/item_sum.cc:
  some item made copyable
  methods for creating copy of item list
sql/item_sum.h:
  some item made copyable
  methods for creating copy of item list
sql/item_timefunc.h:
  tmp_table_field() splited
sql/item_uniq.h:
  some item made copyable
  methods for creating copy of item list
sql/mysql_priv.h:
  fixed subselects with temporary tables
sql/sql_base.cc:
  fixed subselects with temporary tables
sql/sql_class.h:
  fixed subselects with temporary tables
sql/sql_delete.cc:
  fixed subselects with temporary tables
sql/sql_derived.cc:
  fixed subselects with temporary tables
sql/sql_do.cc:
  fixed subselects with temporary tables
sql/sql_insert.cc:
  fixed subselects with temporary tables
sql/sql_lex.cc:
  fixed subselects with temporary tables
sql/sql_lex.h:
  fixed subselects with temporary tables
sql/sql_list.h:
  fixed subselects with temporary tables
sql/sql_load.cc:
  fixed subselects with temporary tables
sql/sql_olap.cc:
  fixed subselects with temporary tables
sql/sql_parse.cc:
  fixed subselects with temporary tables
sql/sql_prepare.cc:
  fixed subselects with temporary tables
sql/sql_select.cc:
  fixed subselects with temporary tables
sql/sql_select.h:
  fixed subselects with temporary tables
sql/sql_table.cc:
  fixed subselects with temporary tables
sql/sql_union.cc:
  fixed subselects with temporary tables
sql/sql_update.cc:
  fixed subselects with temporary tables
sql/sql_yacc.yy:
  fixed subselects with temporary tables
This commit is contained in:
unknown
2003-01-25 02:25:52 +02:00
parent 3b33f0c2c1
commit b23541339c
33 changed files with 1148 additions and 561 deletions

View File

@@ -376,7 +376,7 @@ struct system_variables
CONVERT *convert_set;
};
void free_tmp_table(THD *thd, TABLE *entry);
/*
For each client connection we create a separate thread with THD serving as
a thread/connection descriptor
@@ -486,6 +486,7 @@ public:
CHARSET_INFO *db_charset;
CHARSET_INFO *thd_charset;
List<Item> *possible_loops; // Items that may cause loops in subselects
List<TABLE> temporary_tables_should_be_free; // list of temporary tables
List <MYSQL_ERROR> warn_list;
uint warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_END];
uint total_warn_count, old_total_warn_count;
@@ -640,6 +641,17 @@ public:
net.report_error= 0;
}
void add_possible_loop(Item *);
void free_tmp_tables()
{
if (temporary_tables_should_be_free.elements)
{
List_iterator_fast<TABLE> lt(temporary_tables_should_be_free);
TABLE *table;
while ((table= lt++))
free_tmp_table(this,table);
temporary_tables_should_be_free.empty();
}
}
};
/*