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

Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date

    Details

      Description

      SELECT MAKETIME( '01', '01', LEAST( -100, NULL ) );
      

      10.4 bb970dda

      mysqld: /data/src/10.4/sql/item_timefunc.cc:2602: virtual bool Item_func_maketime::get_date(THD*, MYSQL_TIME*, date_mode_t): Assertion `sec.sec() <= 59' failed.
      190228 16:17:18 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fac750a6ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005586eb76441c in Item_func_maketime::get_date (this=0x7fac54015f90, thd=0x7fac54000b00, ltime=0x7fac701c4a98, fuzzydate=...) at /data/src/10.4/sql/item_timefunc.cc:2602
      #9  0x00005586eb536b1a in Item::get_time (this=0x7fac54015f90, thd=0x7fac54000b00, ltime=0x7fac701c4a98) at /data/src/10.4/sql/item.h:1699
      #10 0x00005586eb527cad in Type_handler::Item_send_time (this=0x5586ec9be500 <type_handler_time2>, item=0x7fac54015f90, protocol=0x7fac540010c8, buf=0x7fac701c4a90) at /data/src/10.4/sql/sql_type.cc:6748
      #11 0x00005586eb53393c in Type_handler_time_common::Item_send (this=0x5586ec9be500 <type_handler_time2>, item=0x7fac54015f90, protocol=0x7fac540010c8, buf=0x7fac701c4a90) at /data/src/10.4/sql/sql_type.h:5118
      #12 0x00005586eb202c86 in Item::send (this=0x7fac54015f90, protocol=0x7fac540010c8, buffer=0x7fac701c4a90) at /data/src/10.4/sql/item.h:1033
      #13 0x00005586eb1fd172 in Protocol::send_result_set_row (this=0x7fac540010c8, row_items=0x7fac54015818) at /data/src/10.4/sql/protocol.cc:1021
      #14 0x00005586eb2ac2aa in select_send::send_data (this=0x7fac54016988, items=...) at /data/src/10.4/sql/sql_class.cc:2992
      #15 0x00005586eb36b81b in JOIN::exec_inner (this=0x7fac540169b0) at /data/src/10.4/sql/sql_select.cc:4232
      #16 0x00005586eb36b136 in JOIN::exec (this=0x7fac540169b0) at /data/src/10.4/sql/sql_select.cc:4146
      #17 0x00005586eb36c7e8 in mysql_select (thd=0x7fac54000b00, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fac54016988, unit=0x7fac54004a18, select_lex=0x7fac540156d0) at /data/src/10.4/sql/sql_select.cc:4578
      #18 0x00005586eb35cd96 in handle_select (thd=0x7fac54000b00, lex=0x7fac54004950, result=0x7fac54016988, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:424
      #19 0x00005586eb326209 in execute_sqlcom_select (thd=0x7fac54000b00, all_tables=0x0) at /data/src/10.4/sql/sql_parse.cc:6604
      #20 0x00005586eb31b4b0 in mysql_execute_command (thd=0x7fac54000b00) at /data/src/10.4/sql/sql_parse.cc:3841
      #21 0x00005586eb32a158 in mysql_parse (thd=0x7fac54000b00, rawbuf=0x7fac54015600 "SELECT MAKETIME( '01', '01', LEAST( -100, NULL ) )", length=50, parser_state=0x7fac701c6180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #22 0x00005586eb315846 in dispatch_command (command=COM_QUERY, thd=0x7fac54000b00, packet=0x7fac5400a761 "", packet_length=50, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #23 0x00005586eb31401a in do_command (thd=0x7fac54000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #24 0x00005586eb48dc07 in do_handle_one_connection (connect=0x5586eefcebb0) at /data/src/10.4/sql/sql_connect.cc:1399
      #25 0x00005586eb48d978 in handle_one_connection (arg=0x5586eefcebb0) at /data/src/10.4/sql/sql_connect.cc:1302
      #26 0x00005586eb984951 in pfs_spawn_thread (arg=0x5586ef0c1220) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #27 0x00007fac76d7d494 in start_thread (arg=0x7fac701c7700) at pthread_create.c:333
      #28 0x00007fac7516393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.3.

      Slightly different query, different stack trace, same assertion failure:

      SELECT CONCAT( MAKETIME( '01', '01', LEAST( -100, NULL ) ) );
      

      10.4 bb970dda

      mysqld: /data/src/10.4/sql/item_timefunc.cc:2602: virtual bool Item_func_maketime::get_date(THD*, MYSQL_TIME*, date_mode_t): Assertion `sec.sec() <= 59' failed.
      190228 16:25:22 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f5d27c2bee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005591eafc941c in Item_func_maketime::get_date (this=0x7f5d10015fa8, thd=0x7f5d10000b00, ltime=0x7f5d21da38d0, fuzzydate=...) at /data/src/10.4/sql/item_timefunc.cc:2602
      #9  0x00005591ead7e339 in Time::make_from_item (this=0x7f5d21da38d0, thd=0x7f5d10000b00, warn=0x7f5d21da384c, item=0x7f5d10015fa8, opt=...) at /data/src/10.4/sql/sql_type.cc:592
      #10 0x00005591eaa672c5 in Time::Time (this=0x7f5d21da38d0, thd=0x7f5d10000b00, item=0x7f5d10015fa8, opt=...) at /data/src/10.4/sql/sql_type.h:1486
      #11 0x00005591ead94ae3 in Time::Time (this=0x7f5d21da38d0, thd=0x7f5d10000b00, item=0x7f5d10015fa8) at /data/src/10.4/sql/sql_type.h:1489
      #12 0x00005591ead94aa1 in Time::Time (this=0x7f5d21da38d0, item=0x7f5d10015fa8) at /data/src/10.4/sql/sql_type.h:1481
      #13 0x00005591ead9d389 in Item_timefunc::val_str (this=0x7f5d10015fa8, to=0x7f5d21da3ac0) at /data/src/10.4/sql/item_timefunc.h:616
      #14 0x00005591eaf7cbfd in Item_func_concat::val_str (this=0x7f5d10016130, str=0x7f5d21da3ac0) at /data/src/10.4/sql/item_strfunc.cc:602
      #15 0x00005591ead8c5c5 in Type_handler::Item_send_str (this=0x5591ec223538 <type_handler_varchar>, item=0x7f5d10016130, protocol=0x7f5d100010c8, buf=0x7f5d21da3a90) at /data/src/10.4/sql/sql_type.cc:6642
      #16 0x00005591ead97cd8 in Type_handler_string_result::Item_send (this=0x5591ec223538 <type_handler_varchar>, item=0x7f5d10016130, protocol=0x7f5d100010c8, buf=0x7f5d21da3a90) at /data/src/10.4/sql/sql_type.h:4585
      #17 0x00005591eaa67c86 in Item::send (this=0x7f5d10016130, protocol=0x7f5d100010c8, buffer=0x7f5d21da3a90) at /data/src/10.4/sql/item.h:1033
      #18 0x00005591eaa62172 in Protocol::send_result_set_row (this=0x7f5d100010c8, row_items=0x7f5d10015828) at /data/src/10.4/sql/protocol.cc:1021
      #19 0x00005591eab112aa in select_send::send_data (this=0x7f5d10016b48, items=...) at /data/src/10.4/sql/sql_class.cc:2992
      #20 0x00005591eabd081b in JOIN::exec_inner (this=0x7f5d10016b70) at /data/src/10.4/sql/sql_select.cc:4232
      #21 0x00005591eabd0136 in JOIN::exec (this=0x7f5d10016b70) at /data/src/10.4/sql/sql_select.cc:4146
      #22 0x00005591eabd17e8 in mysql_select (thd=0x7f5d10000b00, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f5d10016b48, unit=0x7f5d10004a18, select_lex=0x7f5d100156e0) at /data/src/10.4/sql/sql_select.cc:4578
      #23 0x00005591eabc1d96 in handle_select (thd=0x7f5d10000b00, lex=0x7f5d10004950, result=0x7f5d10016b48, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:424
      #24 0x00005591eab8b209 in execute_sqlcom_select (thd=0x7f5d10000b00, all_tables=0x0) at /data/src/10.4/sql/sql_parse.cc:6604
      #25 0x00005591eab804b0 in mysql_execute_command (thd=0x7f5d10000b00) at /data/src/10.4/sql/sql_parse.cc:3841
      #26 0x00005591eab8f158 in mysql_parse (thd=0x7f5d10000b00, rawbuf=0x7f5d10015600 "SELECT CONCAT( MAKETIME( '01', '01', LEAST( -100, NULL ) ) )", length=60, parser_state=0x7f5d21da5180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #27 0x00005591eab7a846 in dispatch_command (command=COM_QUERY, thd=0x7f5d10000b00, packet=0x7f5d1000a761 "", packet_length=60, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #28 0x00005591eab7901a in do_command (thd=0x7f5d10000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #29 0x00005591eacf2c07 in do_handle_one_connection (connect=0x5591ee87dbb0) at /data/src/10.4/sql/sql_connect.cc:1399
      #30 0x00005591eacf2978 in handle_one_connection (arg=0x5591ee87dbb0) at /data/src/10.4/sql/sql_connect.cc:1302
      #31 0x00005591eb1e9951 in pfs_spawn_thread (arg=0x5591ee970220) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #32 0x00007f5d29902494 in start_thread (arg=0x7f5d21da6700) at pthread_create.c:333
      #33 0x00007f5d27ce893f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Activity

            People

            • Assignee:
              bar Alexander Barkov
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: