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

Assertion `m_year <= 9999' failed in Year::Year upon bad argument to MAKEDATE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.0
    • Temporal Types
    • None

    Description

      SELECT MAKEDATE( 18446744073709551615, 1 );
      

      mysqld: /data/src/10.4/sql/sql_type.cc:341: Year::Year(longlong, bool, uint): Assertion `m_year <= 9999' failed.
      180818 16:26:30 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f7daea72ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000056008362a866 in Year::Year (this=0x7f7da8c17850, value=-1, unsigned_flag=true, length=4) at /data/src/10.4/sql/sql_type.cc:341
      #9  0x000056008362a91e in VYear::VYear (this=0x7f7da8c178b0, item=0x7f7d980154d8) at /data/src/10.4/sql/sql_type.cc:353
      #10 0x000056008383bf7b in Item_func_makedate::get_date (this=0x7f7d98015680, ltime=0x7f7da8c179e8, fuzzy_date=0) at /data/src/10.4/sql/item_timefunc.cc:2533
      #11 0x0000560083636feb in Type_handler::Item_send_date (this=0x560084bee558 <type_handler_newdate>, item=0x7f7d98015680, protocol=0x7f7d980010b8, buf=0x7f7da8c179e0) at /data/src/10.4/sql/sql_type.cc:5954
      #12 0x0000560083640678 in Type_handler_temporal_with_date::Item_send (this=0x560084bee558 <type_handler_newdate>, item=0x7f7d98015680, protocol=0x7f7d980010b8, buf=0x7f7da8c179e0) at /data/src/10.4/sql/sql_type.h:3840
      #13 0x000056008333dce6 in Item::send (this=0x7f7d98015680, protocol=0x7f7d980010b8, buffer=0x7f7da8c179e0) at /data/src/10.4/sql/item.h:1017
      #14 0x0000560083338d72 in Protocol::send_result_set_row (this=0x7f7d980010b8, row_items=0x7f7d980151b0) at /data/src/10.4/sql/protocol.cc:986
      #15 0x00005600833e0488 in select_send::send_data (this=0x7f7d98015fe8, items=...) at /data/src/10.4/sql/sql_class.cc:2932
      #16 0x0000560083493d9b in JOIN::exec_inner (this=0x7f7d98016008) at /data/src/10.4/sql/sql_select.cc:3958
      #17 0x00005600834937fe in JOIN::exec (this=0x7f7d98016008) at /data/src/10.4/sql/sql_select.cc:3877
      #18 0x0000560083494a8d in mysql_select (thd=0x7f7d98000b00, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f7d98015fe8, unit=0x7f7d980049a8, select_lex=0x7f7d98015080) at /data/src/10.4/sql/sql_select.cc:4282
      #19 0x000056008348637a in handle_select (thd=0x7f7d98000b00, lex=0x7f7d980048e0, result=0x7f7d98015fe8, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:382
      #20 0x0000560083450ce8 in execute_sqlcom_select (thd=0x7f7d98000b00, all_tables=0x0) at /data/src/10.4/sql/sql_parse.cc:6549
      #21 0x0000560083447414 in mysql_execute_command (thd=0x7f7d98000b00) at /data/src/10.4/sql/sql_parse.cc:3771
      #22 0x0000560083454aae in mysql_parse (thd=0x7f7d98000b00, rawbuf=0x7f7d98014fc0 "SELECT MAKEDATE( 18446744073709551615, 1 )", length=42, parser_state=0x7f7da8c195f0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8078
      #23 0x0000560083441eb6 in dispatch_command (command=COM_QUERY, thd=0x7f7d98000b00, packet=0x7f7d98092ae1 "", packet_length=42, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1850
      #24 0x00005600834408da in do_command (thd=0x7f7d98000b00) at /data/src/10.4/sql/sql_parse.cc:1395
      #25 0x00005600835a7b91 in do_handle_one_connection (connect=0x560086a214d0) at /data/src/10.4/sql/sql_connect.cc:1402
      #26 0x00005600835a7915 in handle_one_connection (arg=0x560086a214d0) at /data/src/10.4/sql/sql_connect.cc:1308
      #27 0x0000560083a436b7 in pfs_spawn_thread (arg=0x560086ab69f0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #28 0x00007f7db0749494 in start_thread (arg=0x7f7da8c1a700) at pthread_create.c:333
      #29 0x00007f7daeb2f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.3.
      No visible problems on a non-debug build, it returns NULL as could be expected.

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.