summaryrefslogtreecommitdiff
path: root/storage/csv
diff options
context:
space:
mode:
authorunknown <jani@labbari.dsl.inet.fi>2007-07-07 18:03:07 +0300
committerunknown <jani@labbari.dsl.inet.fi>2007-07-07 18:03:07 +0300
commit1ea806b1748c4ffc0904021d7d1e938fe837d73e (patch)
tree66e86ba43432e208ac5184873ea51fbe95cc8c60 /storage/csv
parent6ed46be70e0c1886231729458b94fb3321ac1a31 (diff)
parent23d10db8a3fd1830afbca1e0ab374799cc715aaa (diff)
downloadmariadb-git-1ea806b1748c4ffc0904021d7d1e938fe837d73e.tar.gz
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria
into labbari.dsl.inet.fi:/home/my/bk/mysql-maria.prod mysys/thr_lock.c: Auto merged storage/csv/ha_tina.cc: Auto merged storage/csv/ha_tina.h: Auto merged storage/maria/ma_blockrec.c: Auto merged storage/maria/ma_check.c: Auto merged storage/maria/ma_loghandler.c: Auto merged storage/maria/trnman.c: Auto merged storage/myisam/mi_locking.c: Auto merged sql/lock.cc: SCCS merged
Diffstat (limited to 'storage/csv')
-rw-r--r--storage/csv/ha_tina.cc12
-rw-r--r--storage/csv/ha_tina.h4
2 files changed, 14 insertions, 2 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 6de153c82d7..1beb999b2e9 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, &my_charset_bin);
@@ -1395,6 +1395,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.
@@ -1409,7 +1417,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).
*/
diff --git a/storage/csv/ha_tina.h b/storage/csv/ha_tina.h
index 8d2c6855b84..2572cbd286a 100644
--- a/storage/csv/ha_tina.h
+++ b/storage/csv/ha_tina.h
@@ -81,6 +81,8 @@ class ha_tina: public handler
bool records_is_known;
private:
+ int curr_lock_type;
+
bool get_write_pos(off_t *end_pos, tina_set *closest_hole);
int open_update_temp_file_if_needed();
int init_tina_writer();
@@ -155,6 +157,8 @@ public:
bool check_if_incompatible_data(HA_CREATE_INFO *info,
uint table_changes);
+ int external_lock(THD *thd, int lock_type);
+
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type);