The world's most popular open source database
#include "mysql_priv.h"#include "sql_select.h"#include "sp_head.h"#include "sp.h"#include "sql_trigger.h"#include <m_ctype.h>#include <my_dir.h>#include <hash.h>Include dependency graph for sql_base.cc:

Go to the source code of this file.
Defines | |
| #define | check_unused() |
| #define | WRONG_GRANT (Field*) -1 |
Functions | |
| static int | open_unireg_entry (THD *thd, TABLE *entry, TABLE_LIST *table_list, const char *alias, char *cache_key, uint cache_key_length, MEM_ROOT *mem_root, uint flags) |
| static void | free_cache_entry (TABLE *entry) |
| static void | mysql_rm_tmp_tables (void) |
| static bool | open_new_frm (THD *thd, TABLE_SHARE *share, const char *alias, uint db_stat, uint prgflag, uint ha_open_flags, TABLE *outparam, TABLE_LIST *table_desc, MEM_ROOT *mem_root) |
| static void | close_old_data_files (THD *thd, TABLE *table, bool abort_locks, bool send_refresh) |
| static bool | reopen_table (TABLE *table) |
| static bool | has_two_write_locked_tables_with_auto_increment (TABLE_LIST *tables) |
| byte * | table_cache_key (const byte *record, uint *length, my_bool not_used __attribute__((unused))) |
| bool | table_cache_init (void) |
| void | table_cache_free (void) |
| uint | cached_open_tables (void) |
| uint | create_table_def_key (THD *thd, char *key, TABLE_LIST *table_list, bool tmp_table) |
| byte * | table_def_key (const byte *record, uint *length, my_bool not_used __attribute__((unused))) |
| static void | table_def_free_entry (TABLE_SHARE *share) |
| bool | table_def_init (void) |
| void | table_def_free (void) |
| uint | cached_table_definitions (void) |
| TABLE_SHARE * | get_table_share (THD *thd, TABLE_LIST *table_list, char *key, uint key_length, uint db_flags, int *error) |
| static TABLE_SHARE * | get_table_share_with_create (THD *thd, TABLE_LIST *table_list, char *key, uint key_length, uint db_flags, int *error) |
| void | release_table_share (TABLE_SHARE *share, enum release_type type) |
| TABLE_SHARE * | get_cached_table_share (const char *db, const char *table_name) |
| static void | close_handle_and_leave_table_as_lock (TABLE *table) |
| OPEN_TABLE_LIST * | list_open_tables (THD *thd, const char *db, const char *wild) |
| void | intern_close_table (TABLE *table) |
| void | free_io_cache (TABLE *table) |
| bool | close_cached_tables (THD *thd, bool if_wait_for_refresh, TABLE_LIST *tables, bool have_lock) |
| static void | mark_used_tables_as_free_for_reuse (THD *thd, TABLE *table) |
| void | close_thread_tables (THD *thd, bool lock_in_use, bool skip_derived) |
| bool | close_thread_table (THD *thd, TABLE **table_ptr) |
| static uint | tmpkeyval (THD *thd, TABLE *table) |
| void | close_temporary_tables (THD *thd) |
| TABLE_LIST * | find_table_in_list (TABLE_LIST *table, st_table_list *TABLE_LIST::*link, const char *db_name, const char *table_name) |
| TABLE_LIST * | unique_table (THD *thd, TABLE_LIST *table, TABLE_LIST *table_list) |
| void | update_non_unique_table_error (TABLE_LIST *update, const char *operation, TABLE_LIST *duplicate) |
| TABLE * | find_temporary_table (THD *thd, const char *db, const char *table_name) |
| TABLE * | find_temporary_table (THD *thd, TABLE_LIST *table_list) |
| bool | close_temporary_table (THD *thd, TABLE_LIST *table_list) |
| void | close_temporary_table (THD *thd, TABLE *table, bool free_share, bool delete_table) |
| void | close_temporary (TABLE *table, bool free_share, bool delete_table) |
| bool | rename_temporary_table (THD *thd, TABLE *table, const char *db, const char *table_name) |
| static void | relink_unused (TABLE *table) |
| TABLE * | unlink_open_table (THD *thd, TABLE *list, TABLE *find) |
| void | wait_for_condition (THD *thd, pthread_mutex_t *mutex, pthread_cond_t *cond) |
| bool | reopen_name_locked_table (THD *thd, TABLE_LIST *table_list) |
| TABLE * | open_table (THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, bool *refresh, uint flags) |
| TABLE * | find_locked_table (THD *thd, const char *db, const char *table_name) |
| bool | close_data_tables (THD *thd, const char *db, const char *table_name) |
| bool | reopen_tables (THD *thd, bool get_locks, bool in_refresh) |
| bool | table_is_used (TABLE *table, bool wait_for_name_lock) |
| bool | wait_for_tables (THD *thd) |
| TABLE * | drop_locked_tables (THD *thd, const char *db, const char *table_name) |
| void | abort_locked_tables (THD *thd, const char *db, const char *table_name) |
| void | assign_new_table_id (TABLE_SHARE *share) |
| int | open_tables (THD *thd, TABLE_LIST **start, uint *counter, uint flags) |
| static bool | check_lock_and_start_stmt (THD *thd, TABLE *table, thr_lock_type lock_type) |
| TABLE * | open_ltable (THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type) |
| int | simple_open_n_lock_tables (THD *thd, TABLE_LIST *tables) |
| bool | open_and_lock_tables (THD *thd, TABLE_LIST *tables) |
| bool | open_normal_and_derived_tables (THD *thd, TABLE_LIST *tables, uint flags) |
| static void | mark_real_tables_as_free_for_reuse (TABLE_LIST *table) |
| int | lock_tables (THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen) |
| void | close_tables_for_reopen (THD *thd, TABLE_LIST **tables) |
| TABLE * | open_temporary_table (THD *thd, const char *path, const char *db, const char *table_name, bool link_in_list) |
| bool | rm_temporary_table (handlerton *base, char *path) |
| static void | update_field_dependencies (THD *thd, Field *field, TABLE *table) |
| static Field * | find_field_in_view (THD *thd, TABLE_LIST *table_list, const char *name, uint length, const char *item_name, Item **ref, bool register_tree_change) |
| static Field * | find_field_in_natural_join (THD *thd, TABLE_LIST *table_ref, const char *name, uint length, Item **ref, bool register_tree_change, TABLE_LIST **actual_table) |
| Field * | find_field_in_table (THD *thd, TABLE *table, const char *name, uint length, bool allow_rowid, uint *cached_field_index_ptr) |
| Field * | find_field_in_table_ref (THD *thd, TABLE_LIST *table_list, const char *name, uint length, const char *item_name, const char *db_name, const char *table_name, Item **ref, bool check_privileges, bool allow_rowid, uint *cached_field_index_ptr, bool register_tree_change, TABLE_LIST **actual_table) |
| Field * | find_field_in_table_sef (TABLE *table, const char *name) |
| Field * | find_field_in_tables (THD *thd, Item_ident *item, TABLE_LIST *first_table, TABLE_LIST *last_table, Item **ref, find_item_error_report_type report_error, bool check_privileges, bool register_tree_change) |
| Item ** | find_item_in_list (Item *find, List< Item > &items, uint *counter, find_item_error_report_type report_error, bool *unaliased) |
| static bool | test_if_string_in_list (const char *find, List< String > *str_list) |
| static bool | set_new_item_local_context (THD *thd, Item_ident *item, TABLE_LIST *table_ref) |
| static bool | mark_common_columns (THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, List< String > *using_fields, uint *found_using_fields) |
| static bool | store_natural_using_join_columns (THD *thd, TABLE_LIST *natural_using_join, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, List< String > *using_fields, uint found_using_fields) |
| static bool | store_top_level_join_columns (THD *thd, TABLE_LIST *table_ref, TABLE_LIST *left_neighbor, TABLE_LIST *right_neighbor) |
| static bool | setup_natural_join_row_types (THD *thd, List< TABLE_LIST > *from_clause, Name_resolution_context *context) |
| int | setup_wild (THD *thd, TABLE_LIST *tables, List< Item > &fields, List< Item > *sum_func_list, uint wild_num) |
| bool | setup_fields (THD *thd, Item **ref_pointer_array, List< Item > &fields, enum_mark_columns mark_used_columns, List< Item > *sum_func_list, bool allow_sum_func) |
| TABLE_LIST ** | make_leaves_list (TABLE_LIST **list, TABLE_LIST *tables) |
| bool | setup_tables (THD *thd, Name_resolution_context *context, List< TABLE_LIST > *from_clause, TABLE_LIST *tables, TABLE_LIST **leaves, bool select_insert) |
| bool | setup_tables_and_check_access (THD *thd, Name_resolution_context *context, List< TABLE_LIST > *from_clause, TABLE_LIST *tables, TABLE_LIST **leaves, bool select_insert, ulong want_access) |
| bool | get_key_map_from_key_list (key_map *map, TABLE *table, List< String > *index_list) |
| bool | insert_fields (THD *thd, Name_resolution_context *context, const char *db_name, const char *table_name, List_iterator< Item > *it, bool any_privileges) |
| int | setup_conds (THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, COND **conds) |
| static bool | fill_record (THD *thd, List< Item > &fields, List< Item > &values, bool ignore_errors) |
| bool | fill_record_n_invoke_before_triggers (THD *thd, List< Item > &fields, List< Item > &values, bool ignore_errors, Table_triggers_list *triggers, enum trg_event_type event) |
| bool | fill_record (THD *thd, Field **ptr, List< Item > &values, bool ignore_errors) |
| bool | fill_record_n_invoke_before_triggers (THD *thd, Field **ptr, List< Item > &values, bool ignore_errors, Table_triggers_list *triggers, enum trg_event_type event) |
| void | remove_db_from_cache (const char *db) |
| void | flush_tables () |
| bool | remove_table_from_cache (THD *thd, const char *db, const char *table_name, uint flags) |
| int | setup_ftfuncs (SELECT_LEX *select_lex) |
| int | init_ftfuncs (THD *thd, SELECT_LEX *select_lex, bool no_order) |
| bool | is_equal (const LEX_STRING *a, const LEX_STRING *b) |
| int | abort_and_upgrade_lock (ALTER_PARTITION_PARAM_TYPE *lpt) |
| void | close_open_tables_and_downgrade (ALTER_PARTITION_PARAM_TYPE *lpt) |
| void | mysql_wait_completed_table (ALTER_PARTITION_PARAM_TYPE *lpt, TABLE *my_table) |
Variables | |
| TABLE * | unused_tables |
| HASH | open_cache |
| static HASH | table_def_cache |
| static TABLE_SHARE * | oldest_unused_share |
| static TABLE_SHARE | end_of_unused_share |
| static pthread_mutex_t | LOCK_table_share |
| static bool | table_def_inited = 0 |
| Field * | not_found_field = (Field*) 0x1 |
| Field * | view_ref_found = (Field*) 0x2 |
| Item ** | not_found_item = (Item**) 0x1 |
| #define check_unused | ( | ) |
Definition at line 147 of file sql_base.cc.
Referenced by close_thread_tables(), free_cache_entry(), open_table(), relink_unused(), and reopen_name_locked_table().
| #define WRONG_GRANT (Field*) -1 |
Definition at line 3588 of file sql_base.cc.
Referenced by find_field_in_table_ref(), and find_field_in_tables().
| int abort_and_upgrade_lock | ( | ALTER_PARTITION_PARAM_TYPE * | lpt | ) |
Definition at line 6387 of file sql_base.cc.
References DBUG_ENTER, DBUG_RETURN, flags, LOCK_open, mysql_lock_abort(), pthread_mutex_lock, pthread_mutex_unlock, remove_table_from_cache(), TRUE, and VOID.
06388 { 06389 uint flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG; 06390 DBUG_ENTER("abort_and_upgrade_locks"); 06391 06392 lpt->old_lock_type= lpt->table->reginfo.lock_type; 06393 VOID(pthread_mutex_lock(&LOCK_open)); 06394 mysql_lock_abort(lpt->thd, lpt->table, TRUE); 06395 VOID(remove_table_from_cache(lpt->thd, lpt->db, lpt->table_name, flags)); 06396 VOID(pthread_mutex_unlock(&LOCK_open)); 06397 DBUG_RETURN(0); 06398 }
Here is the call graph for this function:

