diff options
author | brian@zim.(none) <> | 2006-08-14 15:24:29 -0700 |
---|---|---|
committer | brian@zim.(none) <> | 2006-08-14 15:24:29 -0700 |
commit | 8deb5beb9ce9a3549e4baeac4e50f53c2492e355 (patch) | |
tree | 2e163bcaefab8eeba55ac25ca6707e3181740da8 /storage/myisam/mi_update.c | |
parent | 1f80fb04532d6b0e9b8558edd020a09353e962ec (diff) | |
parent | c43a332859b6d216d5fe4eef3ef639b1f117f6bd (diff) | |
download | mariadb-git-8deb5beb9ce9a3549e4baeac4e50f53c2492e355.tar.gz |
Merge zim.(none):/home/brian/mysql/dep-5.0
into zim.(none):/home/brian/mysql/dep-5.1
Diffstat (limited to 'storage/myisam/mi_update.c')
-rw-r--r-- | storage/myisam/mi_update.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/storage/myisam/mi_update.c b/storage/myisam/mi_update.c index f8b5cf55406..9ddda3f5ea9 100644 --- a/storage/myisam/mi_update.c +++ b/storage/myisam/mi_update.c @@ -172,7 +172,17 @@ int mi_update(register MI_INFO *info, const byte *oldrec, byte *newrec) info->update= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED | HA_STATE_AKTIV | key_changed); myisam_log_record(MI_LOG_UPDATE,info,newrec,info->lastpos,0); - VOID(_mi_writeinfo(info,key_changed ? WRITEINFO_UPDATE_KEYFILE : 0)); + /* + Every myisam function that updates myisam table must end with + call to _mi_writeinfo(). If operation (second param of + _mi_writeinfo()) is not 0 it sets share->changed to 1, that is + flags that data has changed. If operation is 0, this function + equals to no-op in this case. + + mi_update() must always pass !0 value as operation, since even if + there is no index change there could be data change. + */ + VOID(_mi_writeinfo(info, WRITEINFO_UPDATE_KEYFILE)); allow_break(); /* Allow SIGHUP & SIGINT */ if (info->invalidator != 0) { |