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

Assertion `!(col->prtype & 256U)' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      --source include/have_innodb.inc
      set sql_mode='';
      CREATE TABLE t (id INT AUTO_INCREMENT KEY,a INT,b INT,c VARCHAR(0),d DATE,ab_sum INT AS (a + b) VIRTUAL,ab_mul INT AS (a * b) PERSISTENT,c_upper VARCHAR(0) AS (UPPER (c)) VIRTUAL,c_len INT AS (LENGTH (c)) PERSISTENT,INDEX idx_a (a),INDEX idx_ab_SUM(ab_sum)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
      ALTER TABLE t ADD FULLTEXT INDEX ft_fz_0 (c);
      REPLACE INTO t (id,ab_sum) VALUES (1,1);
      ALTER TABLE t ADD SYSTEM VERSIONING;
      ALTER TABLE t ENGINE=InnoDB;
      

      Leads to:

      CS 10.11.17 0b467c2c128dd226c9a1386f358742797a2b6919 (Debug, Clang 18.1.3-11) Build 30/03/2026

      mariadbd: /test/10.11_dbg/storage/innobase/row/row0merge.cc:771: ulint row_merge_buf_add(row_merge_buf_t *, dict_index_t *, const dict_table_t *, const dict_table_t *, fts_psort_t *, dtuple_t *, const row_ext_t *, doc_id_t *, mem_heap_t *, dberr_t *, mem_heap_t **, TABLE *, trx_t *, const col_collations *): Assertion `!(col->prtype & 256U)' failed.
      

      CS 10.11.17 0b467c2c128dd226c9a1386f358742797a2b6919 (Debug, Clang 18.1.3-11) Build 30/03/2026

      Core was generated by `/test/MD300326-mariadb-10.11.17-linux-x86_64-dbg/bin/mariadbd --no-defaults --m'.
      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 799230)]
      (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  0x000071200c64527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000071200c6288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000071200c62881b in __assert_fail_base (fmt=0x71200c7d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5d842cbb168a "!(col->prtype & 256U)", file=file@entry=0x5d842cbaf491 "/test/10.11_dbg/storage/innobase/row/row0merge.cc", line=line@entry=771, function=function@entry=0x5d842cbb1574 "ulint row_merge_buf_add(row_merge_buf_t *, dict_index_t *, const dict_table_t *, const dict_table_t *, fts_psort_t *, dtuple_t *, const row_ext_t *, doc_id_t *, mem_heap_t *, dberr_t *, mem_heap_t **,"...) at ./assert/assert.c:96
      #6  0x000071200c63b517 in __assert_fail (assertion=0x5d842cbb168a "!(col->prtype & 256U)", file=0x5d842cbaf491 "/test/10.11_dbg/storage/innobase/row/row0merge.cc", line=771, function=0x5d842cbb1574 "ulint row_merge_buf_add(row_merge_buf_t *, dict_index_t *, const dict_table_t *, const dict_table_t *, fts_psort_t *, dtuple_t *, const row_ext_t *, doc_id_t *, mem_heap_t *, dberr_t *, mem_heap_t **,"...)at ./assert/assert.c:105
      #7  0x00005d842c492554 in row_merge_buf_add (buf=0x691f2ff3ee60, fts_index=0x691f2c0298c0, old_table=0x691f2c028ef0, new_table=0x691f2c04f6f0, psort_info=0x691f2c0a86c0, row=0x691f202a3e80, ext=0x0, doc_id=0x711fe480c170, conv_heap=0x0, err=0x711fe480c190, v_heap=0x711fe480c260, my_table=0x711fe480e370, trx=0x711fffbfeb80, col_collate=0x0) at /test/10.11_dbg/storage/innobase/row/row0merge.cc:771
      #8  0x00005d842c487dbc in row_merge_read_clustered_index (trx=0x711fffbfeb80, table=0x711fe480e370, old_table=0x691f2c028ef0, new_table=0x691f2c04f6f0, online=false, index=0x691f2c0508b8, fts_sort_idx=0x691f2c045130, psort_info=0x691f2c0a86c0, files=0x691f2c0d18c0, key_numbers=0x691f2c0508e0, n_index=5, defaults=0x0, add_v=0x0, col_map=0x691f2c046d88, add_autoinc=18446744073709551615, sequence=@0x691f2c016488: {m_max_value = 0, m_increment = 0, m_offset = 0, m_next_value = 2, m_eof = true}, block=0x711fe44ca000 "", skip_pk_sort=true, tmpfd=0x711fe480c990, stage=0x691f2c05caf0, pct_cost=16.666666666666668, crypt_block=0x0, eval_table=0x711fe480e370, allow_not_null=true, col_collate=0x0) at /test/10.11_dbg/storage/innobase/row/row0merge.cc:2547
      #9  0x00005d842c482da8 in row_merge_build_indexes (trx=0x711fffbfeb80, old_table=0x691f2c028ef0, new_table=0x691f2c04f6f0, online=false, indexes=0x691f2c0508b8, key_numbers=0x691f2c0508e0, n_indexes=5, table=0x711fe480e370, defaults=0x0, col_map=0x691f2c046d88, add_autoinc=18446744073709551615, sequence=@0x691f2c016488: {m_max_value = 0, m_increment = 0, m_offset = 0, m_next_value = 2, m_eof = true}, skip_pk_sort=true, stage=0x691f2c05caf0, add_v=0x0, eval_table=0x711fe480e370, allow_not_null=true, col_collate=0x0)at /test/10.11_dbg/storage/innobase/row/row0merge.cc:4782
      #10 0x00005d842c2d773d in ha_innobase::inplace_alter_table (this=0x691f2c059a48, altered_table=0x711fe480e370, ha_alter_info=0x711fe480e028)at /test/10.11_dbg/storage/innobase/handler/handler0alter.cc:8966
      #11 0x00005d842bbff399 in handler::ha_inplace_alter_table (this=0x691f2c059a48, altered_table=0x711fe480e370, ha_alter_info=0x711fe480e028) at /test/10.11_dbg/sql/handler.h:4623
      #12 0x00005d842bbf08c0 in mysql_inplace_alter_table (thd=0x691f2c000d58, table_list=0x691f2c013568, table=0x691f2c007fd8, altered_table=0x711fe480e370, ha_alter_info=0x711fe480e028, target_mdl_request=0x711fe4810150, ddl_log_state=0x711fe480e2e0, trigger_param=0x711fe480fd68, alter_ctx=0x711fe480f0f8, partial_alter=@0x711fe480e2ce: false, start_alter_id=@0x711fe480e2c0: 0, if_exists=false) at /test/10.11_dbg/sql/sql_table.cc:8133
      #13 0x00005d842bbe8b78 in mysql_alter_table (thd=0x691f2c000d58, new_db=0x691f2c005908, new_name=0x691f2c005d68, create_info=0x711fe48111d0, table_list=0x691f2c013568, recreate_info=0x711fe48108b0, alter_info=0x711fe4811060, order_num=0, order=0x0, ignore=false, if_exists=false)at /test/10.11_dbg/sql/sql_table.cc:11467
      #14 0x00005d842bca997e in Sql_cmd_alter_table::execute (this=0x691f2c013c90, thd=0x691f2c000d58) at /test/10.11_dbg/sql/sql_alter.cc:688
      #15 0x00005d842bad1b29 in mysql_execute_command (thd=0x691f2c000d58, is_called_from_prepared_stmt=false)at /test/10.11_dbg/sql/sql_parse.cc:6201
      #16 0x00005d842babf7f4 in mysql_parse (thd=0x691f2c000d58, rawbuf=0x691f2c013480 "ALTER TABLE t ENGINE=InnoDB", length=27, parser_state=0x711fe4812a20) at /test/10.11_dbg/sql/sql_parse.cc:8223
      #17 0x00005d842babcc49 in dispatch_command (command=COM_QUERY, thd=0x691f2c000d58, packet=0x691f2c00af09 "ALTER TABLE t ENGINE=InnoDB", packet_length=27, blocking=true) at /test/10.11_dbg/sql/sql_parse.cc:1924
      #18 0x00005d842bac03a3 in do_command (thd=0x691f2c000d58, blocking=true)at /test/10.11_dbg/sql/sql_parse.cc:1434
      #19 0x00005d842bc9e889 in do_handle_one_connection (connect=0x5d8442079cf8, put_in_cache=true) at /test/10.11_dbg/sql/sql_connect.cc:1475
      #20 0x00005d842bc9e622 in handle_one_connection (arg=0x5d844215d628)at /test/10.11_dbg/sql/sql_connect.cc:1387
      #21 0x000071200c69caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #22 0x000071200c729c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  300326  0bbec68242a9fa4c681993a895807cf077991790  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  10.6   opt  300326  0bbec68242a9fa4c681993a895807cf077991790  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      CS  10.11  dbg  300326  0b467c2c128dd226c9a1386f358742797a2b6919  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  10.11  opt  300326  0b467c2c128dd226c9a1386f358742797a2b6919  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      CS  11.4   dbg  300326  4a6663e90c572b14e3628df91810ef707647ba60  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  11.4   opt  300326  4a6663e90c572b14e3628df91810ef707647ba60  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      CS  11.8   dbg  300326  840695801a0f2889abdd26c6c59509f99e15c966  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  11.8   opt  300326  840695801a0f2889abdd26c6c59509f99e15c966  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      CS  12.2   dbg  300326  d26a6f44c1f2119377e79a9540886c6d8c01472f  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  12.2   opt  300326  d26a6f44c1f2119377e79a9540886c6d8c01472f  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      CS  12.3   dbg  300326  2f4743f1515d241ed0c903e376759291c9c41800  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  12.3   opt  300326  2f4743f1515d241ed0c903e376759291c9c41800  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      CS  13.0   dbg  300326  6660d0bdd7c8bdca9ec4e4e7e0f11df4e22c30f1  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      CS  13.0   opt  300326  6660d0bdd7c8bdca9ec4e4e7e0f11df4e22c30f1  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      ES  10.6   dbg  300326  84a80c8b38208d362225496da08d86d8d454e453  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      ES  10.6   opt  300326  84a80c8b38208d362225496da08d86d8d454e453  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      ES  11.4   dbg  300326  8b2bf17b733262409422ce7d039a0c021fc47077  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      ES  11.4   opt  300326  8b2bf17b733262409422ce7d039a0c021fc47077  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      ES  11.8   dbg  300326  854cae81f52e477c7777a51db26ba640d8755b81  !(col->prtype & 256U)|SIGABRT|row_merge_buf_add|row_merge_read_clustered_index|row_merge_build_indexes|ha_innobase::inplace_alter_table
      ES  11.8   opt  300326  854cae81f52e477c7777a51db26ba640d8755b81  SIGSEGV|rec_convert_dtuple_to_rec_comp<false, false>|rec_convert_dtuple_to_rec_new|rec_convert_dtuple_to_rec|BtrBulk::insert
      

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            saahil Saahil Alam
            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.