[MDEV-4296] Assertion `n_linear_rings > 0' fails in Gis_polygon::centroid_xy Created: 2013-03-19  Updated: 2013-03-19  Resolved: 2013-03-19

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.1, 5.5.30, 5.1.67, 5.2.14, 5.3.12
Fix Version/s: 10.0.2, 5.5.31, 5.1.73, 5.2.15, 5.3.13

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates

 Description   

Also reproducible on MySQL (tried 5.6) and filed as http://bugs.mysql.com/bug.php?id=68710

SELECT Centroid( AsBinary( LineString( Point( 0,0 ), Point( 0,0 ), Point( 0,0 ) ) ) );

mysqld: spatial.cc:980: int Gis_polygon::centroid_xy(double*, double*) const: Assertion `n_linear_rings > 0' failed.
[ERROR] mysqld got signal 6 ;

#7  0x00007fd019c72192 in __GI___assert_fail (assertion=0xd59936 "n_linear_rings > 0", file=0xd5992b "spatial.cc", line=980, function=0xd59a80 "int Gis_polygon::centroid_xy(double*, double*) const") at assert.c:103
#8  0x000000000085cc76 in Gis_polygon::centroid_xy (this=0x7fd00c546310, x=0x7fd00c5462a0, y=0x7fd00c5462a8) at spatial.cc:980
#9  0x000000000085cf81 in Gis_polygon::centroid (this=0x7fd00c546310, result=0x7fd00c546440) at spatial.cc:1039
#10 0x000000000062eab9 in Item_func_centroid::val_str (this=0x7fd00001d118, str=0x7fd00c546440) at item_geofunc.cc:238
#11 0x00000000005ab85a in Item::send (this=0x7fd00001d118, protocol=0x2732078, buffer=0x7fd00c546440) at item.cc:5606
#12 0x000000000065df22 in select_send::send_data (this=0x7fd00001d358, items=...) at sql_class.cc:1823
#13 0x00000000006fcfb2 in JOIN::exec (this=0x7fd000018650) at sql_select.cc:1829
#14 0x00000000006ff89f in mysql_select (thd=0x2731c98, rref_pointer_array=0x2734030, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x7fd00001d358, unit=0x2733a30, select_lex=0x2733e58) at sql_select.cc:2576
#15 0x00000000006f7721 in handle_select (thd=0x2731c98, lex=0x2733990, result=0x7fd00001d358, setup_tables_done_option=0) at sql_select.cc:280
#16 0x00000000006949ce in execute_sqlcom_select (thd=0x2731c98, all_tables=0x0) at sql_parse.cc:5247
#17 0x000000000068b848 in mysql_execute_command (thd=0x2731c98) at sql_parse.cc:2386
#18 0x00000000006971b1 in mysql_parse (thd=0x2731c98, rawbuf=0x7fd00001c690 "SELECT Centroid( AsBinary( LineString( Point( 0,0 ), Point( 0,0 ), Point( 0,0 ) ) ) )", length=85, found_semicolon=0x7fd00c547900) at sql_parse.cc:6222
#19 0x0000000000688fe1 in dispatch_command (command=COM_QUERY, thd=0x2731c98, packet=0x279e969 "", packet_length=85) at sql_parse.cc:1294
#20 0x0000000000687edc in do_command (thd=0x2731c98) at sql_parse.cc:906
#21 0x0000000000684e73 in handle_one_connection (arg=0x2731c98) at sql_connect.cc:1238
#22 0x00007fd01a009e9a in start_thread (arg=0x7fd00c548700) at pthread_create.c:308
#23 0x00007fd019d36cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

revision-id: sanja@askmonty.org-20130318130752-d89oec5li492i0gv
revno: 3191
branch-nick: 5.1



 Comments   
Comment by Alexey Botchkov [ 2013-03-19 ]

fixing patch: http://lists.askmonty.org/pipermail/commits/2013-March/004456.html

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