Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2724

LP:839341 - 100% CPU usage with ST_UNION in maria-5.3-gis

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      maria-5.3-gis can not calculate the following expression:

      SELECT ST_UNION(GEOMETRYFROMTEXT(' POINT( 8 1 ) ') ,MULTILINESTRINGFROMTEXT(' MULTILINESTRING( (3 5, 2 5, 2 4, 3 4, 3 5) ) '));

      the server enters into an endless, unkillable loop:

      (gdb) next
      1167 while (next)
      (gdb)
      1169 cur= next;
      (gdb)
      1170 next= move_upward ? next->up : next->down;
      (gdb)
      1171 if (!next)
      (gdb)
      1167 while (next)

      bzr version-info
      revision-id: <email address hidden>
      date: 2011-09-01 11:44:56 +0500
      build-date: 2011-09-02 10:30:29 +0300
      revno: 2993
      branch-nick: maria-5.3-gis

      backtrace:

      #0 0x08368bbe in Gcalc_operation_reducer::get_line_result (this=0xac7e424, cur=0xac8c7a0, storage=0xac7e3c8) at gcalc_tools.cc:1171
      #1 0x08368e83 in Gcalc_operation_reducer::get_result (this=0xac7e424, storage=0xac7e3c8) at gcalc_tools.cc:1234
      #2 0x0825c2b6 in Item_func_spatial_operation::val_str (this=0xac7e248, str_value=0xa4772060) at item_geofunc.cc:1039
      #3 0x081dbb51 in Item::send (this=0xac7e248, protocol=0xabcca84, buffer=0xa4772060) at item.cc:5905
      #4 0x082894bc in select_send::send_data (this=0xac7e608, items=...) at sql_class.cc:1919
      #5 0x0832630c in JOIN::exec (this=0xac83468) at sql_select.cc:2069
      #6 0x08328d28 in mysql_select (thd=0xabcc758, rref_pointer_array=0xabce270, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0,
      having=0x0, proc_param=0x0, select_options=2147764736, result=0xac7e608, unit=0xabcde74, select_lex=0xabce150) at sql_select.cc:2885
      #7 0x08320bf3 in handle_select (thd=0xabcc758, lex=0xabcde18, result=0xac7e608, setup_tables_done_option=0) at sql_select.cc:283
      #8 0x082bc323 in execute_sqlcom_select (thd=0xabcc758, all_tables=0x0) at sql_parse.cc:5082
      #9 0x082b3127 in mysql_execute_command (thd=0xabcc758) at sql_parse.cc:2227
      #10 0x082be95f in mysql_parse (thd=0xabcc758,
      rawbuf=0xac7db78 "SELECT ST_UNION(GEOMETRYFROMTEXT(' POINT( 8 1 ) ') ,MULTILINESTRINGFROMTEXT(' MULTILINESTRING( (3 5, 2 5, 2 4, 3 4, 3 5) ) '))",
      length=128, found_semicolon=0xa4773228) at sql_parse.cc:6083
      #11 0x082b0dc3 in dispatch_command (command=COM_QUERY, thd=0xabcc758, packet=0xac670d1 "", packet_length=128) at sql_parse.cc:1206
      #12 0x082b0249 in do_command (thd=0xabcc758) at sql_parse.cc:904
      #13 0x082ad2c4 in handle_one_connection (arg=0xabcc758) at sql_connect.cc:1177
      #14 0x00821919 in start_thread () from /lib/libpthread.so.0
      #15 0x00453cce in clone () from /lib/libc.so.6

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 839341

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 839341

              People

              • Assignee:
                holyfoot Alexey Botchkov
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: