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

fix for table/field caching mechanism

save moving ON/USING tables conditions to WHERE clause (BUG#2794)


sql/sql_base.cc:
  fix for table/field caching mechanism (global lock of it and right table passed as parameter)
  save moving ON/USING tables conditions to WHERE clause (BUG#2794)
sql/sql_class.cc:
  lock for using field/table cache in Item name resolution
sql/sql_class.h:
  lock for using field/table cache in Item name resolution
sql/sql_insert.cc:
  lock for using field/table cache in Item name resolution
tests/client_test.c:
  Test of PS queries with ON condition
This commit is contained in:
unknown
2004-04-01 03:00:38 +03:00
parent dead63012a
commit 54a8eb623a
5 changed files with 92 additions and 11 deletions

View File

@@ -787,6 +787,12 @@ public:
bool charset_is_system_charset, charset_is_collation_connection;
bool slow_command;
/*
Used in prepared statement to prevent using table/field cache in
Item_idend, bacuse it can point on removed table.
*/
bool no_table_fix_fields_cache;
/*
If we do a purge of binary logs, log index info of the threads
that are currently reading it needs to be adjusted. To do that
@@ -1044,13 +1050,15 @@ public:
class select_insert :public select_result {
public:
TABLE_LIST *table_list;
TABLE *table;
List<Item> *fields;
ulonglong last_insert_id;
COPY_INFO info;
select_insert(TABLE *table_par,List<Item> *fields_par,enum_duplicates duplic)
:table(table_par),fields(fields_par), last_insert_id(0)
select_insert(TABLE *table_par, List<Item> *fields_par,
enum_duplicates duplic)
:table(table_par), fields(fields_par), last_insert_id(0)
{
bzero((char*) &info,sizeof(info));
info.handle_duplicates=duplic;