diff options
author | unknown <bell@sanja.is.com.ua> | 2004-04-04 03:05:44 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-04-04 03:05:44 +0300 |
commit | 3c01162f0e642d535ec5a8912f77f9f4a96ad8d9 (patch) | |
tree | 7c7fbcd5178ca13f005320968ebff647edb2f13f /sql/sql_base.cc | |
parent | e65aed9cbd61f5fc3c7cd396d60a9d6cb1d9b218 (diff) | |
download | mariadb-git-3c01162f0e642d535ec5a8912f77f9f4a96ad8d9.tar.gz |
removed old way to prevent using stack tables for caching Items in PS
fixed error code in union test
mysql-test/t/union.test:
right code worr 4.1 error
sql/log_event.cc:
assign non-cachable for Item status for all stack tables for safety
sql/repl_failsafe.cc:
assign non-cachable for Item status for all stack tables for safety
sql/slave.cc:
assign non-cachable for Item status for all stack tables for safety
sql/sql_acl.cc:
assign non-cachable for Item status for all stack tables for safety
sql/sql_base.cc:
assign non-cachable for Item status for all stack tables for safety
non-cachable status processing
sql/sql_cache.cc:
assign non-cachable for Item status for all stack tables for safety
sql/sql_class.cc:
removed ald way to prevent using stack tables for caching Items in PS
sql/sql_class.h:
removed old way to prevent using stack tables for caching Items in PS
sql/sql_help.cc:
assign non-cachable for Item status for all stack tables for safety
sql/sql_insert.cc:
assign non-cachable for Item status for all stack tables for safety
removed old way to prevent using stack tables for caching Items in PS
sql/table.h:
non-cachable for Item status for tables
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 48ba810c1a3..f70feb8dc9c 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -156,6 +156,7 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *wild) table_list.db= (char*) entry->table_cache_key; table_list.real_name= entry->real_name; table_list.grant.privilege=0; + table_list.non_cachable_table= 1; // just safety for table on stack if (check_table_access(thd,SELECT_ACL | EXTRA_ACL,&table_list,1)) continue; /* need to check if we haven't already listed it */ @@ -1332,6 +1333,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db, bzero((char*) &table_list, sizeof(table_list)); // just for safe table_list.db=(char*) db; table_list.real_name=(char*) name; + table_list.non_cachable_table= 1; // just safety for table on stack safe_mutex_assert_owner(&LOCK_open); if ((error=lock_table_name(thd,&table_list))) @@ -1886,7 +1888,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, char name_buff[NAME_LEN+1]; - if (!thd->no_table_fix_fields_cache && item->cached_table) + if (item->cached_table) { /* This shortcut is used by prepared statements. We assuming that @@ -1939,6 +1941,8 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, if (find) { (*where)= item->cached_table= tables; + if (tables->non_cachable_table) + item->cached_table= 0; if (find == WRONG_GRANT) return (Field*) 0; if (db || !thd->where) @@ -1998,6 +2002,8 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, if (field == WRONG_GRANT) return (Field*) 0; (*where)= item->cached_table= tables; + if (tables->non_cachable_table) + item->cached_table= 0; if (found) { if (!thd->where) // Returns first found |