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

LP:992722 - Server crashes in get_datetime_value

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.3.6
    • Fix Version/s: 5.3.7
    • Component/s: None
    • Labels:
      None

      Description

      https://bugs.launchpad.net/maria/+bug/992722

      Simplified version:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 ( a DATE );
      SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012-04-25','2012-04-26');

      Reproducible on the current maria-5.3 tree (revno 3510).
      Reproducible with the default optimizer_switch, as well as with all OFF values.
      Could not reproduce on maria-5.1, maria-5.2, maria-5.5, mysql-5.5, mysql-trunk.

      #3 <signal handler called>
      #4 0x00000000006388fb in get_datetime_value (thd=0x1c2b9a8, item_arg=0x7fb02c5d60f0,
          cache_arg=0x0, warn_item=0x0, is_null=0x7fb02c5d60ef) at item_cmpfunc.cc:877
      #5 0x00000000006413f2 in in_datetime::set (this=0x1cde590, pos=0, item=0x1cb16e8)
          at item_cmpfunc.cc:3455
      #6 0x0000000000642fa8 in Item_func_in::fix_length_and_dec (this=0x1cb18a0)
          at item_cmpfunc.cc:3958
      #7 0x000000000061cc1d in Item_func::fix_fields (this=0x1cb18a0, thd=0x1c2b9a8,
          ref=0x1cb1e60) at item_func.cc:207
      #8 0x00000000006424cb in Item_func_in::fix_fields (this=0x1cb18a0, thd=0x1c2b9a8,
          ref=0x1cb1e60) at item_cmpfunc.cc:3776
      #9 0x000000000075b1c1 in setup_conds (thd=0x1c2b9a8, tables=0x1cb0398, leaves=...,
          conds=0x1cb1e60) at sql_base.cc:8502
      #10 0x00000000007ad527 in setup_without_group (thd=0x1c2b9a8,
          ref_pointer_array=0x1cb20a0, tables=0x1cb0398, leaves=..., fields=...,
          all_fields=..., conds=0x1cb1e60, order=0x0, group=0x0,
          hidden_group_fields=0x1cb1d57) at sql_select.cc:519
      #11 0x0000000000771447 in JOIN::prepare (this=0x1cb1a88, rref_pointer_array=0x1c2e5e8,
          tables_init=0x1cb0398, wild_num=1, conds_init=0x1cb18a0, og_num=0, order_init=0x0,
          group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x1c2e398,
          unit_arg=0x1c2de90) at sql_select.cc:667
      #12 0x0000000000779b83 in mysql_select (thd=0x1c2b9a8, rref_pointer_array=0x1c2e5e8,
          tables=0x1cb0398, wild_num=1, fields=..., conds=0x1cb18a0, og_num=0, order=0x0,
          group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x1cb1a68,
          unit=0x1c2de90, select_lex=0x1c2e398) at sql_select.cc:2932
      #13 0x0000000000770801 in handle_select (thd=0x1c2b9a8, lex=0x1c2ddf0,
          result=0x1cb1a68, setup_tables_done_option=0) at sql_select.cc:285
      #14 0x00000000006feecc in execute_sqlcom_select (thd=0x1c2b9a8, all_tables=0x1cb0398)
          at sql_parse.cc:5151
      #15 0x00000000006f5f89 in mysql_execute_command (thd=0x1c2b9a8) at sql_parse.cc:2284
      #16 0x00000000007018a7 in mysql_parse (thd=0x1c2b9a8,
          rawbuf=0x1cb0140 "SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012-04-25','2012-04-26')", length=74, found_semicolon=0x7fb02c5d7c98) at sql_parse.cc:6152
      #17 0x00000000006f3738 in dispatch_command (command=COM_QUERY, thd=0x1c2b9a8,
          packet=0x1ca6c89 "SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012-04-25','2012-04-26')", packet_length=74) at sql_parse.cc:1228
      #18 0x00000000006f2a6c in do_command (thd=0x1c2b9a8) at sql_parse.cc:923
      #19 0x00000000006ef8ba in handle_one_connection (arg=0x1c2b9a8) at sql_connect.cc:1218
      #20 0x00007fb035d75a4f in start_thread () from /lib64/libpthread.so.0
      #21 0x00007fb03515f82d in clone () from /lib64/libc.so.6

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: