summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <svoj@may.pils.ru>2006-08-09 14:33:45 +0500
committerunknown <svoj@may.pils.ru>2006-08-09 14:33:45 +0500
commit51bb3b2a7f906af25b5dd0ef91491aa415615a4b (patch)
tree8f23751a5843a664a5ba7aacd076a9ce53e15d0e /myisam
parent4abe4b1717b099dbf3502e041c246b196622a23f (diff)
parenta2a5f2b53622af0933de757660428ba61737cb98 (diff)
downloadmariadb-git-51bb3b2a7f906af25b5dd0ef91491aa415615a4b.tar.gz
Merge may.pils.ru:/home/svoj/devel/mysql/BUG20060/mysql-4.1
into may.pils.ru:/home/svoj/devel/mysql/BUG20060/mysql-5.0 myisam/mi_update.c: Auto merged
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_update.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/myisam/mi_update.c b/myisam/mi_update.c
index f8b5cf55406..9ddda3f5ea9 100644
--- a/myisam/mi_update.c
+++ b/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)
{