From da1efa3387e62df85d48f05e81ac9b324c455e83 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Nov 2007 11:03:03 +0400 Subject: 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: Bug #30284 spatial key corruption full_text_keys counts both FULL_TEXT and SPATIAL keys mysql-test/r/gis.result: Bug #30284 spatial key corruption test result mysql-test/t/gis.test: Bug #30284 spatial key corruption. test case --- mysql-test/t/gis.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t/gis.test') diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index cf5c3b31bc1..77e73e0d590 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -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 -- cgit v1.2.1 From e4dc9a8e6e13405859afda2d472e4cc4b6dc169c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 24 Nov 2007 14:57:09 +0400 Subject: merging fix mysql-test/r/gis.result: result fixed mysql-test/t/gis.test: test fixed --- mysql-test/t/gis.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/gis.test') diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 6d7ec046c4c..d578b5c9955 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -443,7 +443,7 @@ DROP TABLE t1; # Bug #30284 spatial key corruption # -create table t1(col1 geometry not null,col15 geometrycollection not +create table t1(col1 geometry default 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)'); -- cgit v1.2.1