diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-12-19 15:04:26 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-12-19 15:04:26 +0200 |
commit | ce10e6ca133194632940a622fa94709a1a21a3c8 (patch) | |
tree | b63d9f2542044de370a33e6348a8ff0a67e7ec03 /mysql-test/r/gis-rtree.result | |
parent | 2f78d5ca81e39c55aa918758a1f9b4e46ce76d74 (diff) | |
download | mariadb-git-ce10e6ca133194632940a622fa94709a1a21a3c8.tar.gz |
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
While executing OPTIMIZE TABLE on MyISAM tables the server re-creates the
index file(s) in order to sort them physically by the key. This cannot be
done for R-tree indexes as it makes no sense.
The server was not checking the type of the index and was accessing an
R-tree index as if it was a B-tree.
Fixed by preventing sorting the index file if it contains an R-tree index.
myisam/mi_check.c:
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
- disable sorting the index file if it contains an R-tree index.
mysql-test/r/gis-rtree.result:
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
- test case
mysql-test/t/gis-rtree.test:
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
- test case
Diffstat (limited to 'mysql-test/r/gis-rtree.result')
-rw-r--r-- | mysql-test/r/gis-rtree.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index e8134a50496..05d0d5634e6 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -881,3 +881,14 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field DROP TABLE t1; +CREATE TABLE t1 (a INT AUTO_INCREMENT, b POINT NOT NULL, KEY (a), SPATIAL KEY (b)); +INSERT INTO t1 (b) VALUES (GeomFromText('POINT(1 2)')); +INSERT INTO t1 (b) SELECT b FROM t1; +INSERT INTO t1 (b) SELECT b FROM t1; +INSERT INTO t1 (b) SELECT b FROM t1; +INSERT INTO t1 (b) SELECT b FROM t1; +INSERT INTO t1 (b) SELECT b FROM t1; +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +DROP TABLE t1; |