Hi Ramil,
Ok to push.
Regards,
Sergey
On Mon, May 16, 2011 at 06:55:47PM -0000, Ramil Kalimullin wrote:
> #At file:///home/ram/mysql/b11764487-5.1/ based on
> revid:vinay.fisrekar@stripped
>
> 3622 Ramil Kalimullin 2011-05-16
> Bug#11764487: myisam corruption with insert ignore and invalid spatial data
>
> Problem: in case of wrong data insert into indexed GEOMETRY fields
> (e.g. NULL value for a not NULL field) MyISAM reported
> "ERROR 126 (HY000): Incorrect key file for table; try to repair it"
> due to misuse of the key deletion function.
>
> Fix: always use R-tree key functions for R-tree based indexes
> and B-tree key functions for B-tree based indexes.
> @ mysql-test/r/gis.result
> Bug#11764487: myisam corruption with insert ignore and invalid spatial data
> - test result.
> @ mysql-test/t/gis.test
> Bug#11764487: myisam corruption with insert ignore and invalid spatial data
> - test case.
> @ storage/myisam/mi_update.c
> Bug#11764487: myisam corruption with insert ignore and invalid spatial data
> - handling update errors check for HA_ERR_NULL_IN_SPATIAL as well to be
> consistent with mi_write();
> - always use keyinfo->ck_delete()/ck_insert() instead of
> _mi_ck_delete()/_mi_ck_write()
> to handle index properly, as it may be of B-tree or R-tree type.
> @ storage/myisam/mi_write.c
> Bug#11764487: myisam corruption with insert ignore and invalid spatial data
> - always use keyinfo->ck_delete() instead of _mi_ck_delete() to handle
> index properly, as it may be of B-tree or R-tree type.
...skip...
--
Sergey Vojtovich <svoj@stripped>
MySQL AB, Software Engineer
Izhevsk, Russia, www.mysql.com