Bug #51076 Crash on spartial usage
Submitted: 11 Feb 2010 0:03 Modified: 11 Mar 2010 0:15
Reporter: Normann Koldrack Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.51a-24+lenny2+spu1-log OS:Linux (Debian Lenny)
Assigned to: CPU Architecture:Any
Tags: crash, IF, Spartial

[11 Feb 2010 0:03] Normann Koldrack
Description:
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=3221225472
read_buffer_size=131072
max_used_connections=7
max_connections=1000
threads_connected=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 5321720 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x7b7bcc0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0x7b7bcc0, backtrace may not be correct.
Bogus stack limit or frame pointer, fp=0x7b7bcc0, stack_bottom=0x41720000, thread_stack=131072, aborting backtrace.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x7c1d4f0 = SELECT `t1_ip` , `country_code`  as cc FROM  `db1`.`t1`  JOIN  `geoip`.`ip_country`  ON ( MBRCONTAINS( ip_poly, POINTFROMWKB( POINT( IF(  `t1_ip`  IS  NULL , 0, INET_ATON( SUBSTRING_INDEX(  `t1_ip` ,  ':', 1  )  )  ) , 0  )  )  )  )  WHERE  `t1_game`  =  'dfe' LIMIT 1
thd->thread_id=1856
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
just run this qry 
SELECT  SQL_CALC_FOUND_ROWS  `t1_ip` , `country_code`  as cc FROM  `db1`.`t1`  JOIN  `geoip`.`ip_country`  ON ( MBRCONTAINS( ip_poly, POINTFROMWKB( POINT( IF(  `t1`  IS  NULL , 0, INET_ATON( SUBSTRING_INDEX(  `t1` ,  ':', 1  )  )  ) , 0  )  )  )  )  WHERE  `t1_game`  =  'dfe' LIMIT 1

CREATE TABLE ip_country
(
  id           INT UNSIGNED  NOT NULL auto_increment,
  ip_poly      POLYGON       NOT NULL,
  ip_from      INT UNSIGNED  NOT NULL,
  ip_to        INT UNSIGNED  NOT NULL,
  country_code CHAR(2)       NOT NULL,
  PRIMARY KEY (id),
  SPATIAL INDEX (ip_poly)
);

CREATE TABLE `db1`.`t1` (
`t1_ip` VARCHAR( 15 ) NOT NULL ,
`t1_game` VARCHAR( 10 ) NOT NULL
) ENGINE = MYISAM ;
[11 Feb 2010 0:15] MySQL Verification Team
Thank you for the bug report. Could you please try the latest released version (the version you reported is quite older) and comment here the results. Thanks in advance.
[12 Mar 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".