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

Assertion `!col->mbmaxlen || len >= col->mbminlen * fixed_len / col->mbmaxlen' failed in rec_get_converted_size_comp_prefix_low upon UPDATE after upgrade from 10.1

    XMLWordPrintable

    Details

      Description

      Note: See also MDEV-18084.

      10.2 debug 734029fa796

      mysqld: /data/src/10.2/storage/innobase/rem/rem0rec.cc:902: ulint rec_get_converted_size_comp_prefix_low(const dict_index_t*, const dfield_t*, ulint, ulint*, bool): Assertion `!col->mbmaxlen || len >= col->mbminlen *
       fixed_len / col->mbmaxlen' failed.
      181226 22:35:12 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f4785fadee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055ce58b9b01a in rec_get_converted_size_comp_prefix_low (index=0x7f4710028868, fields=0x7f4710021b38, n_fields=4, extra=0x0, temp=false) at /data/src/10.2/storage/innobase/rem/rem0rec.cc:900
      #9  0x000055ce58b9b346 in rec_get_converted_size_comp (index=0x7f4710028868, status=0, fields=0x7f4710021b38, n_fields=4, extra=0x0) at /data/src/10.2/storage/innobase/rem/rem0rec.cc:990
      #10 0x000055ce58cd345d in rec_get_converted_size (index=0x7f4710028868, dtuple=0x7f4710021af0, n_ext=0) at /data/src/10.2/storage/innobase/include/rem0rec.ic:1654
      #11 0x000055ce58ce0140 in btr_cur_optimistic_update (flags=2, cursor=0x7f4710021930, offsets=0x7f478427e160, heap=0x7f478427e200, update=0x7f4710020240, cmpl_info=1, thr=0x7f4710020430, trx_id=2822, mtr=0x7f478427e570) at /data/src/10.2/storage/innobase/btr/btr0cur.cc:4052
      #12 0x000055ce58c396a6 in row_upd_clust_rec (flags=0, node=0x7f4710020128, index=0x7f4710028868, offsets=0x7f478427e250, offsets_heap=0x7f478427e200, thr=0x7f4710020430, mtr=0x7f478427e570) at /data/src/10.2/storage/innobase/row/row0upd.cc:2858
      #13 0x000055ce58c3a4e5 in row_upd_clust_step (node=0x7f4710020128, thr=0x7f4710020430) at /data/src/10.2/storage/innobase/row/row0upd.cc:3182
      #14 0x000055ce58c3a8d2 in row_upd (node=0x7f4710020128, thr=0x7f4710020430) at /data/src/10.2/storage/innobase/row/row0upd.cc:3279
      #15 0x000055ce58c3adab in row_upd_step (thr=0x7f4710020430) at /data/src/10.2/storage/innobase/row/row0upd.cc:3425
      #16 0x000055ce58be1437 in row_update_for_mysql (prebuilt=0x7f471001f958) at /data/src/10.2/storage/innobase/row/row0mysql.cc:1830
      #17 0x000055ce58aa7786 in ha_innobase::update_row (this=0x7f471001e6b8, old_row=0x7f471000c180 "\377\001", new_row=0x7f471000c170 "\377\002") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9000
      #18 0x000055ce5879ba17 in handler::ha_update_row (this=0x7f471001e6b8, old_data=0x7f471000c180 "\377\001", new_data=0x7f471000c170 "\377\002") at /data/src/10.2/sql/handler.cc:5993
      #19 0x000055ce58602458 in mysql_update (thd=0x7f4710000b00, table_list=0x7f47100111b8, fields=..., values=..., conds=0x7f4710011d00, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f478427f8b0, updated_return=0x7f478427f960) at /data/src/10.2/sql/sql_update.cc:809
      #20 0x000055ce58515cab in mysql_execute_command (thd=0x7f4710000b00) at /data/src/10.2/sql/sql_parse.cc:4292
      #21 0x000055ce585217f7 in mysql_parse (thd=0x7f4710000b00, rawbuf=0x7f47100110c0 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", length=38, parser_state=0x7f4784280250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8014
      #22 0x000055ce5850f12f in dispatch_command (command=COM_QUERY, thd=0x7f4710000b00, packet=0x7f47100191a1 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1825
      #23 0x000055ce5850da92 in do_command (thd=0x7f4710000b00) at /data/src/10.2/sql/sql_parse.cc:1379
      #24 0x000055ce58660569 in do_handle_one_connection (connect=0x55ce5b4c9580) at /data/src/10.2/sql/sql_connect.cc:1335
      #25 0x000055ce586602f6 in handle_one_connection (arg=0x55ce5b4c9580) at /data/src/10.2/sql/sql_connect.cc:1241
      #26 0x00007f4787a69494 in start_thread (arg=0x7f4784281700) at pthread_create.c:333
      #27 0x00007f478606a93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Non-debug builds don't seem to be affected.
      On 10.3 and 10.4 the assertion failure is the same as in MDEV-18084.

      To reproduce:

      • start 10.1 server with all defaults (current 10.1 9ad1663f78 or 10.1.37 will do, I didn't check other versions);
      • run

        CREATE TABLE t1 (v TIMESTAMP(2) AS (t) VIRTUAL, pk INT AUTO_INCREMENT, t TIMESTAMP(2) NULL, PRIMARY KEY(pk));
        INSERT INTO t1 () VALUES ();
        

      • shutdown server normally;
      • start 10.2+ server with all defaults on the same datadir;
      • run mysql_upgrade (optionally, it doesn't affect the outcome);
      • run

        UPDATE t1 SET pk = pk + 1 WHERE pk = 1
        

      The datadir pre-created on current 10.1 as described is attached.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: