summaryrefslogtreecommitdiff
path: root/myisam/mi_update.c
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2002-08-30 12:40:40 +0300
committermonty@narttu.mysql.fi <>2002-08-30 12:40:40 +0300
commit7134ffec210edde21860a2b2c2654be481de49b4 (patch)
tree1bb81fd601075133af9ee99bd7ac94baf5ffc46c /myisam/mi_update.c
parent921f7c9c551d9e1bdd5083ebe71d204ab6246ba1 (diff)
parentdd5382187e68ff5337e1fe7ba5f86f0d9cdd31d5 (diff)
downloadmariadb-git-7134ffec210edde21860a2b2c2654be481de49b4.tar.gz
Merge with 4.0.3
Some simple optimzations, more comments and indentation changes. Add ` around database in 'use database' in binary log. Moved max_error_count and max_warning_count to variables struct. Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls. Changed string functions to use character set of first string argument as default return characterset (Each string function can change the above assumption if needed)
Diffstat (limited to 'myisam/mi_update.c')
-rw-r--r--myisam/mi_update.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/myisam/mi_update.c b/myisam/mi_update.c
index 1614d6ca19d..81142ecabac 100644
--- a/myisam/mi_update.c
+++ b/myisam/mi_update.c
@@ -17,6 +17,8 @@
/* Update an old row in a MyISAM table */
#include "fulltext.h"
+#include "rt_index.h"
+
#ifdef __WIN__
#include <errno.h>
#endif
@@ -61,6 +63,7 @@ int mi_update(register MI_INFO *info, const byte *oldrec, byte *newrec)
goto err_end; /* Record has changed */
}
+
/* Calculate and check all unique constraints */
key_changed=0;
for (i=0 ; i < share->state.header.uniques ; i++)
@@ -111,8 +114,8 @@ int mi_update(register MI_INFO *info, const byte *oldrec, byte *newrec)
key_changed|=HA_STATE_WRITTEN; /* Mark that keyfile changed */
changed|=((ulonglong) 1 << i);
share->keyinfo[i].version++;
- if (_mi_ck_delete(info,i,old_key,old_length)) goto err;
- if (_mi_ck_write(info,i,new_key,new_length)) goto err;
+ if (share->keyinfo[i].ck_delete(info,i,old_key,old_length)) goto err;
+ if (share->keyinfo[i].ck_insert(info,i,new_key,new_length)) goto err;
if (share->base.auto_key == i+1)
auto_key_changed=1;
}