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

ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0))

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.3.12, 5.5.40, 10.0.12, 10.0.14
    • 5.5.41, 10.0.15, 5.3.13
    • GIS
    • None
    • Linux CentOS 6.5 x64

    Description

      > create table a (area polygon) engine=aria;
      Query OK, 0 rows affected (0.00 sec)
       
      > set @poly='Polygon((0 0))';
      Query OK, 0 rows affected (0.00 sec)
       
      > insert into a values (GeomFromText(@poly));
      Query OK, 1 row affected (0.00 sec)
       
      > select * from a where st_within(point(0,0),area);
      ERROR 2013 (HY000): Lost connection to MySQL server during query

      Stack trace

      stack_bottom = 0x7f77e0915d30 thread_stack 0x48000
      /usr/sbin/mysqld(my_print_stacktrace+0x2b)[0xb6b85b]
      /usr/sbin/mysqld(handle_fatal_signal+0x398)[0x723f08]
      /lib64/libpthread.so.0[0x351680f710]
      /usr/sbin/mysqld(_ZNK11Gis_polygon12store_shapesEP23Gcalc_shape_transporter+0xf6)[0x81ef96]
      /usr/sbin/mysqld(_ZN21Item_func_spatial_rel7val_intEv+0x39a)[0x78657a]
      /usr/sbin/mysqld[0x5f6ad9]
      /usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x1d9)[0x5f6f79]
      /usr/sbin/mysqld[0x60e04d]
      /usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0xa3d)[0x62117d]
      /usr/sbin/mysqld(_ZN4JOIN4execEv+0x11)[0x622ff1]
      /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x1dd)[0x61fbbd]
      /usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x28d)[0x62334d]
      /usr/sbin/mysqld[0x5cac06]
      /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x4c97)[0x5d58d7]
      /usr/sbin/mysqld[0x5d7402]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1b20)[0x5d95c0]
      /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x453)[0x6946a3]
      /usr/sbin/mysqld(handle_one_connection+0x42)[0x694772]
      /lib64/libpthread.so.0[0x35168079d1]
      /lib64/libc.so.6(clone+0x6d)[0x35164e8b6d]

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            Frank_VID Frank Maas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.