[MDEV-4365] GIS index regression on 5.5.30 Created: 2013-04-03  Updated: 2022-12-08  Resolved: 2022-12-07

Status: Closed
Project: MariaDB Server
Component/s: N/A
Affects Version/s: 5.5.30
Fix Version/s: N/A

Type: Bug Priority: Trivial
Reporter: VAROQUI Stephane Assignee: Alexey Botchkov
Resolution: Not a Bug Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-3819 missing constraints for spatial colum... Closed

 Description   

Upgrading 5.5.28a binaries tar.gz to 5.5.30 home made compilation with cmake . break queries like :
WHERE MBRWithin(GeomFromText('POINT(12345678900000000000 9900000000573)' ),cllbindexgeo)



 Comments   
Comment by Elena Stepanova [ 2013-04-03 ]

Hi Stephane,

Could you please provide the whole query (and the table definition, is relevant), and also to elaborate on what 'break queries' mean – wrong result? crash? syntax error?

Thanks.

Comment by VAROQUI Stephane [ 2013-04-03 ]

Here is an example :

MariaDB [tpewebv2]> SELECT * FROM binpays FORCE INDEX(indexgeo_idx) WHERE MBRWithin(GEOMFROMTEXT(CONCAT('POINT(',rpad(446214,19,0),' 0)' )),indexgeo);
ERROR 1366 (22007): Incorrect LINESTRING value: 'POINT' for column 'indexgeo' at row 1
 
MariaDB [tpewebv2]> show create table binpays\G
*************************** 1. row ***************************
       Table: binpays
Create Table: CREATE TABLE `binpays` (
  `binmin` bigint(20) unsigned NOT NULL COMMENT 'Début plage',
  `binmax` bigint(20) unsigned NOT NULL COMMENT 'Fin plage',
  `pays` char(3) NOT NULL COMMENT 'Code Pays (lettre)',
  `3DSecResp` char(1) NOT NULL COMMENT 'Responsabilité 3D Secure ',
  `applicatif` char(16) NOT NULL COMMENT 'Code Applicatif',
  `indexgeo` linestring NOT NULL,
  `reseau` char(1) NOT NULL DEFAULT '9' COMMENT 'Code Reseau: 0=privatif, 1=CB,2=Visa,3=Mastercard,4=EuroCard,9=Indetermine',
  `produit` char(2) NOT NULL DEFAULT '00' COMMENT 'Code produit de la carte',
  `banque` char(5) NOT NULL DEFAULT '00000' COMMENT 'Code banque de la carte',
  `mc_produit` char(3) NOT NULL DEFAULT '000' COMMENT 'Code produit de la carte (nouvelle nomenclature)',
  PRIMARY KEY (`binmin`,`applicatif`),
  SPATIAL KEY `indexgeo_idx` (`indexgeo`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC

Comment by Elena Stepanova [ 2013-04-03 ]

Okay, so the difference is that

CREATE TABLE t1 ( a LINESTRING ) ENGINE=MyISAM;
INSERT INTO t1 VALUES ( GeomFromText('POINT(6 5)') );

succeeds on 5.5.29, but produces an error on 5.5.30:

INSERT INTO t1 VALUES ( GeomFromText('POINT(6 5)') );
ERROR 22007: Incorrect LINESTRING value: 'POINT' for column 'a' at row 1

I'm not sure it wasn't intentional, so I'm forwarding it to Alexey to give a definite answer.

Comment by Alice Sherepa [ 2022-12-07 ]

it was an intentional change, MDEV-3819

Generated at Thu Feb 08 06:55:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.