diff options
author | unknown <istruewing@chilla.local> | 2007-03-08 09:54:37 +0100 |
---|---|---|
committer | unknown <istruewing@chilla.local> | 2007-03-08 09:54:37 +0100 |
commit | 548a39a104e7abeff3b3429938085b25d2a28c70 (patch) | |
tree | ac6ac688659ec46687b86370cb18a6e1685e6a52 /myisam/myisamlog.c | |
parent | af1f49b77eed1039e3116d91b70f102894db941b (diff) | |
download | mariadb-git-548a39a104e7abeff3b3429938085b25d2a28c70.tar.gz |
Bug#25673 - spatial index corruption, error 126
incorrect key file for table
In certain cases it could happen that deleting a row could
corrupt an RTREE index.
According to Guttman's algorithm, page underflow is handled
by storing the page in a list for later re-insertion. The
keys from the stored pages have to be inserted into the
remaining pages of the same level of the tree. Hence the
level number is stored in the re-insertion list together
with the page.
In the MySQL RTree implementation the level counts from zero
at the root page, increasing numbers for levels down the tree.
If during re-insertion of the keys the tree height grows, all
level numbers become invalid. The remaining keys will be
inserted at the wrong level.
The fix is to increment the level numbers stored in the
reinsert list after a split of the root block during reinsertion.
myisam/rt_index.c:
Bug#25673 - spatial index corruption, error 126
incorrect key file for table
Added a loop in rtree_delete() to increment the level numbers
stored in the reinsert list after a split of the root block
during reinsertion.
Added comments and DBUG statements.
myisam/rt_key.c:
Bug#25673 - spatial index corruption, error 126
incorrect key file for table
Added DBUG statements.
myisam/rt_split.c:
Bug#25673 - spatial index corruption, error 126
incorrect key file for table
Added DBUG statements.
mysql-test/r/gis-rtree.result:
Bug#25673 - spatial index corruption, error 126
incorrect key file for table
Added the test result.
mysql-test/t/gis-rtree.test:
Bug#25673 - spatial index corruption, error 126
incorrect key file for table
Added a test.
Diffstat (limited to 'myisam/myisamlog.c')
0 files changed, 0 insertions, 0 deletions