summaryrefslogtreecommitdiff
path: root/myisam/mi_create.c
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-07-20 14:51:42 +0500
committerunknown <hf@deer.(none)>2005-07-20 14:51:42 +0500
commit153f78d3934737f0e2c12ad170d63e6f79780706 (patch)
tree65b075981585adc9ec934782f87e3568a23abd4d /myisam/mi_create.c
parentee6866416f70139699f715f66c7428d0292a95da (diff)
downloadmariadb-git-153f78d3934737f0e2c12ad170d63e6f79780706.tar.gz
Fix for bug #10839 (myisamchk -rq crashes on spatial field)
myisam/mi_create.c: We actually have one real keyseg here - the geometry object itself. So we have to reduce on (sp_segs-1)
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r--myisam/mi_create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 33b344405ec..8a5da475fcc 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -253,7 +253,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
MYI file and SPATIAL key *does have* additional sp_segs keysegs.
We'd better delete them now
*/
- keydef->keysegs-=sp_segs;
+ keydef->keysegs-=(sp_segs-1);
}
for (j=0, keyseg=keydef->seg ; (int) j < keydef->keysegs ;