summaryrefslogtreecommitdiff
path: root/myisam/mi_update.c
diff options
context:
space:
mode:
authorunknown <bar@gw.udmsearch.izhnet.ru>2002-02-20 14:11:21 +0400
committerunknown <bar@gw.udmsearch.izhnet.ru>2002-02-20 14:11:21 +0400
commit3d5dc65dfd72083ed159220d03bea942094e8662 (patch)
tree20573ea174df56ec053e23fa07eb87679f3b7a38 /myisam/mi_update.c
parentb87d6ee9d730fb2df74a3981b552b0da2e09570c (diff)
downloadmariadb-git-3d5dc65dfd72083ed159220d03bea942094e8662.tar.gz
This ChangeSet adds RTREE support into myisam library.
RTREEs will be used for GIS extension in MySQL myisam/.cvsignore: Added sp_test and rt_test myisam/Makefile.am: Added RTREE files myisam/mi_create.c: Added RTREE/SPATIAL initialization myisam/mi_delete.c: Switched to use virual function, instead of mi_ck_delete() direct call myisam/mi_key.c: Added sp_make_key() call in the case of SPATIAL index type myisam/mi_open.c: Added some new initialization actions which depend on key_alg being used: RTREE or BTREE myisam/mi_range.c: Rtree estimation myisam/mi_rkey.c: rtree myisam/mi_rnext.c: rtree myisam/mi_rnext_same.c: rtree myisam/mi_static.c: New search flags for bounding rectungles myisam/mi_test1.c: one now should always specify key_alg during keyinfo initializing: BTREE or RTREE myisam/mi_test2.c: Added key_alg initializing myisam/mi_test3.c: Added key_alg initialization myisam/mi_update.c: Switched to virtual functions, instead of mi_ck_delete/mi_ck_write direct call myisam/mi_write.c: Virtual function instead of mi_ck_write() direct call myisam/myisamdef.h: Rtree additions
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 2c6bc42bbdb..ebf45316eb6 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++)
@@ -113,8 +116,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;
}