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

Mariadb crash with join and LAST_INSERT_ID

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.6, 10.11, 11.4, 11.8, 12.3, 12.2.2
    • 10.11, 11.4, 11.8, 12.3
    • Optimizer
    • None

    Description

       
      DROP TABLE IF EXISTS table1;
      CREATE TABLE IF NOT EXISTS table1 (
          price DOUBLE,                                
          duration TIME
      );
       
      INSERT INTO table1 (price, duration)
      VALUES (99.99, '01:30:00');
       
      INSERT INTO table1 (price, duration)
      VALUES (150.75, '02:00:00');
       
      INSERT INTO table1 (price, duration)
      VALUES (80.50, '01:00:00');
       
      INSERT INTO table1 (price, duration)
      VALUES (120.60, '01:15:00');
       
      INSERT INTO table1 (price, duration)
      VALUES (200.25, '01:45:00');
       
       
      SELECT 1 AS c0 FROM table1 AS tom0 
      GROUP BY tom0.price , tom0.duration 
      HAVING EXISTS ( 
          SELECT    1
          FROM ( ( SELECT 1 FROM ( table2 AS tom1 CROSS JOIN table1 AS tom2 ) ) AS tom3 NATURAL JOIN table1 AS tom4 ) 
          EXCEPT SELECT 1 
          FROM ( ( SELECT 1 AS c11 FROM table2 AS tom5 WHERE  LAST_INSERT_ID( 1 )  ) AS tom6 JOIN table1 AS tom9 ON NOW() ) 
       
           ) ;
      
      

      crash logs:
       
       
       
      ersion: '12.2.2-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
      260317 14:32:52 [ERROR] mariadbd got signal 11 ;
      Sorry, we probably made a mistake, and this is a bug.
       
       
       
      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.
       
      Please include the information from the server start above, to the end of the
      information below.
       
      Server version: 12.2.2-MariaDB-ubu2404 source revision: d26a6f44c1f2119377e79a9540886c6d8c01472f
       
      The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/
      contains instructions to obtain a better version of the backtrace below.
      Following these instructions will help MariaDB developers provide a fix quicker.
       
      Attempting backtrace. Include this in the bug report.
      (note: Retrieving this information may fail)
       
      Thread pointer: 0x7f786801d2d8
      stack_bottom = 0x7f7884d55000 thread_stack 0x49000
      Printing to addr2line failed
      mariadbd(my_print_stacktrace+0x30)[0x55e28de4e960]
      mariadbd(handle_fatal_signal+0x1f3)[0x55e28d99a843]
      /lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x7f789cb5d330]
      mariadbd(_Z16sub_select_cacheP4JOINP13st_join_tableb+0x1e)[0x55e28d6f667e]
      mariadbd(+0x91986e)[0x55e28d6f486e]
      mariadbd(_Z10sub_selectP4JOINP13st_join_tableb+0x225)[0x55e28d6f4bd5]
      mariadbd(_ZN4JOIN10exec_innerEv+0xd11)[0x55e28d6c0e11]
      mariadbd(_ZN4JOIN4execEv+0x37)[0x55e28d6c1187]
      mariadbd(_ZN18st_select_lex_unit10exec_innerEv+0x56c)[0x55e28d798f2c]
      mariadbd(_ZN22subselect_union_engine4execEv+0xc8)[0x55e28da895c8]
      mariadbd(_ZN14Item_subselect4execEv+0x4d)[0x55e28da76b4d]
      mariadbd(_ZN21Item_exists_subselect8val_boolEv+0x24)[0x55e28da75184]
      mariadbd(_Z8filesortP3THDP5TABLEP8FilesortP16Filesort_trackerP4JOINy+0x1bb9)[0x55e28d999d39]
      mariadbd(_Z17create_sort_indexP3THDP4JOINP13st_join_tableP8Filesort+0xf2)[0x55e28d6ff892]
      mariadbd(_Z21join_init_read_recordP13st_join_table+0x106)[0x55e28d6f6986]
      mariadbd(_ZN7AGGR_OP8end_sendEv+0x143)[0x55e28d708273]
      mariadbd(_Z24sub_select_postjoin_aggrP4JOINP13st_join_tableb+0x8b)[0x55e28d6f519b]
      mariadbd(_ZN4JOIN10exec_innerEv+0xbe7)[0x55e28d6c0ce7]
      mariadbd(_ZN4JOIN4execEv+0x37)[0x55e28d6c1187]
      mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x132)[0x55e28d6c9d22]
      mariadbd(_Z13handle_selectP3THDP3LEXP13select_resulty+0x17a)[0x55e28d6ca82a]
      mariadbd(+0x891ea1)[0x55e28d66cea1]
      mariadbd(_Z21mysql_execute_commandP3THDb+0x37ca)[0x55e28d677e1a]
      mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x19a)[0x55e28d682aea]
      mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x1304)[0x55e28d672b14]
      mariadbd(_Z10do_commandP3THDb+0x199)[0x55e28d673de9]
      mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x6b3)[0x55e28d817d83]
      mariadbd(handle_one_connection+0x71)[0x55e28d800161]
      mariadbd(+0xdfa91e)[0x55e28dbd591e]
      /lib/x86_64-linux-gnu/libc.so.6(+0x9caa4)[0x7f789cbb4aa4]
      /lib/x86_64-linux-gnu/libc.so.6(__clone+0x44)[0x7f789cc41a64]
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              ammmkilo ammmkilo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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