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

Assertion `len <= fixed_len' failed in rec_get_converted_size_comp_prefix_low on ALTER + INSERT

    XMLWordPrintable

Details

    Description

      USE test;
      CREATE TABLE t(c CHAR) ENGINE=InnoDB;
      ALTER TABLE t MODIFY c CHAR(3) COLLATE 'latin1_bin';
      INSERT INTO t VALUES('a');
      

      Leads to:

      10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

      mysqld: /test/10.5_dbg/storage/innobase/rem/rem0rec.cc:1223: ulint rec_get_converted_size_comp_prefix_low(const dict_index_t*, const dfield_t*, ulint, ulint*, rec_comp_status_t, bool) [with bool mblob = false; ulint = long unsigned int]: Assertion `len <= fixed_len' failed.
      

      10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

      Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7fd543157700 (LWP 929089))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005590edd9a03d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x00005590ed53fd7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007fd54189b801 in __GI_abort () at abort.c:79
      #6  0x00007fd54188b39a in __assert_fail_base (fmt=0x7fd541a127d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5590ee1cbf89 "len <= fixed_len", file=file@entry=0x5590ee1cc3c8 "/test/10.5_dbg/storage/innobase/rem/rem0rec.cc", line=line@entry=1223, function=function@entry=0x5590ee1ce900 <unsigned long rec_get_converted_size_comp_prefix_low<false>(dict_index_t const*, dfield_t const*, unsigned long, unsigned long*, rec_comp_status_t, bool)::__PRETTY_FUNCTION__> "ulint rec_get_converted_size_comp_prefix_low(const dict_index_t*, const dfield_t*, ulint, ulint*, rec_comp_status_t, bool) [with bool mblob = false; ulint = long unsigned int]") at assert.c:92
      #7  0x00007fd54188b412 in __GI___assert_fail (assertion=assertion@entry=0x5590ee1cbf89 "len <= fixed_len", file=file@entry=0x5590ee1cc3c8 "/test/10.5_dbg/storage/innobase/rem/rem0rec.cc", line=line@entry=1223, function=function@entry=0x5590ee1ce900 <unsigned long rec_get_converted_size_comp_prefix_low<false>(dict_index_t const*, dfield_t const*, unsigned long, unsigned long*, rec_comp_status_t, bool)::__PRETTY_FUNCTION__> "ulint rec_get_converted_size_comp_prefix_low(const dict_index_t*, const dfield_t*, ulint, ulint*, rec_comp_status_t, bool) [with bool mblob = false; ulint = long unsigned int]") at assert.c:101
      #8  0x00005590eda26106 in rec_get_converted_size_comp_prefix_low<>(const dict_index_t *, const dfield_t *, ulint, ulint *, rec_comp_status_t, bool) (index=index@entry=0x7fd5194a4c98, dfield=0x7fd519483918, n_fields=<optimized out>, extra=extra@entry=0x0, status=status@entry=REC_STATUS_ORDINARY, temp=temp@entry=false) at /test/10.5_dbg/storage/innobase/rem/rem0rec.cc:1223
      #9  0x00005590eda2be60 in rec_get_converted_size_comp (index=index@entry=0x7fd5194a4c98, tuple=tuple@entry=0x7fd519483898, extra=extra@entry=0x0) at /test/10.5_dbg/storage/innobase/rem/rem0rec.cc:1317
      #10 0x00005590edb812cc in rec_get_converted_size (index=index@entry=0x7fd5194a4c98, dtuple=dtuple@entry=0x7fd519483898, n_ext=0) at /test/10.5_dbg/storage/innobase/include/rem0rec.ic:1190
      #11 0x00005590edb89cc4 in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x7fd543154260, offsets=offsets@entry=0x7fd543154228, heap=heap@entry=0x7fd543154220, entry=entry@entry=0x7fd519483898, rec=rec@entry=0x7fd5431546c0, big_rec=0x7fd543154218, n_ext=<optimized out>, thr=0x7fd5194f17b8, mtr=0x7fd543154920) at /test/10.5_dbg/storage/innobase/btr/btr0cur.cc:3410
      #12 0x00005590eda50c42 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=2, index=index@entry=0x7fd5194a4c98, n_uniq=n_uniq@entry=0, entry=entry@entry=0x7fd519483898, n_ext=n_ext@entry=0, thr=0x7fd5194f17b8) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:2729
      #13 0x00005590eda58076 in row_ins_clust_index_entry (index=index@entry=0x7fd5194a4c98, entry=entry@entry=0x7fd519483898, thr=thr@entry=0x7fd5194f17b8, n_ext=n_ext@entry=0) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3203
      #14 0x00005590eda59d04 in row_ins_index_entry (thr=0x7fd5194f17b8, entry=0x7fd519483898, index=0x7fd5194a4c98) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3328
      #15 row_ins_index_entry_step (thr=0x7fd5194f17b8, node=0x7fd5194f1590) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3497
      #16 row_ins (thr=0x7fd5194f17b8, node=0x7fd5194f1590) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3634
      #17 row_ins_step (thr=thr@entry=0x7fd5194f17b8) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3773
      #18 0x00005590eda78f97 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x7fd519452aa8 "\375a  ", '\245' <repeats 12 times>, "\310*E\031\325\177", prebuilt=0x7fd5194f1098, ins_mode=<optimized out>) at /test/10.5_dbg/storage/innobase/row/row0mysql.cc:1462
      #19 0x00005590ed9103bf in ha_innobase::write_row (this=0x7fd5194376a0, record=0x7fd519452aa8 "\375a  ", '\245' <repeats 12 times>, "\310*E\031\325\177") at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:7771
      #20 0x00005590ed553c5b in handler::ha_write_row (this=0x7fd5194376a0, buf=0x7fd519452aa8 "\375a  ", '\245' <repeats 12 times>, "\310*E\031\325\177") at /test/10.5_dbg/sql/handler.cc:6957
      #21 0x00005590ed254c04 in write_record (thd=thd@entry=0x7fd519415088, table=table@entry=0x7fd5194f0088, info=info@entry=0x7fd543155a70, sink=sink@entry=0x0) at /test/10.5_dbg/sql/sql_insert.cc:2091
      #22 0x00005590ed25fe64 in mysql_insert (thd=thd@entry=0x7fd519415088, table_list=0x7fd519474180, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.5_dbg/sql/sql_insert.cc:1088
      #23 0x00005590ed297308 in mysql_execute_command (thd=thd@entry=0x7fd519415088) at /test/10.5_dbg/sql/sql_parse.cc:4515
      #24 0x00005590ed2a2f2b in mysql_parse (thd=thd@entry=0x7fd519415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fd543156450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
      #25 0x00005590ed28ec45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fd519415088, packet=packet@entry=0x7fd519467089 "INSERT INTO t VALUES('a')", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
      #26 0x00005590ed28d49b in do_command (thd=0x7fd519415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #27 0x00005590ed3e8415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7fd5213c53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
      #28 0x00005590ed3e8744 in handle_one_connection (arg=arg@entry=0x7fd5213c53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #29 0x00005590ed848fb0 in pfs_spawn_thread (arg=0x7fd540c45b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #30 0x00007fd54257e6db in start_thread (arg=0x7fd543157700) at pthread_create.c:463
      #31 0x00007fd54197c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.