ST_BUFFER asserts if radius = 0 in maria-5.3-gis

Bug #801189 reported by Philip Stoev on 2011-06-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Undecided
Alexey Botchkov

Bug Description

assertion:

mysqld: item_geofunc.cc:1109: void get_n_sincos(int, double*, double*): Assertion `n > 0 && n < SINUSES_CALCULATED*2+1' failed.
1

backtrace:

#8 0x00399d98 in __assert_fail () from /lib/libc.so.6
#9 0x0825c142 in get_n_sincos (n=65, sinus=0xae8819d0, cosinus=0xae8819c8) at item_geofunc.cc:1109
#10 0x0825c313 in fill_gap (trn=0xae881abc, x=1, y=1, ax=0, ay=-0, bx=-0, by=0, d=0, empty_gap=0xae881a76) at item_geofunc.cc:1155
#11 0x0825c7ec in Item_func_buffer::Transporter::add_edge_buffer (this=0xae881bd8, x3=0, y3=0, round_p1=true, round_p2=true) at item_geofunc.cc:1228
#12 0x0825cf13 in Item_func_buffer::Transporter::complete (this=0xae881bd8) at item_geofunc.cc:1347
#13 0x0825d055 in Item_func_buffer::Transporter::complete_line (this=0xae881bd8) at item_geofunc.cc:1377
#14 0x08482b29 in Gis_line_string::store_shapes (this=0xae881c44, trn=0xae881bd8) at spatial.cc:727
#15 0x0825d2a8 in Item_func_buffer::val_str (this=0xae512a28, str_value=0xae882060) at item_geofunc.cc:1416
#16 0x081db831 in Item::send (this=0xae512a28, protocol=0xa0cfc0c, buffer=0xae882060) at item.cc:5905
#17 0x08288f24 in select_send::send_data (this=0xae512d78, items=...) at sql_class.cc:1919
#18 0x08325d74 in JOIN::exec (this=0xae520a60) at sql_select.cc:2069
#19 0x08328790 in mysql_select (thd=0xa0cf8e0, rref_pointer_array=0xa0d13f8, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0,
    having=0x0, proc_param=0x0, select_options=2147797504, result=0xae512d78, unit=0xa0d0ffc, select_lex=0xa0d12d8) at sql_select.cc:2885
#20 0x0832065b in handle_select (thd=0xa0cf8e0, lex=0xa0d0fa0, result=0xae512d78, setup_tables_done_option=0) at sql_select.cc:283
#21 0x082bbd8b in execute_sqlcom_select (thd=0xa0cf8e0, all_tables=0x0) at sql_parse.cc:5082
#22 0x082b2b8f in mysql_execute_command (thd=0xa0cf8e0) at sql_parse.cc:2227
#23 0x082be3c7 in mysql_parse (thd=0xa0cf8e0,
    rawbuf=0xae5125e0 "SELECT ST_BUFFER (\nLineStringFromText( ' LINESTRING( 0 0 , 1 1 ) ' ) , 0\n)\n# , ( 6 2 , 1 6 , 5 1 , 5 2 )", length=106,
    found_semicolon=0xae883228) at sql_parse.cc:6083
#24 0x082b082b in dispatch_command (command=COM_QUERY, thd=0xa0cf8e0, packet=0xa12a3e9 "", packet_length=107) at sql_parse.cc:1206
#25 0x082afcb1 in do_command (thd=0xa0cf8e0) at sql_parse.cc:904
#26 0x082acd2c in handle_one_connection (arg=0xa0cf8e0) at sql_connect.cc:1177
#27 0x00821919 in start_thread () from /lib/libpthread.so.0
#28 0x00453cce in clone () from /lib/libc.so.6

test case:

SELECT ST_BUFFER (
        LineStringFromText( ' LINESTRING( 0 0 , 1 1 ) ' ) , 0
);

 bzr version-info
revision-id: <email address hidden>
date: 2011-06-20 00:21:41 +0500
build-date: 2011-06-23 18:00:04 +0300
revno: 2982
branch-nick: maria-5.3-gis

Changed in maria:
milestone: none → 5.3
assignee: nobody → Alexey Botchkov (holyfoot)
Alexey Botchkov (holyfoot) wrote :

patch pushed into the 5.3-gis.

Changed in maria:
status: New → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers