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

Server crashes in Item_func_to_date::fix_length_and_dec upon using an invalid argument

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • N/A
    • 12.3
    • Server
    • None

    Description

      CREATE TABLE t (c GEOMETRYCOLLECTION);
      SELECT TO_DATE(c,'YYYY-MM-DD') FROM t;
      DROP TABLE t;
      

      bb-12.3-MDEV-19683-to_date 98b01265df03446ce9a861e044e3cde19225afe4

      #3  <signal handler called>
      #4  0x0000557524066d68 in Item_func_to_date::fix_length_and_dec (this=0x7f810c018930, thd=0x7f810c000dc8) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/item_timefunc.cc:4835
      #5  0x0000557523ed810c in Item_func::fix_fields (this=0x7f810c018930, thd=0x7f810c000dc8, ref=0x7f810c018be8) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/item_func.cc:412
      #6  0x000055752333ed80 in Item::fix_fields_if_needed (this=0x7f810c018930, thd=0x7f810c000dc8, ref=0x7f810c018be8) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/item.h:1143
      #7  0x000055752333eddb in Item::fix_fields_if_needed_for_scalar (this=0x7f810c018930, thd=0x7f810c000dc8, ref=0x7f810c018be8) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/item.h:1152
      #8  0x00005575234460b5 in setup_fields (thd=0x7f810c000dc8, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x7f810c01a170, pre_fix=0x7f810c018548, allow_sum_func=true, where=THD_WHERE::DEFAULT_WHERE) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_base.cc:8261
      #9  0x0000557523682514 in JOIN::prepare (this=0x7f810c019dc8, tables_init=0x7f810c018c78, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f810c018278, unit_arg=0x7f810c0053e8) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_select.cc:1603
      #10 0x000055752369c936 in mysql_select (thd=0x7f810c000dc8, tables=0x7f810c018c78, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x7f810c019da0, unit=0x7f810c0053e8, select_lex=0x7f810c018278) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_select.cc:5425
      #11 0x000055752367aae6 in handle_select (thd=0x7f810c000dc8, lex=0x7f810c005308, result=0x7f810c019da0, setup_tables_done_option=0) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_select.cc:636
      #12 0x00005575235c5c08 in execute_sqlcom_select (thd=0x7f810c000dc8, all_tables=0x7f810c018c78) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_parse.cc:6172
      #13 0x00005575235b37b4 in mysql_execute_command (thd=0x7f810c000dc8, is_called_from_prepared_stmt=false) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_parse.cc:3951
      #14 0x00005575235cf3ff in mysql_parse (thd=0x7f810c000dc8, rawbuf=0x7f810c0181d0 "SELECT TO_DATE(c,'YYYY-MM-DD') FROM t", length=37, parser_state=0x7f811e95d2c0) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_parse.cc:7895
      #15 0x00005575235a5f02 in dispatch_command (command=COM_QUERY, thd=0x7f810c000dc8, packet=0x7f810c00c129 "SELECT TO_DATE(c,'YYYY-MM-DD') FROM t", packet_length=37, blocking=true) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_parse.cc:1878
      #16 0x00005575235a312f in do_command (thd=0x7f810c000dc8, blocking=true) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_parse.cc:1417
      #17 0x0000557523976d09 in do_handle_one_connection (connect=0x5575676bcdd8, put_in_cache=true) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_connect.cc:1503
      #18 0x0000557523976807 in handle_one_connection (arg=0x5575676c2568) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/sql/sql_connect.cc:1415
      #19 0x0000557524408627 in pfs_spawn_thread (arg=0x557567701328) at /data/bld/preview-12.3/bb-12.3-MDEV-19683-to_date/storage/perfschema/pfs.cc:2198
      #20 0x00007f81252a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #21 0x00007f812532885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.