Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-19 11:03:03+04:00, holyfoot@stripped +3 -0
Bug #30284 spatial key corruption.
SPATIAL key is fine actually, but the chk_key() function
mistakenly returns error. It tries to compare checksums
of btree and SPATIAL keys while the checksum for the SPATIAL isn't
calculated (always 0). Same thing with FULLTEXT keys is handled
using full_text_keys counter, so fixed by counting both
SPATIAL and FULLTEXT keys in that counter.
myisam/mi_check.c@stripped, 2007-11-19 11:03:01+04:00, holyfoot@stripped +1 -1
Bug #30284 spatial key corruption
full_text_keys counts both FULL_TEXT and SPATIAL keys
mysql-test/r/gis.result@stripped, 2007-11-19 11:03:01+04:00, holyfoot@stripped +8 -0
Bug #30284 spatial key corruption
test result
mysql-test/t/gis.test@stripped, 2007-11-19 11:03:01+04:00, holyfoot@stripped +11 -0
Bug #30284 spatial key corruption.
test case
diff -Nrup a/myisam/mi_check.c b/myisam/mi_check.c
--- a/myisam/mi_check.c 2007-05-16 23:42:31 +05:00
+++ b/myisam/mi_check.c 2007-11-19 11:03:01 +04:00
@@ -454,7 +454,7 @@ int chk_key(MI_CHECK *param, register MI
if ((!(param->testflag & T_SILENT)))
printf ("- check data record references index: %d\n",key+1);
- if (keyinfo->flag & HA_FULLTEXT)
+ if (keyinfo->flag & (HA_FULLTEXT | HA_SPATIAL))
full_text_keys++;
if (share->state.key_root[key] == HA_OFFSET_ERROR &&
(info->state->records == 0 || keyinfo->flag & HA_FULLTEXT))
diff -Nrup a/mysql-test/r/gis.result b/mysql-test/r/gis.result
--- a/mysql-test/r/gis.result 2007-10-03 13:35:33 +05:00
+++ b/mysql-test/r/gis.result 2007-11-19 11:03:01 +04:00
@@ -730,4 +730,12 @@ select geomfromtext(col9,col89) as a fro
a
NULL
DROP TABLE t1;
+create table t1(col1 geometry not null,col15 geometrycollection not
+null,spatial index(col15),index(col1(15)))engine=myisam;
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
End of 4.1 tests
diff -Nrup a/mysql-test/t/gis.test b/mysql-test/t/gis.test
--- a/mysql-test/t/gis.test 2007-10-03 13:35:33 +05:00
+++ b/mysql-test/t/gis.test 2007-11-19 11:03:01 +04:00
@@ -427,4 +427,15 @@ INSERT INTO `t1` VALUES ('','0000-00-00'
select geomfromtext(col9,col89) as a from t1;
DROP TABLE t1;
+#
+# Bug #30284 spatial key corruption
+#
+
+create table t1(col1 geometry not null,col15 geometrycollection not
+null,spatial index(col15),index(col1(15)))engine=myisam;
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+check table t1 extended;
+drop table t1;
+
--echo End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (holyfoot:1.2696) BUG#30284 | holyfoot | 19 Nov |