Bug #9645 | Corrupted spatial index | ||
---|---|---|---|
Submitted: | 5 Apr 2005 12:40 | Modified: | 31 Aug 2005 19:54 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S3 (Non-critical) |
Version: | 4.1.7-debug | OS: | Linux (Linux 2.6.10, Solaris 8) |
Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
Tags: | corruption, myisam, spatial |
[5 Apr 2005 12:40]
[ name withheld ]
[5 Apr 2005 14:46]
MySQL Verification Team
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to 'Open'. Thank you for your interest in MySQL.
[8 Apr 2005 12:22]
[ name withheld ]
The following should reproduce the problem: DROP TABLE IF EXISTS `tempTable`; CREATE TABLE `tempTable` (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`(32))) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO tempTable (geometry) VALUES (PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999, -18.6086111000 -66.9327777000))')); INSERT INTO tempTable (geometry) VALUES (PolygonFromText('POLYGON((-65.7402776999 -96.6686111000, -65.7372222000 -96.5516666000, -65.8502777000 -96.5461111000, -65.8527777000 -96.6627777000, -65.7402776999 -96.6686111000))')); INSERT INTO tempTable (geometry) VALUES (PolygonFromText('POLYGON((70.6624999999 34.7755555000, 70.6650000000 34.8924998999, 70.5519443999 34.8975000000, 70.5494443999 34.7808332999, 70.6624999999 34.7755555000))')); If you perform a "check table tempTable extended;" after the first record is inserted it returns an OK status, but after the 2nd record it returns "corrupted".
[8 Apr 2005 18:42]
MySQL Verification Team
mysql> INSERT INTO tempTable (geometry) VALUES -> (PolygonFromText('POLYGON((-65.7402776999 -96.6686111000, -65.7372222000 '> -96.5516666000, -65.8502777000 -96.5461111000, -65.8527777000 -96.6627777000, '> -65.7402776999 -96.6686111000))')); Query OK, 1 row affected (0.00 sec) mysql> check table tempTable extended; +----------------+-------+----------+----------------------------------------------+ | Table | Op | Msg_type | Msg_text | +----------------+-------+----------+----------------------------------------------+ | test.tempTable | check | error | Record at: 108 Can't find key for index: 1 | | test.tempTable | check | error | Corrupt | +----------------+-------+----------+----------------------------------------------+ 2 rows in set (0.01 sec) Thank you for the feedback.
[20 Apr 2005 12:43]
[ name withheld ]
I don't know if this helps, but here are some other symptoms that may be related to this bug. We've seen problems where the spatial index becomes corrupted and select statements using that index return an incomplete set of data. As a check we've had the select statements ignore the index, and get more records returned. It might be that the index is corrupted before the mi_check.c::chk_index notices the problem. Also we've noticed that other indexes (non-spatial) have become corrupted, but we haven't been able to repeat those as easily. We were wondering if some of these problems might be related to using myISAM tables? Do you know if the spatial extensions will be available in other table types? Thanks.
[4 Aug 2005 16:38]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/27898
[27 Aug 2005 15:25]
Alexey Botchkov
pushed into 4.1.15
[31 Aug 2005 19:54]
Paul DuBois
Noted in 4.1.15 changelog.