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

Assertion `is_null() >= item->null_value' failed in Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null on EXECUTE

    XMLWordPrintable

Details

    Description

      PREPARE s FROM 'SELECT CONCAT (UNIX_TIMESTAMP(?))';
      EXECUTE s USING CAST('00000000-0000-0000-0000-000000000001' AS UUID);
      EXECUTE s USING @a1;
      

      Leads to:

      CS 11.2.6 12a91b57e27b979819924cf89614e6e51f24b37b (Debug)

      mariadbd: /test/11.2_dbg/sql/sql_type.cc:9341: Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null(THD*, Item*, bool): Assertion `is_null() >= item->null_value' failed.
      

      CS 11.2.6 12a91b57e27b979819924cf89614e6e51f24b37b (Debug)

      Core was generated by `/test/MD141024-mariadb-11.2.6-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 2280777)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x0000153b6b04526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x0000153b6b0288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x0000153b6b02881b in __assert_fail_base (fmt=0x153b6b1d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x555a9ed93e49 "is_null() >= item->null_value", file=file@entry=0x555a9ec0d978 "/test/11.2_dbg/sql/sql_type.cc", line=line@entry=9341, function=function@entry=0x555a9ec11e48 "Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null(THD*, Item*, bool)")at ./assert/assert.c:94
      #6  0x0000153b6b03b507 in __assert_fail (assertion=0x555a9ed93e49 "is_null() >= item->null_value", file=0x555a9ec0d978 "/test/11.2_dbg/sql/sql_type.cc", line=9341, function=0x555a9ec11e48 "Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null(THD*, Item*, bool)") at ./assert/assert.c:103
      #7  0x0000555a9e104031 in Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null (this=this@entry=0x153b689fc5a0, thd=0x153b0c000d58, item=item@entry=0x153b0c01dea8, conv=conv@entry=true)at /test/11.2_dbg/sql/sql_type.cc:9341
      #8  0x0000555a9e2ff022 in Item_func_unix_timestamp::get_timestamp_value (this=0x153b0c01e090, seconds=seconds@entry=0x153b689fc618, second_part=second_part@entry=0x153b689fc610)at /test/11.2_dbg/sql/item_timefunc.cc:1224
      #9  0x0000555a9e2ff1ae in Item_func_unix_timestamp::int_op (this=<optimized out>) at /test/11.2_dbg/sql/item_timefunc.cc:1241
      #10 0x0000555a9e25d1b4 in Item_func_hybrid_field_type::val_str_from_int_op (this=0x153b0c01e090, str=0x153b689fc790)at /test/11.2_dbg/sql/item_func.cc:839
      #11 0x0000555a9e0e97d1 in Type_handler_int_result::Item_func_hybrid_field_type_val_str (this=<optimized out>, item=<optimized out>, str=<optimized out>)at /test/11.2_dbg/sql/sql_type.cc:5547
      #12 0x0000555a9e227a81 in Item_func_hybrid_field_type::val_str (this=0x153b0c01e090, str=0x153b689fc790)at /test/11.2_dbg/sql/item_func.h:992
      #13 0x0000555a9e2a2c63 in Item_func_concat::val_str (this=0x153b0c01e1a8, str=0x153b689fc790) at /test/11.2_dbg/sql/item_strfunc.cc:682
      #14 0x0000555a9e102fc8 in Type_handler::Item_send_str (this=<optimized out>, item=0x153b0c01e1a8, protocol=0x153b0c001370, buf=<optimized out>)at /test/11.2_dbg/sql/sql_type.cc:7657
      #15 0x0000555a9e01c019 in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/11.2_dbg/sql/sql_type.h:5534
      #16 0x0000555a9dd91ecc in Item::send (this=0x153b0c01e1a8, protocol=0x153b0c001370, buffer=0x153b689fc760)at /test/11.2_dbg/sql/item.h:1255
      #17 0x0000555a9ddd0cbf in Protocol::send_result_set_row (this=this@entry=0x153b0c001370, row_items=row_items@entry=0x153b0c01dc80)at /test/11.2_dbg/sql/protocol.cc:1333
      #18 0x0000555a9de5447d in select_send::send_data (this=0x153b0c01eb38, items=@0x153b0c01dc80: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b0c01e278, last = 0x153b0c01e278, elements = 1}, <No data fields>})at /test/11.2_dbg/sql/sql_class.cc:3194
      #19 0x0000555a9df4f3d9 in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>)at /test/11.2_dbg/sql/sql_class.h:5956
      #20 JOIN::exec_inner (this=this@entry=0x153b0c013868)at /test/11.2_dbg/sql/sql_select.cc:4909
      #21 0x0000555a9df502d6 in JOIN::exec (this=this@entry=0x153b0c013868)at /test/11.2_dbg/sql/sql_select.cc:4820
      #22 0x0000555a9df4e02f in mysql_select (thd=thd@entry=0x153b0c000d58, tables=0x0, fields=@0x153b0c01dc80: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b0c01e278, last = 0x153b0c01e278, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201187781376, result=0x153b0c01eb38, unit=0x153b0c01bcb8, select_lex=0x153b0c01d9c8) at /test/11.2_dbg/sql/sql_select.cc:5358
      #23 0x0000555a9df4e858 in handle_select (thd=thd@entry=0x153b0c000d58, lex=lex@entry=0x153b0c01bbd8, result=result@entry=0x153b0c01eb38, setup_tables_done_option=setup_tables_done_option@entry=0)at /test/11.2_dbg/sql/sql_select.cc:642
      #24 0x0000555a9deac751 in execute_sqlcom_select (thd=thd@entry=0x153b0c000d58, all_tables=0x0) at /test/11.2_dbg/sql/sql_parse.cc:6177
      #25 0x0000555a9deb85bc in mysql_execute_command (thd=0x153b0c000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=true)at /test/11.2_dbg/sql/sql_parse.cc:3984
      #26 0x0000555a9dee73cd in Prepared_statement::execute (this=this@entry=0x153b0c019718, expanded_query=expanded_query@entry=0x153b689fdc70, open_cursor=open_cursor@entry=false)at /test/11.2_dbg/sql/sql_prepare.cc:5077
      #27 0x0000555a9dee7783 in Prepared_statement::execute_loop (this=this@entry=0x153b0c019718, expanded_query=expanded_query@entry=0x153b689fdc70, open_cursor=open_cursor@entry=false, packet=packet@entry=0x0, packet_end=packet_end@entry=0x0) at /test/11.2_dbg/sql/sql_prepare.cc:4461
      #28 0x0000555a9dee7c44 in mysql_sql_stmt_execute (thd=thd@entry=0x153b0c000d58)at /test/11.2_dbg/sql/sql_prepare.cc:3480
      #29 0x0000555a9deb8623 in mysql_execute_command (thd=thd@entry=0x153b0c000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.2_dbg/sql/sql_parse.cc:4000
      #30 0x0000555a9debf2ce in mysql_parse (thd=thd@entry=0x153b0c000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153b689fe2a0)at /test/11.2_dbg/sql/sql_parse.cc:7938
      #31 0x0000555a9dec1786 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153b0c000d58, packet=packet@entry=0x153b0c00b319 "", packet_length=packet_length@entry=19, blocking=blocking@entry=true)at /test/11.2_dbg/sql/sql_class.h:248
      #32 0x0000555a9dec39c2 in do_command (thd=0x153b0c000d58, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1407
      #33 0x0000555a9e030fe7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555aa0caa478, put_in_cache=put_in_cache@entry=true)at /test/11.2_dbg/sql/sql_connect.cc:1439
      #34 0x0000555a9e0312ef in handle_one_connection (arg=arg@entry=0x555aa0caa478)at /test/11.2_dbg/sql/sql_connect.cc:1341
      #35 0x0000555a9e478f14 in pfs_spawn_thread (arg=0x555aa0bfd198)at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
      #36 0x0000153b6b09ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #37 0x0000153b6b129c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.11.10 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.6.2 (dbg), 11.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt), 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.6.2 (opt), 11.7.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              Roel Roel Van de Paar
              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.