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

Assertion `(((core_null) + 7) >> 3) == oindex.n_core_null_bytes || !not_redundant()' failed

    XMLWordPrintable

Details

    Description

      CREATE TABLE t ( a INTEGER, b BLOB GENERATED ALWAYS AS (a) VIRTUAL, c INTEGER )engine=innodb;
      ALTER TABLE t DISCARD TABLESPACE;
      ALTER TABLE t DROP COLUMN b, algorithm=instant;
      ALTER TABLE t DROP COLUMN c; 
      

      Leads to:

      10.10.0 38c362cfb3f18e1f02021407679640c00cfd4d01 (Debug)

      mysqld: /test/mtest/10.10_dbg/storage/innobase/handler/handler0alter.cc:378: void dict_table_t::prepare_instant(const dict_table_t&, const ulint*, unsigned int&): Assertion `(((core_null) + 7) >> 3) == oindex.n_core_null_bytes || !not_redundant()' failed.
      

      10.10.0 38c362cfb3f18e1f02021407679640c00cfd4d01 (Debug)

      Core was generated by `/test/mtest/GAL_MD170622-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --defaults'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14811091e700 (LWP 3562199))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055994aa7a587 in my_write_core (sig=sig@entry=6) at /test/mtest/10.10_dbg/mysys/stacktrace.c:424
      #2  0x000055994a32fdb5 in handle_fatal_signal (sig=6) at /test/mtest/10.10_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014814692b859 in __GI_abort () at abort.c:79
      #6  0x000014814692b729 in __assert_fail_base (fmt=0x148146ac1588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55994ae5b6d0 "(((core_null) + 7) >> 3) == oindex.n_core_null_bytes || !not_redundant()", file=0x55994ae543c0 "/test/mtest/10.10_dbg/storage/innobase/handler/handler0alter.cc", line=378, function=<optimized out>) at assert.c:92
      #7  0x000014814693cf36 in __GI___assert_fail (assertion=assertion@entry=0x55994ae5b6d0 "(((core_null) + 7) >> 3) == oindex.n_core_null_bytes || !not_redundant()", file=file@entry=0x55994ae543c0 "/test/mtest/10.10_dbg/storage/innobase/handler/handler0alter.cc", line=line@entry=378, function=function@entry=0x55994ae5b3f0 "void dict_table_t::prepare_instant(const dict_table_t&, const ulint*, unsigned int&)") at assert.c:101
      #8  0x000055994a699fc5 in dict_table_t::prepare_instant (this=<optimized out>, old=Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer': 
      Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer': 
      @0x1480d802bbb0: {id = 22, id_hash = 0x0, name = {m_name = 0x1480d803a590 "test/t", static part_suffix = "#P#"}, name_hash = 0x0, heap = 0x55994d5e5920, data_dir_path = 0x0, space = 0x0, space_id = 8, flags = 33, flags2 = 112, skip_alter_undo = 0, file_unreadable = 1, cached = 1, n_def = 5, n_cols = 5, n_t_cols = 5, n_t_def = 5, n_v_def = 0, n_v_cols = 0, persistent_autoinc = 0, can_be_evicted = 1, corrupted = 0, drop_aborted = 0, cols = 0x1480d802bed0, v_cols = 0x1480d802bf70, s_cols = 0x0, instant = 0x0, col_names = 0x1480d802bfc8 "a", v_col_names = 0x0, vers_start = 0, vers_end = 0, is_system_db = false, dict_frm_mismatch = DICT_FRM_CONSISTENT, fts_doc_id_index = 0x0, indexes = {count = 1, start = 0x1480d802d5d0, end = 0x1480d802d5d0, node = &dict_index_t::indexes, init = 51966}, freed_indexes = {count = 0, start = 0x0, end = 0x0, node = &dict_index_t::indexes, init = 51966}, foreign_list = {count = 0, start = 0x0, end = 0x0, node = &dict_foreign_t::heap, init = 0}, referenced_list = {count = 0, start = 0x0, end = 0x0, node = &dict_foreign_t::heap, init = 0}, table_LRU = {prev = 0x0, next = 0x1480dc0123c0}, fk_max_recusive_level = 0 '\000', def_trx_id = 35, bulk_trx_id = {m = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, mdl_name = {m_name = 0x1480d803a590 "test/t", static part_suffix = "#P#"}, foreign_set = std::set with 0 elements, referenced_set = std::set with 0 elements, stat_initialized = 1, stats_last_recalc = 0, stat_persistent = 0, stats_auto_recalc = 0, stats_sample_pages = 0, stat_n_rows = 0, stat_clustered_index_size = 0, stat_sum_of_other_index_sizes = 0, stat_modified_counter = 0, stats_error_printed = false, autoinc_lock = 0x1480d802bf70, autoinc_mutex = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static HOLDER = 2147483648}, lock_mutex = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static HOLDER = 2147483648}, lock_mutex_owner = {m = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, autoinc = 0, autoinc_trx = {m = {_M_b = {_M_p = 0x0}}}, n_waiting_or_granted_auto_inc_locks = 0, n_lock_x_or_s = 0, fts = 0x0, quiesce = QUIESCE_NONE, n_rec_locks = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}}, n_ref_count = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, locks = {count = 0, start = 0x0, end = 0x0, node = &lock_table_t::locks, init = 51966}, update_time = {m = {<std::__atomic_base<long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, query_cache_inv_trx_id = {m = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, magic_n = 76333786, vc_templ = 0x0}, col_map=0x1480d8063900, first_alter_pos=@0x1480d80152d0: 2) at /test/mtest/10.10_dbg/storage/innobase/include/dict0mem.h:1838
      #9  0x000055994a68081d in ha_innobase_inplace_ctx::prepare_instant (this=0x1480d8015170) at /test/mtest/10.10_dbg/storage/innobase/handler/handler0alter.cc:1157
      #10 prepare_inplace_alter_table_dict (ha_alter_info=ha_alter_info@entry=0x148110919ee0, altered_table=altered_table@entry=0x148110919fa0, old_table=<optimized out>, table_name=<optimized out>, flags=<optimized out>, flags2=<optimized out>, fts_doc_id_col=<optimized out>, add_fts_doc_id=<optimized out>, add_fts_doc_id_idx=<optimized out>) at /test/mtest/10.10_dbg/storage/innobase/handler/handler0alter.cc:6844
      #11 0x000055994a6876c5 in ha_innobase::prepare_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>) at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.h:700
      #12 0x000055994a33c53f in handler::ha_prepare_inplace_alter_table (this=0x1480d805ec50, altered_table=altered_table@entry=0x148110919fa0, ha_alter_info=ha_alter_info@entry=0x148110919ee0) at /test/mtest/10.10_dbg/sql/handler.cc:5200
      #13 0x000055994a11901d in mysql_inplace_alter_table (thd=thd@entry=0x1480d8000db8, table_list=0x1480d8013e30, table=table@entry=0x1480d8045538, altered_table=altered_table@entry=0x148110919fa0, ha_alter_info=ha_alter_info@entry=0x148110919ee0, target_mdl_request=target_mdl_request@entry=0x14811091a910, ddl_log_state=0x148110919ec0, trigger_param=0x14811091a370, alter_ctx=0x14811091b490, partial_alter=@0x148110919e4f: false, start_alter_id=@0x148110919e58: 0, if_exists=false) at /test/mtest/10.10_dbg/sql/sql_table.cc:8054
      #14 0x000055994a12fc95 in mysql_alter_table (thd=thd@entry=0x1480d8000db8, new_db=new_db@entry=0x1480d8005878, new_name=new_name@entry=0x1480d8005c88, create_info=create_info@entry=0x14811091c270, table_list=<optimized out>, table_list@entry=0x1480d8013e30, alter_info=alter_info@entry=0x14811091c180, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/mtest/10.10_dbg/sql/sql_table.cc:11165
      #15 0x000055994a1b4d43 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x1480d8000db8) at /test/mtest/10.10_dbg/sql/structs.h:569
      #16 0x000055994a051a10 in mysql_execute_command (thd=thd@entry=0x1480d8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/mtest/10.10_dbg/sql/sql_parse.cc:5996
      #17 0x000055994a039fc6 in mysql_parse (thd=thd@entry=0x1480d8000db8, rawbuf=rawbuf@entry=0x1480d8013d50 "ALTER TABLE t DROP COLUMN c", length=length@entry=27, parser_state=parser_state@entry=0x14811091d470) at /test/mtest/10.10_dbg/sql/sql_parse.cc:8038
      #18 0x000055994a0399cf in wsrep_mysql_parse (thd=thd@entry=0x1480d8000db8, rawbuf=0x1480d8013d50 "ALTER TABLE t DROP COLUMN c", length=27, parser_state=parser_state@entry=0x14811091d470) at /test/mtest/10.10_dbg/sql/sql_parse.cc:7851
      #19 0x000055994a047696 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1480d8000db8, packet=packet@entry=0x1480d800b7f9 "ALTER TABLE t DROP COLUMN c", packet_length=packet_length@entry=27, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_class.h:1365
      #20 0x000055994a049d96 in do_command (thd=0x1480d8000db8, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_parse.cc:1407
      #21 0x000055994a1ad9b5 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55994d5f7628, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1418
      #22 0x000055994a1adec1 in handle_one_connection (arg=0x55994d5f7628) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1312
      #23 0x0000148146e3a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #24 0x0000148146a28293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.26 (dbg), 10.5.17 (dbg), 10.6.9 (dbg), 10.7.5 (dbg), 10.8.4 (dbg), 10.9.2 (dbg), 10.10.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (opt), 10.3.36 (dbg), 10.4.25 (opt), 10.5.16 (opt), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt), 10.9.2 (opt), 10.10.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.