| void abort_locked_tables | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | table_name | |||
| ) |
Definition at line 2531 of file sql_base.cc.
References st_table_share::db, mysql_lock_abort(), st_table::next, st_table::s, LEX_STRING::str, strcmp(), st_table_share::table_name, and TRUE.
Referenced by mysql_rm_table_part2().
02532 { 02533 TABLE *table; 02534 for (table= thd->open_tables; table ; table= table->next) 02535 { 02536 if (!strcmp(table->s->table_name.str, table_name) && 02537 !strcmp(table->s->db.str, db)) 02538 { 02539 mysql_lock_abort(thd,table, TRUE); 02540 break; 02541 } 02542 } 02543 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void assign_new_table_id | ( | TABLE_SHARE * | share | ) |
Definition at line 2574 of file sql_base.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_PRINT, DBUG_VOID_RETURN, LOCK_open, NULL, safe_mutex_assert_owner, st_table_share::table_map_id, and unlikely.
Referenced by get_table_share().
02575 { 02576 static ulong last_table_id= ~0UL; 02577 02578 DBUG_ENTER("assign_new_table_id"); 02579 02580 /* Preconditions */ 02581 DBUG_ASSERT(share != NULL); 02582 safe_mutex_assert_owner(&LOCK_open); 02583 02584 ulong tid= ++last_table_id; /* get next id */ 02585 /* 02586 There is one reserved number that cannot be used. Remember to 02587 change this when 6-byte global table id's are introduced. 02588 */ 02589 if (unlikely(tid == ~0UL)) 02590 tid= ++last_table_id; 02591 share->table_map_id= tid; 02592 DBUG_PRINT("info", ("table_id=%lu", tid)); 02593 02594 /* Post conditions */ 02595 DBUG_ASSERT(share->table_map_id != ~0UL); 02596 02597 DBUG_VOID_RETURN; 02598 }
Here is the caller graph for this function:

| uint cached_open_tables | ( | void | ) |
Definition at line 85 of file sql_base.cc.
References open_cache, and st_hash::records.
Referenced by dispatch_command(), mysql_print_status(), and show_open_tables().
00086 { 00087 return open_cache.records; 00088 }
Here is the caller graph for this function:

| uint cached_table_definitions | ( | void | ) |
Definition at line 247 of file sql_base.cc.
References st_hash::records, and table_def_cache.
Referenced by show_table_definitions().
00248 { 00249 return table_def_cache.records; 00250 }
Here is the caller graph for this function:

| static bool check_lock_and_start_stmt | ( | THD * | thd, | |
| TABLE * | table, | |||
| thr_lock_type | lock_type | |||
| ) | [static] |
Definition at line 3046 of file sql_base.cc.
References st_table::alias, DBUG_ENTER, DBUG_RETURN, ER_TABLE_NOT_LOCKED_FOR_WRITE, error, st_table::file, st_reginfo::lock_type, my_error(), MYF, handler::print_error(), st_table::reginfo, handler::start_stmt(), and TL_WRITE_ALLOW_READ.
Referenced by lock_tables(), and open_ltable().
03048 { 03049 int error; 03050 DBUG_ENTER("check_lock_and_start_stmt"); 03051 03052 if ((int) lock_type >= (int) TL_WRITE_ALLOW_READ && 03053 (int) table->reginfo.lock_type < (int) TL_WRITE_ALLOW_READ) 03054 { 03055 my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0),table->alias); 03056 DBUG_RETURN(1); 03057 } 03058 if ((error=table->file->start_stmt(thd, lock_type))) 03059 { 03060 table->file->print_error(error,MYF(0)); 03061 DBUG_RETURN(1); 03062 } 03063 DBUG_RETURN(0); 03064 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool close_cached_tables | ( | THD * | thd, | |
| bool | if_wait_for_refresh, | |||
| TABLE_LIST * | tables, | |||
| bool | have_lock | |||
| ) |
Definition at line 818 of file sql_base.cc.
References close_old_data_files(), COND_refresh, DBUG_ASSERT, DBUG_ENTER, DBUG_PRINT, hash_delete(), hash_element(), kill_delayed_threads(), LOCK_open, st_table_share::mutex, mysql_ha_flush(), st_table_share::next, st_table_list::next_local, oldest_unused_share, open_cache, pthread_mutex_lock, st_hash::records, refresh_version, remove_table_from_cache(), reopen_tables(), table_def_cache, TRUE, unused_tables, and VOID.
Referenced by reload_acl_and_cache(), and table_cache_free().
00820 { 00821 bool result=0; 00822 DBUG_ENTER("close_cached_tables"); 00823 DBUG_ASSERT(thd || (!if_wait_for_refresh && !tables)); 00824 00825 if (!have_lock) 00826 VOID(pthread_mutex_lock(&LOCK_open)); 00827 if (!tables) 00828 { 00829 refresh_version++; // Force close of open tables 00830 while (unused_tables) 00831 { 00832 #ifdef EXTRA_DEBUG 00833 if (hash_delete(&open_cache,(byte*) unused_tables)) 00834 printf("Warning: Couldn't delete open table from hash\n"); 00835 #else 00836 VOID(hash_delete(&open_cache,(byte*) unused_tables)); 00837 #endif 00838 } 00839 /* Free table shares */ 00840 while (oldest_unused_share->next) 00841 { 00842 pthread_mutex_lock(&oldest_unused_share->mutex); 00843 VOID(hash_delete(&table_def_cache, (byte*) oldest_unused_share)); 00844 } 00845 } 00846 else 00847 { 00848 bool found=0; 00849 for (TABLE_LIST *table= tables; table; table= table->next_local) 00850 { 00851 if ((!table->table || !table->table->s->log_table) && 00852 remove_table_from_cache(thd, table->db, table->table_name, 00853 RTFC_OWNED_BY_THD_FLAG)) 00854 found=1; 00855 } 00856 if (!found) 00857 if_wait_for_refresh=0; // Nothing to wait for 00858 } 00859 #ifndef EMBEDDED_LIBRARY 00860 if (!tables) 00861 kill_delayed_threads(); 00862 #endif 00863 if (if_wait_for_refresh) 00864 { 00865 /* 00866 If there is any table that has a lower refresh_version, wait until 00867 this is closed (or this thread is killed) before returning 00868 */ 00869 thd->mysys_var->current_mutex= &LOCK_open; 00870 thd->mysys_var->current_cond= &COND_refresh; 00871 thd->proc_info="Flushing tables"; 00872 00873 close_old_data_files(thd,thd->open_tables,1,1); 00874 mysql_ha_flush(thd, tables, MYSQL_HA_REOPEN_ON_USAGE | MYSQL_HA_FLUSH_ALL, 00875 TRUE); 00876 bool found=1; 00877 /* Wait until all threads has closed all the tables we had locked */ 00878 DBUG_PRINT("info", 00879 ("Waiting for other threads to close their open tables")); 00880 while (found && ! thd->killed) 00881 { 00882 found=0; 00883 for (uint idx=0 ; idx < open_cache.records ; idx++) 00884 { 00885 TABLE *table=(TABLE*) hash_element(&open_cache,idx); 00886 if (!table->s->log_table && 00887 ((table->s->version) < refresh_version && table->db_stat)) 00888 { 00889 found=1; 00890 DBUG_PRINT("signal", ("Waiting for COND_refresh")); 00891 pthread_cond_wait(&COND_refresh,&LOCK_open); 00892 break; 00893 } 00894 } 00895 } 00896 /* 00897 No other thread has the locked tables open; reopen them and get the 00898 old locks. This should always succeed (unless some external process 00899 has removed the tables) 00900 */ 00901 thd->in_lock_tables=1; 00902 result=reopen_tables(thd,1,1); 00903 thd->in_lock_tables=0; 00904 /* Set version for table */ 00905 for (TABLE *table=thd->open_tables; table ; table= table->next) 00906 table->s->version= refresh_version; 00907 } 00908 if (!have_lock) 00909 VOID(pthread_mutex_unlock(&LOCK_open)); 00910 if (if_wait_for_refresh) 00911 { 00912 pthread_mutex_lock(&thd->mysys_var->mutex); 00913 thd->mysys_var->current_mutex= 0; 00914 thd->mysys_var->current_cond= 0; 00915 thd->proc_info=0; 00916 pthread_mutex_unlock(&thd->mysys_var->mutex); 00917 } 00918 DBUG_RETURN(result); 00919 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool close_data_tables | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | table_name | |||
| ) |
Definition at line 2234 of file sql_base.cc.
References close_handle_and_leave_table_as_lock(), st_table_share::db, DBUG_ENTER, DBUG_RETURN, mysql_lock_remove(), st_table::next, st_table::s, LEX_STRING::str, strcmp(), and st_table_share::table_name.
02235 { 02236 TABLE *table; 02237 DBUG_ENTER("close_data_tables"); 02238 02239 for (table=thd->open_tables; table ; table=table->next) 02240 { 02241 if (!strcmp(table->s->table_name.str, table_name) && 02242 !strcmp(table->s->db.str, db)) 02243 { 02244 mysql_lock_remove(thd, thd->locked_tables,table); 02245 close_handle_and_leave_table_as_lock(table); 02246 } 02247 } 02248 DBUG_RETURN(0); // For the future 02249 }
Here is the call graph for this function:

| static void close_handle_and_leave_table_as_lock | ( | TABLE * | table | ) | [static] |
Definition at line 634 of file sql_base.cc.
References bzero, handler::close(), st_table::db_stat, DBUG_ENTER, DBUG_VOID_RETURN, st_table::file, INTERNAL_TMP_TABLE, LEX_STRING::length, st_table::mem_root, multi_alloc_root(), NULL, RELEASE_NORMAL, release_table_share(), st_table::s, LEX_STRING::str, and st_table_share::table_cache_key.
Referenced by close_data_tables(), and close_old_data_files().
00635 { 00636 TABLE_SHARE *share, *old_share= table->s; 00637 char *key_buff; 00638 MEM_ROOT *mem_root= &table->mem_root; 00639 DBUG_ENTER("close_handle_and_leave_table_as_lock"); 00640 00641 /* 00642 Make a local copy of the table share and free the current one. 00643 This has to be done to ensure that the table share is removed from 00644 the table defintion cache as soon as the last instance is removed 00645 */ 00646 if (multi_alloc_root(mem_root, 00647 &share, sizeof(*share), 00648 &key_buff, old_share->table_cache_key.length, 00649 NULL)) 00650 { 00651 bzero((char*) share, sizeof(*share)); 00652 share->set_table_cache_key(key_buff, old_share->table_cache_key.str, 00653 old_share->table_cache_key.length); 00654 share->tmp_table= INTERNAL_TMP_TABLE; // for intern_close_table() 00655 } 00656 00657 table->file->close(); 00658 table->db_stat= 0; // Mark file closed 00659 release_table_share(table->s, RELEASE_NORMAL); 00660 table->s= share; 00661 00662 DBUG_VOID_RETURN; 00663 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void close_old_data_files | ( | THD * | thd, | |
| TABLE * | table, | |||
| bool | abort_locks, | |||
| bool | send_refresh | |||
| ) | [static] |
Definition at line 2333 of file sql_base.cc.
References close_handle_and_leave_table_as_lock(), st_table::db_stat, DBUG_ENTER, st_table::locked_by_flush, st_table_share::log_table, mysql_lock_abort(), mysql_lock_remove(), st_table::next, refresh_version, st_table::s, TRUE, and st_table_share::version.
Referenced by close_cached_tables(), open_table(), and wait_for_tables().
02335 { 02336 bool found= send_refresh; 02337 DBUG_ENTER("close_old_data_files"); 02338 02339 for (; table ; table=table->next) 02340 { 02341 /* 02342 Reopen marked for flush. But close log tables. They are flushed only 02343 explicitly on FLUSH LOGS 02344 */ 02345 if (table->s->version != refresh_version && !table->s->log_table) 02346 { 02347 found=1; 02348 if (table->db_stat) 02349 { 02350 if (abort_

