diff options
author | Michael Widenius <monty@askmonty.org> | 2009-02-15 12:58:34 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2009-02-15 12:58:34 +0200 |
commit | a8fdaa6f2c5b2e302bffb069be3475772ca20f48 (patch) | |
tree | b5c9560ec7346f7af6a5904ad344fdbb8020849c /storage/csv/ha_tina.cc | |
parent | 115efe100dbc1393bce964fa1370e50cfef71d18 (diff) | |
parent | f7a24d72dc7a86341da4634f6d1a71f1ea77000b (diff) | |
download | mariadb-git-a8fdaa6f2c5b2e302bffb069be3475772ca20f48.tar.gz |
Merge with base MySQL 5.1
Contains fixes for test cases
Changed release tag to beta
configure.in:
change release tag to beta
Diffstat (limited to 'storage/csv/ha_tina.cc')
-rw-r--r-- | storage/csv/ha_tina.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc index 3d24000823a..e29fe4162f4 100644 --- a/storage/csv/ha_tina.cc +++ b/storage/csv/ha_tina.cc @@ -1439,6 +1439,17 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt) a file, which descriptor is still open. EACCES will be returned when trying to delete the "to"-file in my_rename(). */ + if (share->tina_write_opened) + { + /* + Data file might be opened twice, on table opening stage and + during write_row execution. We need to close both instances + to satisfy Win. + */ + if (my_close(share->tina_write_filedes, MYF(0))) + DBUG_RETURN(my_errno ? my_errno : -1); + share->tina_write_opened= FALSE; + } if (my_close(data_file,MYF(0)) || my_close(repair_file, MYF(0)) || my_rename(repaired_fname, share->data_file_name, MYF(0))) DBUG_RETURN(-1); |