diff options
author | unknown <serg@janus.mylan> | 2007-07-04 22:27:58 +0200 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2007-07-04 22:27:58 +0200 |
commit | fcdc76c28952608524d6e5a388bc7b04ad8de09f (patch) | |
tree | e561d554668cb480f1eb87c4430151f7cce55469 /storage/csv/ha_tina.cc | |
parent | 329ba0d46237d606664a0df8eb94c8d12621d237 (diff) | |
download | mariadb-git-fcdc76c28952608524d6e5a388bc7b04ad8de09f.tar.gz |
in mysql_unlock_tables(), do thr_unlock() AFTER external_unlock().
it means, {update,restore}_status() should be called in external_lock,
not in thr_unlock. Only affects storage engines that support
TL_WRITE_CONCURRENT.
Diffstat (limited to 'storage/csv/ha_tina.cc')
-rw-r--r-- | storage/csv/ha_tina.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc index afe8e5f1b27..6dacc8f2663 100644 --- a/storage/csv/ha_tina.cc +++ b/storage/csv/ha_tina.cc @@ -441,7 +441,7 @@ ha_tina::ha_tina(handlerton *hton, TABLE_SHARE *table_arg) */ current_position(0), next_position(0), local_saved_data_file_length(0), file_buff(0), chain_alloced(0), chain_size(DEFAULT_CHAIN_LENGTH), - records_is_known(0) + records_is_known(0), curr_lock_type(F_UNLCK) { /* Set our original buffers from pre-allocated memory */ buffer.set((char*)byte_buffer, IO_SIZE, system_charset_info); @@ -1394,6 +1394,14 @@ int ha_tina::delete_all_rows() DBUG_RETURN(rc); } +int ha_tina::external_lock(THD *thd __attribute__((unused)), int lock_type) +{ + if (lock_type==F_UNLCK && curr_lock_type == F_WRLCK) + update_status(); + curr_lock_type= lock_type; + return 0; +} + /* Called by the database to lock the table. Keep in mind that this is an internal lock. @@ -1408,7 +1416,7 @@ THR_LOCK_DATA **ha_tina::store_lock(THD *thd, return to; } -/* +/* Create a table. You do not want to leave the table open after a call to this (the database will call ::open() if it needs to). */ |