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

Crashes, asserts, errors and hangs when Aria encryption is enabled/used, but plugin is not loaded

Details

    Description

      SET @aria.encrypt= @@aria_encrypt_tables;
      SET GLOBAL aria_encrypt_tables= 1;
       
      CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a)) ENGINE=Aria TRANSACTIONAL=1;
      ALTER TABLE t1 DISABLE KEYS;
      INSERT INTO t1 VALUES  (1,1);
      ALTER TABLE t1 ENABLE KEYS;
       
      # Cleanup
      DROP TABLE t1;
      SET GLOBAL aria_encrypt_tables= @aria.encrypt;
      

      On 10.2 and higher, it causes double free or corruption / server crash / assertion failure:

      10.2 e84dc567 RelWithDebInfo

      #4  0x00007fcc63cb83fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #5  0x00007fcc63cf4bd0 in __libc_message () from /lib/x86_64-linux-gnu/libc.so.6
      #6  0x00007fcc63cfaf96 in malloc_printerr () from /lib/x86_64-linux-gnu/libc.so.6
      #7  0x00007fcc63cfb78e in _int_free () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055658523b607 in ma_crypt_post_write_hook (res=0, args=0x7fcc5df843f0) at /data/src/10.2/storage/maria/ma_crypt.c:322
      #9  0x0000556585266203 in write_page (share=0x7fcc4c0a58b8, file=56, buff=<optimized out>, block_size=<optimized out>, pos=pos@entry=16384, myf_rw=myf_rw@entry=20) at /data/src/10.2/storage/maria/ma_check.c:3204
      #10 0x000055658526e902 in _ma_flush_pending_blocks (sort_param=sort_param@entry=0x7fcc5df849f0) at /data/src/10.2/storage/maria/ma_check.c:5935
      #11 0x0000556585276bfe in _ma_create_index_by_sort (info=0x7fcc5df849f0, no_messages=<optimized out>, sortbuff_size=<optimized out>) at /data/src/10.2/storage/maria/ma_sort.c:269
      #12 0x0000556585273ec8 in maria_repair_by_sort (param=0x7fcc4c029ab0, info=0x7fcc4c03a510, name=0x0, rep_quick=-1 '\377') at /data/src/10.2/storage/maria/ma_check.c:3895
      #13 0x000055658521f19d in ha_maria::repair (this=this@entry=0x7fcc4c0a51c0, thd=thd@entry=0x7fcc4c0009a8, param=param@entry=0x7fcc4c029ab0, do_optimize=do_optimize@entry=false) at /data/src/10.2/storage/maria/ha_maria.cc:1675
      #14 0x000055658521f89a in ha_maria::enable_indexes (this=0x7fcc4c0a51c0, mode=<optimized out>) at /data/src/10.2/storage/maria/ha_maria.cc:2033
      #15 0x0000556584e59f70 in alter_table_manage_keys (table=0x7fcc4c0922c8, indexes_were_disabled=1576549984, keys_onoff=Alter_info::LEAVE_AS_IS, keys_onoff@entry=Alter_info::ENABLE) at /data/src/10.2/sql/sql_table.cc:7081
      #16 0x0000556584f9cd56 in simple_rename_or_index_change (alter_ctx=0x7fcc5df868b0, keys_onoff=Alter_info::ENABLE, table_list=0x7fcc4c00f188, thd=0x7fcc4c0009a8) at /data/src/10.2/sql/sql_table.cc:8620
      #17 mysql_alter_table (thd=<optimized out>, new_db=<optimized out>, new_name=<optimized out>, create_info=<optimized out>, table_list=0x7fcc4c00f188, alter_info=<optimized out>, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9088
      #18 0x0000556584fe6f0d in Sql_cmd_alter_table::execute (this=0x2, thd=0x7fcc4c0009a8) at /data/src/10.2/sql/sql_alter.cc:329
      #19 0x0000556584f101c7 in mysql_execute_command (thd=0x7fcc4c0009a8) at /data/src/10.2/sql/sql_parse.cc:6231
      #20 0x0000556584f16f49 in mysql_parse (thd=0x7fcc4c0009a8, rawbuf=<optimized out>, length=26, parser_state=0x7fcc5df89240, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.2/sql/sql_parse.cc:8018
      #21 0x0000556584f19c1a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fcc4c0009a8, packet=packet@entry=0x7fcc4c006cf9 "ALTER TABLE t1 ENABLE KEYS", packet_length=packet_length@entry=26, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1829
      #22 0x0000556584f1a468 in do_command (thd=0x7fcc4c0009a8) at /data/src/10.2/sql/sql_parse.cc:1379
      #23 0x0000556584fe4224 in do_handle_one_connection (connect=connect@entry=0x5565886f9d48) at /data/src/10.2/sql/sql_connect.cc:1336
      #24 0x0000556584fe43c4 in handle_one_connection (arg=arg@entry=0x5565886f9d48) at /data/src/10.2/sql/sql_connect.cc:1242
      #25 0x00005565852a9d54 in pfs_spawn_thread (arg=0x5565886bc668) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #26 0x00007fcc65986494 in start_thread (arg=0x7fcc5df8a700) at pthread_create.c:333
      #27 0x00007fcc63d6c93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
       
      *** Error in `/data/bld/10.2-rel/bin/mysqld': double free or corruption (out): 0x00007fcc4c0c7750 ***
      ======= Backtrace: =========
      /lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7fcc63cf4bcb]
      /lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x7fcc63cfaf96]
      /lib/x86_64-linux-gnu/libc.so.6(+0x7778e)[0x7fcc63cfb78e]
      /data/bld/10.2-rel/bin/mysqld(+0x7f0607)[0x55658523b607]
      /data/bld/10.2-rel/bin/mysqld(+0x81b203)[0x556585266203]
      /data/bld/10.2-rel/bin/mysqld(+0x823902)[0x55658526e902]
      /data/bld/10.2-rel/bin/mysqld(+0x82bbfe)[0x556585276bfe]
      /data/bld/10.2-rel/bin/mysqld(+0x828ec8)[0x556585273ec8]
      /data/bld/10.2-rel/bin/mysqld(+0x7d419d)[0x55658521f19d]
      /data/bld/10.2-rel/bin/mysqld(+0x7d489a)[0x55658521f89a]
      /data/bld/10.2-rel/bin/mysqld(+0x40ef70)[0x556584e59f70]
      /data/bld/10.2-rel/bin/mysqld(_Z17mysql_alter_tableP3THDPcS1_P14HA_CREATE_INFOP10TABLE_LISTP10Alter_infojP8st_orderb+0x10b6)[0x556584f9cd56]
      /data/bld/10.2-rel/bin/mysqld(_ZN19Sql_cmd_alter_table7executeEP3THD+0x64d)[0x556584fe6f0d]
      /data/bld/10.2-rel/bin/mysqld(_Z21mysql_execute_commandP3THD+0x1347)[0x556584f101c7]
      /data/bld/10.2-rel/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x279)[0x556584f16f49]
      /data/bld/10.2-rel/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1f3a)[0x556584f19c1a]
      /data/bld/10.2-rel/bin/mysqld(_Z10do_commandP3THD+0x168)[0x556584f1a468]
      /data/bld/10.2-rel/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x234)[0x556584fe4224]
      /data/bld/10.2-rel/bin/mysqld(handle_one_connection+0x34)[0x556584fe43c4]
      /data/bld/10.2-rel/bin/mysqld(+0x85ed54)[0x5565852a9d54]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7fcc65986494]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fcc63d6c93f]
      ======= Memory map: ========
      556584a4b000-556585ace000 r-xp 00000000 08:11 35261781                   /data/bld/10.2-rel/bin/mysqld
      556585cce000-556585dad000 r--p 01083000 08:11 35261781                   /data/bld/10.2-rel/bin/mysqld
      556585dad000-556585e66000 rw-p 01162000 08:11 35261781                   /data/bld/10.2-rel/bin/mysqld
      556585e66000-5565866fd000 rw-p 00000000 00:00 0 
      556588466000-556588744000 rw-p 00000000 00:00 0                          [heap]
      7fcc48000000-7fcc48021000 rw-p 00000000 00:00 0 
      7fcc48021000-7fcc4c000000 ---p 00000000 00:00 0 
      7fcc4c000000-7fcc4c18e000 rw-p 00000000 00:00 0 
      7fcc4c18e000-7fcc50000000 ---p 00000000 00:00 0 
      7fcc50000000-7fcc50021000 rw-p 00000000 00:00 0 
      7fcc50021000-7fcc54000000 ---p 00000000 00:00 0 
      7fcc54000000-7fcc54021000 rw-p 00000000 00:00 0 
      7fcc54021000-7fcc58000000 ---p 00000000 00:00 0 
      7fcc58000000-7fcc58021000 rw-p 00000000 00:00 0 
      7fcc58021000-7fcc5c000000 ---p 00000000 00:00 0 
      7fcc5df41000-7fcc5df42000 ---p 00000000 00:00 0 
      7fcc5df42000-7fcc5df8b000 rw-p 00000000 00:00 0                          [stack:13267]
      7fcc5df8b000-7fcc5df8c000 ---p 00000000 00:00 0 
      7fcc5df8c000-7fcc5dfd5000 rw-p 00000000 00:00 0                          [stack:13264]
      7fcc5dfd5000-7fcc5dfd6000 ---p 00000000 00:00 0 
      7fcc5dfd6000-7fcc5e01f000 rw-p 00000000 00:00 0                          [stack:13263]
      7fcc5e01f000-7fcc5e020000 ---p 00000000 00:00 0 
      7fcc5e020000-7fcc5f38b000 rw-p 00000000 00:00 0                          [stack:13262]
      7fcc5f38b000-7fcc5f38c000 ---p 00000000 00:00 0 
      7fcc5f38c000-7fcc63c84000 rw-p 00000000 00:00 0                          [stack:13261]
      7fcc63c84000-7fcc63e19000 r-xp 00000000 08:05 3152648                    /lib/x86_64-linux-gnu/libc-2.24.so
      7fcc63e19000-7fcc64018000 ---p 00195000 08:05 3152648                    /lib/x86_64-linux-gnu/libc-2.24.so
      7fcc64018000-7fcc6401c000 r--p 00194000 08:05 3152648                    /lib/x86_64-linux-gnu/libc-2.24.so
      7fcc6401c000-7fcc6401e000 rw-p 00198000 08:05 3152648                    /lib/x86_64-linux-gnu/libc-2.24.so
      7fcc6401e000-7fcc64022000 rw-p 00000000 00:00 0 
      7fcc64022000-7fcc64038000 r-xp 00000000 08:05 3145732                    /lib/x86_64-linux-gnu/libgcc_s.so.1
      7fcc64038000-7fcc64237000 ---p 00016000 08:05 3145732                    /lib/x86_64-linux-gnu/libgcc_s.so.1
      7fcc64237000-7fcc64238000 rw-p 00015000 08:05 3145732                    /lib/x86_64-linux-gnu/libgcc_s.so.1
      7fcc64238000-7fcc6433b000 r-xp 00000000 08:05 3152660                    /lib/x86_64-linux-gnu/libm-2.24.so
      7fcc6433b000-7fcc6453a000 ---p 00103000 08:05 3152660                    /lib/x86_64-linux-gnu/libm-2.24.so
      7fcc6453a000-7fcc6453b000 r--p 00102000 08:05 3152660                    /lib/x86_64-linux-gnu/libm-2.24.so
      7fcc6453b000-7fcc6453c000 rw-p 00103000 08:05 3152660                    /lib/x86_64-linux-gnu/libm-2.24.so
      7fcc6453c000-7fcc646ae000 r-xp 00000000 08:05 1577675                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
      7fcc646ae000-7fcc648ae000 ---p 00172000 08:05 1577675                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
      7fcc648ae000-7fcc648b8000 r--p 00172000 08:05 1577675                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
      7fcc648b8000-7fcc648ba000 rw-p 0017c000 08:05 1577675                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
      7fcc648ba000-7fcc648be000 rw-p 00000000 00:00 0 
      7fcc648be000-7fcc648c1000 r-xp 00000000 08:05 3152657                    /lib/x86_64-linux-gnu/libdl-2.24.so
      7fcc648c1000-7fcc64ac0000 ---p 00003000 08:05 3152657                    /lib/x86_64-linux-gnu/libdl-2.24.so
      7fcc64ac0000-7fcc64ac1000 r--p 00002000 08:05 3152657                    /lib/x86_64-linux-gnu/libdl-2.24.so
      7fcc64ac1000-7fcc64ac2000 rw-p 00003000 08:05 3152657                    /lib/x86_64-linux-gnu/libdl-2.24.so
      7fcc64ac2000-7fcc64c8f000 r-xp 00000000 08:05 1576357                    /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
      7fcc64c8f000-7fcc64e8e000 ---p 001cd000 08:05 1576357                    /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
      7fcc64e8e000-7fcc64eab000 r--p 001cc000 08:05 1576357                    /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
      7fcc64eab000-7fcc64ebb000 rw-p 001e9000 08:05 1576357                    /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
      7fcc64ebb000-7fcc64ebe000 rw-p 00000000 00:00 0 
      7fcc64ebe000-7fcc64f15000 r-xp 00000000 08:05 1576361                    /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
      7fcc64f15000-7fcc65115000 ---p 00057000 08:05 1576361                    /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
      7fcc65115000-7fcc65118000 r--p 00057000 08:05 1576361                    /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
      7fcc65118000-7fcc6511e000 rw-p 0005a000 08:05 1576361                    /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
      7fcc6511e000-7fcc6511f000 rw-p 00000000 00:00 0 
      7fcc6511f000-7fcc65127000 r-xp 00000000 08:05 3152654                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
      7fcc65127000-7fcc65327000 ---p 00008000 08:05 3152654                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
      7fcc65327000-7fcc65328000 r--p 00008000 08:05 3152654                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
      7fcc65328000-7fcc65329000 rw-p 00009000 08:05 3152654                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
      7fcc65329000-7fcc65357000 rw-p 00000000 00:00 0 
      7fcc65357000-7fcc65371000 r-xp 00000000 08:05 3145828                    /lib/x86_64-linux-gnu/libz.so.1.2.8
      7fcc65371000-7fcc65570000 ---p 0001a000 08:05 3145828                    /lib/x86_64-linux-gnu/libz.so.1.2.8
      7fcc65570000-7fcc65571000 r--p 00019000 08:05 3145828                    /lib/x86_64-linux-gnu/libz.so.1.2.8
      7fcc65571000-7fcc65572000 rw-p 0001a000 08:05 3145828                    /lib/x86_64-linux-gnu/libz.so.1.2.8
      7fcc65572000-7fcc6557c000 r-xp 00000000 08:05 1586559                    /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
      7fcc6557c000-7fcc6577b000 ---p 0000a000 08:05 1586559                    /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
      7fcc6577b000-7fcc6577c000 r--p 00009000 08:05 1586559                    /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
      7fcc6577c000-7fcc6577d000 rw-p 0000a000 08:05 1586559                    /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
      7fcc6577d000-7fcc6577e000 r-xp 00000000 08:05 3152558                    /lib/x86_64-linux-gnu/libaio.so.1.0.1
      7fcc6577e000-7fcc6597d000 ---p 00001000 08:05 3152558                    /lib/x86_64-linux-gnu/libaio.so.1.0.1
      7fcc6597d000-7fcc6597e000 r--p 00000000 08:05 3152558                    /lib/x86_64-linux-gnu/libaio.so.1.0.1
      7fcc6597e000-7fcc6597f000 rw-p 00001000 08:05 3152558                    /lib/x86_64-linux-gnu/libaio.so.1.0.1
      7fcc6597f000-7fcc65997000 r-xp 00000000 08:05 3152800                    /lib/x86_64-linux-gnu/libpthread-2.24.so
      7fcc65997000-7fcc65b96000 ---p 00018000 08:05 3152800                    /lib/x86_64-linux-gnu/libpthread-2.24.so
      7fcc65b96000-7fcc65b97000 r--p 00017000 08:05 3152800                    /lib/x86_64-linux-gnu/libpthread-2.24.so
      7fcc65b97000-7fcc65b98000 rw-p 00018000 08:05 3152800                    /lib/x86_64-linux-gnu/libpthread-2.24.so
      7fcc65b98000-7fcc65b9c000 rw-p 00000000 00:00 0 
      7fcc65b9c000-7fcc65bbf000 r-xp 00000000 08:05 3145795                    /lib/x86_64-linux-gnu/ld-2.24.so
      7fcc65bd3000-7fcc65da4000 rw-p 00000000 00:00 0 
      7fcc65dbb000-7fcc65dbf000 rw-p 00000000 00:00 0 
      7fcc65dbf000-7fcc65dc0000 r--p 00023000 08:05 3145795                    /lib/x86_64-linux-gnu/ld-2.24.so
      7fcc65dc0000-7fcc65dc1000 rw-p 00024000 08:05 3145795                    /lib/x86_64-linux-gnu/ld-2.24.so
      7fcc65dc1000-7fcc65dc2000 rw-p 00000000 00:00 0 
      7ffd6a7ac000-7ffd6a7cf000 rw-p 00000000 00:00 0                          [stack]
      7ffd6a7ea000-7ffd6a7ec000 r-xp 00000000 00:00 0                          [vdso]
      7ffd6a7ec000-7ffd6a7ee000 r--p 00000000 00:00 0                          [vvar]
      ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
      

      10.2 e84dc567

      2019-02-06 23:47:08 140615339529984 [ERROR] mysqld: Unknown key id 1. Can't continue!
      2019-02-06 23:47:08 140615339529984 [ERROR] mysqld: Unknown key id 1. Can't continue!
      Error: Freeing unallocated data or underrun buffer mysys/safemalloc.c:194, mysys/my_malloc.c:220, maria/ma_crypt.c:325, maria/ma_check.c:3205, maria/ma_check.c:5935, maria/ma_sort.c:269, maria/ma_check.c:3895, maria/ha_maria.cc:1675
      mysqld: /data/src/10.2/sql/sql_error.cc:380: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      190206 23:47:08 [ERROR] mysqld got signal 6 ;
       
      #8  0x0000563a36220583 in Diagnostics_area::set_ok_status (this=0x7fe378005ca0, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.2/sql/sql_error.cc:380
      #9  0x0000563a361d2ba5 in my_ok (thd=0x7fe378000b00, affected_rows=0, id=0, message=0x0) at /data/src/10.2/sql/sql_class.h:4509
      #10 0x0000563a36322a32 in simple_rename_or_index_change (thd=0x7fe378000b00, table_list=0x7fe378012540, keys_onoff=Alter_info::ENABLE, alter_ctx=0x7fe38f5ca240) at /data/src/10.2/sql/sql_table.cc:8671
      #11 0x0000563a36323b67 in mysql_alter_table (thd=0x7fe378000b00, new_db=0x7fe378012b50 "test", new_name=0x0, create_info=0x7fe38f5cae50, table_list=0x7fe378012540, alter_info=0x7fe38f5cada0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9088
      #12 0x0000563a3639fdd7 in Sql_cmd_alter_table::execute (this=0x7fe378012b58, thd=0x7fe378000b00) at /data/src/10.2/sql/sql_alter.cc:329
      #13 0x0000563a36256520 in mysql_execute_command (thd=0x7fe378000b00) at /data/src/10.2/sql/sql_parse.cc:6231
      #14 0x0000563a3625b381 in mysql_parse (thd=0x7fe378000b00, rawbuf=0x7fe378012458 "ALTER TABLE t1 ENABLE KEYS", length=26, parser_state=0x7fe38f5cc200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8018
      #15 0x0000563a36248cbb in dispatch_command (command=COM_QUERY, thd=0x7fe378000b00, packet=0x7fe37808ddb1 "ALTER TABLE t1 ENABLE KEYS", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1829
      #16 0x0000563a362475c6 in do_command (thd=0x7fe378000b00) at /data/src/10.2/sql/sql_parse.cc:1379
      #17 0x0000563a3639aa6e in do_handle_one_connection (connect=0x563a391a0a60) at /data/src/10.2/sql/sql_connect.cc:1336
      #18 0x0000563a3639a7fb in handle_one_connection (arg=0x563a391a0a60) at /data/src/10.2/sql/sql_connect.cc:1242
      #19 0x0000563a367c1f3e in pfs_spawn_thread (arg=0x563a391ab7b0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #20 0x00007fe39aff6494 in start_thread (arg=0x7fe38f5cd700) at pthread_create.c:333
      #21 0x00007fe3993dc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.1 does not crash for me on a release build, but the debug assertion fails and Freeing unallocated data or underrun buffer is reported

      10.1 5eb3e4d8

      Error: Freeing unallocated data or underrun buffer 0x55737552201e, 0x55737550f885, 0x5573750b373c, 0x55737510a68a, mysys/safemalloc.c:191, mysys/my_malloc.c:220, maria/ma_crypt.c:325, maria/ma_check.c:3204
      mysqld: /data/src/10.1/sql/sql_error.cc:378: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `! is_set()' failed.
      190206 23:48:43 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007faaaa65fee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000557374c481ec in Diagnostics_area::set_ok_status (this=0x7faaa34da000, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.1/sql/sql_error.cc:378
      #9  0x0000557374c00acb in my_ok (thd=0x7faaa34d5070, affected_rows=0, id=0, message=0x0) at /data/src/10.1/sql/sql_class.h:4183
      #10 0x0000557374d38a31 in simple_rename_or_index_change (thd=0x7faaa34d5070, table_list=0x7faaa1843170, keys_onoff=Alter_info::ENABLE, alter_ctx=0x7faaac6e0710) at /data/src/10.1/sql/sql_table.cc:8337
      #11 0x0000557374d3982c in mysql_alter_table (thd=0x7faaa34d5070, new_db=0x7faaa1843760 "test", new_name=0x0, create_info=0x7faaac6e1300, table_list=0x7faaa1843170, alter_info=0x7faaac6e1270, order_num=0, order=0x0, ignore=false) at /data/src/10.1/sql/sql_table.cc:8679
      #12 0x0000557374dac1a3 in Sql_cmd_alter_table::execute (this=0x7faaa1843768, thd=0x7faaa34d5070) at /data/src/10.1/sql/sql_alter.cc:330
      #13 0x0000557374c7a739 in mysql_execute_command (thd=0x7faaa34d5070) at /data/src/10.1/sql/sql_parse.cc:5701
      #14 0x0000557374c7efdd in mysql_parse (thd=0x7faaa34d5070, rawbuf=0x7faaa1843088 "ALTER TABLE t1 ENABLE KEYS", length=26, parser_state=0x7faaac6e25e0) at /data/src/10.1/sql/sql_parse.cc:7468
      #15 0x0000557374c6d82e in dispatch_command (command=COM_QUERY, thd=0x7faaa34d5070, packet=0x7faaa5ff9071 "ALTER TABLE t1 ENABLE KEYS", packet_length=26) at /data/src/10.1/sql/sql_parse.cc:1496
      #16 0x0000557374c6c5a7 in do_command (thd=0x7faaa34d5070) at /data/src/10.1/sql/sql_parse.cc:1124
      #17 0x0000557374da76de in do_handle_one_connection (thd_arg=0x7faaa34d5070) at /data/src/10.1/sql/sql_connect.cc:1330
      #18 0x0000557374da7442 in handle_one_connection (arg=0x7faaa34d5070) at /data/src/10.1/sql/sql_connect.cc:1242
      #19 0x000055737516598a in pfs_spawn_thread (arg=0x7faaa9c39ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
      #20 0x00007faaac363494 in start_thread (arg=0x7faaac6e3b00) at pthread_create.c:333
      #21 0x00007faaaa71c93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Even when it doesn't crash, behaviorally it is strange, because the error is only returned on ALTER TABLE ENABLE KEYS, not on CREATE TABLE or a previous ALTER:

      CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a)) ENGINE=Aria TRANSACTIONAL=1;
      ALTER TABLE t1 DISABLE KEYS;
      INSERT INTO t1 VALUES  (1,1);
      ALTER TABLE t1 ENABLE KEYS;
      bug.crashed2                             [ fail ]
              Test ended at 2019-02-06 23:51:34
       
      CURRENT_TEST: bug.crashed2
      mysqltest: At line 7: query 'ALTER TABLE t1 ENABLE KEYS' failed: 192: Unknown key id 1. Can't continue!
      

      Attachments

        Issue Links

          Activity

            Slightly different stack with:

            USE test;
            SET SQL_MODE='';
            CREATE TABLE t (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ;
            INSERT INTO t VALUES(1, 'abcdefghijklmnopqrstuvwxyz');
            SET SESSION enforce_storage_engine=Aria;
            SELECT * FROM t INTO OUTFILE 'abcdefghijklmnopqrstuvwxyz';
            set global aria_encrypt_tables=ON;
            CREATE TEMPORARY TABLE t (c1 INT, INDEX(c1)) UNION=(t1,t2);
            LOAD DATA INFILE 'abcdefghijklmnopqrstuvwxyz' INTO TABLE t;
            

            10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057 (dbg)

            ERROR 2013 (HY000): Lost connection to MySQL server during query
            10.5.4>LOAD DATA INFILE 'abcdefghijklmnopqrstuvwxyz' INTO TABLE t;
            Stage: 2 of 2 'End bulk insert'      0% of stage done   # Seconds later replaced with:
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            

            Roel Roel Van de Paar added a comment - Slightly different stack with: USE test; SET SQL_MODE=''; CREATE TABLE t (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ; INSERT INTO t VALUES(1, 'abcdefghijklmnopqrstuvwxyz'); SET SESSION enforce_storage_engine=Aria; SELECT * FROM t INTO OUTFILE 'abcdefghijklmnopqrstuvwxyz'; set global aria_encrypt_tables=ON; CREATE TEMPORARY TABLE t (c1 INT, INDEX(c1)) UNION=(t1,t2); LOAD DATA INFILE 'abcdefghijklmnopqrstuvwxyz' INTO TABLE t; 10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057 (dbg) ERROR 2013 (HY000): Lost connection to MySQL server during query 10.5.4>LOAD DATA INFILE 'abcdefghijklmnopqrstuvwxyz' INTO TABLE t; Stage: 2 of 2 'End bulk insert' 0% of stage done # Seconds later replaced with: ERROR 2013 (HY000): Lost connection to MySQL server during query

            Completely new stack:

            USE test;
            SET SQL_MODE='';
            SET GLOBAL aria_encrypt_tables=ON;
            CREATE TABLE t (a SERIAL) ENGINE=Aria;
            CREATE TRIGGER tt BEFORE DELETE ON t FOR EACH ROW SAVEPOINT s;
            INSERT INTO t VALUES ('abcdefghijklmnopqrstuvwxyz');
            DROP TABLE IF EXISTS t;
            

            Leads to:

            10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug)

            mysqld: /test/10.5_dbg/sql/sql_trigger.cc:1460: static bool Table_triggers_list::check_n_load(THD*, const LEX_CSTRING*, const LEX_CSTRING*, TABLE*, bool): Assertion `!parse_error || lex.sphead == 0' failed.
            

            10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug)

            Core was generated by `/test/MD140720-mariadb-10.5.5-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 0x1549894fa700 (LWP 4086299))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x00005583f2cea4d7 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2  0x00005583f24a49ba in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x00001549877908b1 in __GI_abort () at abort.c:79
            #6  0x000015498778042a in __assert_fail_base (fmt=0x154987907a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5583f2e87880 "!parse_error || lex.sphead == 0", file=file@entry=0x5583f2e874e0 "/test/10.5_dbg/sql/sql_trigger.cc", line=line@entry=1460, function=function@entry=0x5583f2e88200 <Table_triggers_list::check_n_load(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, TABLE*, bool)::__PRETTY_FUNCTION__> "static bool Table_triggers_list::check_n_load(THD*, const LEX_CSTRING*, const LEX_CSTRING*, TABLE*, bool)") at assert.c:92
            #7  0x00001549877804a2 in __GI___assert_fail (assertion=assertion@entry=0x5583f2e87880 "!parse_error || lex.sphead == 0", file=file@entry=0x5583f2e874e0 "/test/10.5_dbg/sql/sql_trigger.cc", line=line@entry=1460, function=function@entry=0x5583f2e88200 <Table_triggers_list::check_n_load(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, TABLE*, bool)::__PRETTY_FUNCTION__> "static bool Table_triggers_list::check_n_load(THD*, const LEX_CSTRING*, const LEX_CSTRING*, TABLE*, bool)") at assert.c:101
            #8  0x00005583f22d9e06 in Table_triggers_list::check_n_load (thd=thd@entry=0x154965815088, db=db@entry=0x1549894f8320, table_name=table_name@entry=0x1549894f8330, table=table@entry=0x1549894f7c70, names_only=names_only@entry=true) at /test/10.5_dbg/sql/sql_trigger.cc:1460
            #9  0x00005583f22daa3e in Table_triggers_list::drop_all_triggers (thd=thd@entry=0x154965815088, db=db@entry=0x1549894f8320, name=name@entry=0x1549894f8330, MyFlags=MyFlags@entry=48) at /test/10.5_dbg/sql/sql_trigger.cc:1835
            #10 0x00005583f22bc004 in mysql_rm_table_no_locks (thd=thd@entry=0x154965815088, tables=tables@entry=0x154965874168, if_exists=if_exists@entry=true, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false) at /test/10.5_dbg/sql/sql_table.cc:2578
            #11 0x00005583f22bda03 in mysql_rm_table (thd=thd@entry=0x154965815088, tables=tables@entry=0x154965874168, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false) at /test/10.5_dbg/sql/sql_table.cc:2143
            #12 0x00005583f21fb307 in mysql_execute_command (thd=thd@entry=0x154965815088) at /test/10.5_dbg/sql/sql_parse.cc:4921
            #13 0x00005583f2205752 in mysql_parse (thd=thd@entry=0x154965815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1549894f9350, 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:7993
            #14 0x00005583f21f2204 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154965815088, packet=packet@entry=0x154965867089 "DROP TABLE IF EXISTS t", packet_length=packet_length@entry=22, 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:1866
            #15 0x00005583f21f09de in do_command (thd=0x154965815088) at /test/10.5_dbg/sql/sql_parse.cc:1347
            #16 0x00005583f234cc3b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x1549684c7808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
            #17 0x00005583f234d357 in handle_one_connection (arg=arg@entry=0x1549684c7808) at /test/10.5_dbg/sql/sql_connect.cc:1313
            #18 0x00005583f27b0ca8 in pfs_spawn_thread (arg=0x154986046508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x00001549884736db in start_thread (arg=0x1549894fa700) at pthread_create.c:463
            #20 0x0000154987871a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.1.46 (dbg), 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.5 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.5 (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)

            On optimized this gives:

            10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Optimized)

            10.5.5>DROP TABLE IF EXISTS t;
            ERROR 192 (HY000): Unknown key id 1. Can't continue!
            

            Roel Roel Van de Paar added a comment - Completely new stack: USE test; SET SQL_MODE=''; SET GLOBAL aria_encrypt_tables=ON; CREATE TABLE t (a SERIAL) ENGINE=Aria; CREATE TRIGGER tt BEFORE DELETE ON t FOR EACH ROW SAVEPOINT s; INSERT INTO t VALUES ('abcdefghijklmnopqrstuvwxyz'); DROP TABLE IF EXISTS t; Leads to: 10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug) mysqld: /test/10.5_dbg/sql/sql_trigger.cc:1460: static bool Table_triggers_list::check_n_load(THD*, const LEX_CSTRING*, const LEX_CSTRING*, TABLE*, bool): Assertion `!parse_error || lex.sphead == 0' failed. 10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug) Core was generated by `/test/MD140720-mariadb-10.5.5-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 0x1549894fa700 (LWP 4086299))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x00005583f2cea4d7 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518 #2 0x00005583f24a49ba in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x00001549877908b1 in __GI_abort () at abort.c:79 #6 0x000015498778042a in __assert_fail_base (fmt=0x154987907a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5583f2e87880 "!parse_error || lex.sphead == 0", file=file@entry=0x5583f2e874e0 "/test/10.5_dbg/sql/sql_trigger.cc", line=line@entry=1460, function=function@entry=0x5583f2e88200 <Table_triggers_list::check_n_load(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, TABLE*, bool)::__PRETTY_FUNCTION__> "static bool Table_triggers_list::check_n_load(THD*, const LEX_CSTRING*, const LEX_CSTRING*, TABLE*, bool)") at assert.c:92 #7 0x00001549877804a2 in __GI___assert_fail (assertion=assertion@entry=0x5583f2e87880 "!parse_error || lex.sphead == 0", file=file@entry=0x5583f2e874e0 "/test/10.5_dbg/sql/sql_trigger.cc", line=line@entry=1460, function=function@entry=0x5583f2e88200 <Table_triggers_list::check_n_load(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, TABLE*, bool)::__PRETTY_FUNCTION__> "static bool Table_triggers_list::check_n_load(THD*, const LEX_CSTRING*, const LEX_CSTRING*, TABLE*, bool)") at assert.c:101 #8 0x00005583f22d9e06 in Table_triggers_list::check_n_load (thd=thd@entry=0x154965815088, db=db@entry=0x1549894f8320, table_name=table_name@entry=0x1549894f8330, table=table@entry=0x1549894f7c70, names_only=names_only@entry=true) at /test/10.5_dbg/sql/sql_trigger.cc:1460 #9 0x00005583f22daa3e in Table_triggers_list::drop_all_triggers (thd=thd@entry=0x154965815088, db=db@entry=0x1549894f8320, name=name@entry=0x1549894f8330, MyFlags=MyFlags@entry=48) at /test/10.5_dbg/sql/sql_trigger.cc:1835 #10 0x00005583f22bc004 in mysql_rm_table_no_locks (thd=thd@entry=0x154965815088, tables=tables@entry=0x154965874168, if_exists=if_exists@entry=true, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false) at /test/10.5_dbg/sql/sql_table.cc:2578 #11 0x00005583f22bda03 in mysql_rm_table (thd=thd@entry=0x154965815088, tables=tables@entry=0x154965874168, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false) at /test/10.5_dbg/sql/sql_table.cc:2143 #12 0x00005583f21fb307 in mysql_execute_command (thd=thd@entry=0x154965815088) at /test/10.5_dbg/sql/sql_parse.cc:4921 #13 0x00005583f2205752 in mysql_parse (thd=thd@entry=0x154965815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1549894f9350, 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:7993 #14 0x00005583f21f2204 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154965815088, packet=packet@entry=0x154965867089 "DROP TABLE IF EXISTS t", packet_length=packet_length@entry=22, 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:1866 #15 0x00005583f21f09de in do_command (thd=0x154965815088) at /test/10.5_dbg/sql/sql_parse.cc:1347 #16 0x00005583f234cc3b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x1549684c7808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411 #17 0x00005583f234d357 in handle_one_connection (arg=arg@entry=0x1549684c7808) at /test/10.5_dbg/sql/sql_connect.cc:1313 #18 0x00005583f27b0ca8 in pfs_spawn_thread (arg=0x154986046508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201 #19 0x00001549884736db in start_thread (arg=0x1549894fa700) at pthread_create.c:463 #20 0x0000154987871a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.1.46 (dbg), 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.5 (dbg) Bug confirmed not present in: MariaDB: 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.5 (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) On optimized this gives: 10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Optimized) 10.5.5>DROP TABLE IF EXISTS t; ERROR 192 (HY000): Unknown key id 1. Can't continue!
            Roel Roel Van de Paar added a comment - - edited

            Unique ID's seen so far:

            SIGABRT|__libc_message|malloc_printerr|munmap_chunk|__GI___libc_free
            SIGABRT|__libc_message|malloc_printerr|_int_free|__GI___libc_free
            (key_del_current != 0) && ((key_del_current == (~ (my_off_t) 0)) || (key_del_current <= (share->state.state.key_file_length - block_size)))|SIGABRT|_ma_new|_ma_enlarge_root|_ma_ck_real_write_btree|_ma_ck_write_btree_with_log
            (longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory|SIGABRT|my_malloc_size_cb_func|my_free|ma_crypt_post_write_hook|write_page
            !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_load|mysql_execute_command
            !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|Sql_cmd_truncate_table::execute|mysql_execute_command
            !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|drop_routine|mysql_execute_command
            !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|simple_rename_or_index_change|mysql_alter_table
            !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_rm_table|mysql_execute_command
            !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_create_or_drop_trigger|mysql_execute_command
            ! is_set()|SIGABRT|Diagnostics_area::set_eof_status|my_eof|mysql_admin_table|Sql_cmd_analyze_table::execute
            status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory|SIGABRT|THD::~THD|THD::~THD|one_thread_per_connection_end|do_handle_one_connection
            !parse_error || lex.sphead == 0|SIGABRT|Table_triggers_list::check_n_load|Table_triggers_list::drop_all_triggers|mysql_rm_table_no_locks|mysql_rm_table
            !(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))|SIGABRT|_ma_scan_block_record|sort_get_next_record|sort_key_read|find_all_keys
            

            Roel Roel Van de Paar added a comment - - edited Unique ID's seen so far: SIGABRT|__libc_message|malloc_printerr|munmap_chunk|__GI___libc_free SIGABRT|__libc_message|malloc_printerr|_int_free|__GI___libc_free (key_del_current != 0) && ((key_del_current == (~ (my_off_t) 0)) || (key_del_current <= (share->state.state.key_file_length - block_size)))|SIGABRT|_ma_new|_ma_enlarge_root|_ma_ck_real_write_btree|_ma_ck_write_btree_with_log (longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory|SIGABRT|my_malloc_size_cb_func|my_free|ma_crypt_post_write_hook|write_page !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_load|mysql_execute_command !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|Sql_cmd_truncate_table::execute|mysql_execute_command !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|drop_routine|mysql_execute_command !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|simple_rename_or_index_change|mysql_alter_table !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_rm_table|mysql_execute_command !is_set() || (m_status == DA_OK_BULK && is_bulk_op())|SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_create_or_drop_trigger|mysql_execute_command ! is_set()|SIGABRT|Diagnostics_area::set_eof_status|my_eof|mysql_admin_table|Sql_cmd_analyze_table::execute status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory|SIGABRT|THD::~THD|THD::~THD|one_thread_per_connection_end|do_handle_one_connection !parse_error || lex.sphead == 0|SIGABRT|Table_triggers_list::check_n_load|Table_triggers_list::drop_all_triggers|mysql_rm_table_no_locks|mysql_rm_table !(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))|SIGABRT|_ma_scan_block_record|sort_get_next_record|sort_key_read|find_all_keys
            Roel Roel Van de Paar added a comment - - edited

            Note to self; one more to test with (crashes 10.4 dbg, unknown key id 1 on 10.4 opt and 10.5);

            USE test;
            SET GLOBAL aria_encrypt_tables=ON;
            CREATE TABLE t(a INT PRIMARY KEY) ENGINE=Aria KEY_BLOCK_SIZE=1 ROW_FORMAT=COMPACT;
            INSERT INTO t VALUES (0),(1),(2),(3);
            TRUNCATE t;
            

            Leads to:

            10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)

            mysqld: /test/10.4_dbg/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
            

            10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)

            Core was generated by `/test/MD110820-mariadb-10.4.15-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 0x14e59c442700 (LWP 3348885))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x0000563954dd98a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482
            #2  0x0000563954555cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x000014e59a6d98b1 in __GI_abort () at abort.c:79
            #6  0x000014e59a6c942a in __assert_fail_base (fmt=0x14e59a850a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x563954ec7458 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x563954ec7400 "/test/10.4_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x563954ec7f00 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:92
            #7  0x000014e59a6c94a2 in __GI___assert_fail (assertion=assertion@entry=0x563954ec7458 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x563954ec7400 "/test/10.4_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x563954ec7f00 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
            #8  0x000056395425a6df in Diagnostics_area::set_ok_status (this=0x14e574c1aa58, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.4_dbg/sql/sql_error.cc:335
            #9  0x000056395440fc39 in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x14e574c15070) at /test/10.4_dbg/sql/sql_class.h:5033
            #10 Sql_cmd_truncate_table::execute (this=0x14e574c6d808, thd=0x14e574c15070) at /test/10.4_dbg/sql/sql_truncate.cc:506
            #11 0x00005639542aaa3d in mysql_execute_command (thd=thd@entry=0x14e574c15070) at /test/10.4_dbg/sql/sql_parse.cc:6098
            #12 0x00005639542ad090 in mysql_parse (thd=thd@entry=0x14e574c15070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e59c441460, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7896
            #13 0x00005639542af920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e574c15070, packet=packet@entry=0x14e574c57071 "TRUNCATE t", packet_length=packet_length@entry=10, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:1834
            #14 0x00005639542b335b in do_command (thd=0x14e574c15070) at /test/10.4_dbg/sql/sql_parse.cc:1352
            #15 0x00005639543df8b6 in do_handle_one_connection (connect=connect@entry=0x14e599035790) at /test/10.4_dbg/sql/sql_connect.cc:1412
            #16 0x00005639543df9d6 in handle_one_connection (arg=0x14e599035790) at /test/10.4_dbg/sql/sql_connect.cc:1316
            #17 0x000014e59b6406db in start_thread (arg=0x14e59c442700) at pthread_create.c:463
            #18 0x000014e59a7baa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.1.47 (dbg), 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (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)

            Roel Roel Van de Paar added a comment - - edited Note to self; one more to test with (crashes 10.4 dbg, unknown key id 1 on 10.4 opt and 10.5); USE test; SET GLOBAL aria_encrypt_tables=ON; CREATE TABLE t(a INT PRIMARY KEY) ENGINE=Aria KEY_BLOCK_SIZE=1 ROW_FORMAT=COMPACT; INSERT INTO t VALUES (0),(1),(2),(3); TRUNCATE t; Leads to: 10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug) mysqld: /test/10.4_dbg/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed. 10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug) Core was generated by `/test/MD110820-mariadb-10.4.15-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 0x14e59c442700 (LWP 3348885))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000563954dd98a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482 #2 0x0000563954555cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x000014e59a6d98b1 in __GI_abort () at abort.c:79 #6 0x000014e59a6c942a in __assert_fail_base (fmt=0x14e59a850a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x563954ec7458 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x563954ec7400 "/test/10.4_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x563954ec7f00 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:92 #7 0x000014e59a6c94a2 in __GI___assert_fail (assertion=assertion@entry=0x563954ec7458 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x563954ec7400 "/test/10.4_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x563954ec7f00 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101 #8 0x000056395425a6df in Diagnostics_area::set_ok_status (this=0x14e574c1aa58, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.4_dbg/sql/sql_error.cc:335 #9 0x000056395440fc39 in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x14e574c15070) at /test/10.4_dbg/sql/sql_class.h:5033 #10 Sql_cmd_truncate_table::execute (this=0x14e574c6d808, thd=0x14e574c15070) at /test/10.4_dbg/sql/sql_truncate.cc:506 #11 0x00005639542aaa3d in mysql_execute_command (thd=thd@entry=0x14e574c15070) at /test/10.4_dbg/sql/sql_parse.cc:6098 #12 0x00005639542ad090 in mysql_parse (thd=thd@entry=0x14e574c15070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e59c441460, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7896 #13 0x00005639542af920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e574c15070, packet=packet@entry=0x14e574c57071 "TRUNCATE t", packet_length=packet_length@entry=10, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:1834 #14 0x00005639542b335b in do_command (thd=0x14e574c15070) at /test/10.4_dbg/sql/sql_parse.cc:1352 #15 0x00005639543df8b6 in do_handle_one_connection (connect=connect@entry=0x14e599035790) at /test/10.4_dbg/sql/sql_connect.cc:1412 #16 0x00005639543df9d6 in handle_one_connection (arg=0x14e599035790) at /test/10.4_dbg/sql/sql_connect.cc:1316 #17 0x000014e59b6406db in start_thread (arg=0x14e59c442700) at pthread_create.c:463 #18 0x000014e59a7baa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.1.47 (dbg), 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg) Bug confirmed not present in: MariaDB: 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (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)

            Note to self; one more to test with which causes corruption in various ways it seems.

            USE test;
            SET storage_engine=Aria;
            CREATE TABLE t(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
            INSERT INTO t VALUES (3,2,3,4,5,6);
            SET GLOBAL Aria_encrypt_TABLEs=ON;
            REPAIR NO_WRITE_TO_BINLOG TABLE t QUICK USE_FRM;
            

            Leads to:

            10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)

            mysqld: /test/10.4_dbg/storage/maria/ma_blockrec.c:5466: _ma_scan_block_record: Assertion `!(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))' failed.
            

            10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)

            Core was generated by `/test/MD110820-mariadb-10.4.15-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 0x14772ca97700 (LWP 1539572))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x0000564efe97d8a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482
            #2  0x0000564efe0f9cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x000014772ad2e8b1 in __GI_abort () at abort.c:79
            #6  0x000014772ad1e42a in __assert_fail_base (fmt=0x14772aea5a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x564efed50a40 "!(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))", file=file@entry=0x564efed4fc88 "/test/10.4_dbg/storage/maria/ma_blockrec.c", line=line@entry=5466, function=function@entry=0x564efed521d0 <__PRETTY_FUNCTION__.19958> "_ma_scan_block_record") at assert.c:92
            #7  0x000014772ad1e4a2 in __GI___assert_fail (assertion=assertion@entry=0x564efed50a40 "!(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))", file=file@entry=0x564efed4fc88 "/test/10.4_dbg/storage/maria/ma_blockrec.c", line=line@entry=5466, function=function@entry=0x564efed521d0 <__PRETTY_FUNCTION__.19958> "_ma_scan_block_record") at assert.c:101
            #8  0x0000564efe7d6809 in _ma_scan_block_record (info=info@entry=0x1477058d1070, record=0x147705862f30 '\245' <repeats 72 times>, "h4z\025", record_pos=0, skip_deleted=skip_deleted@entry=1 '\001') at /test/10.4_dbg/storage/maria/ma_blockrec.c:5466
            #9  0x0000564efe8009a7 in sort_get_next_record (sort_param=sort_param@entry=0x14772ca92190) at /test/10.4_dbg/storage/maria/ma_check.c:4868
            #10 0x0000564efe802e6b in sort_key_read (sort_param=0x14772ca92190, key=0x1477058665b8 '\245' <repeats 200 times>...) at /test/10.4_dbg/storage/maria/ma_check.c:4703
            #11 0x0000564efe805a25 in find_all_keys (tempfile_for_exceptions=0x14772ca91d40, tempfile=0x14772ca91bd0, maxbuffer=0x14772ca91b6c, buffpek=0x14772ca91b70, sort_keys=0x1477058665b0, keys=<optimized out>, info=0x14772ca92190) at /test/10.4_dbg/storage/maria/ma_sort.c:324
            #12 _ma_create_index_by_sort (info=info@entry=0x14772ca92190, no_messages=<optimized out>, sortbuff_size=<optimized out>) at /test/10.4_dbg/storage/maria/ma_sort.c:231
            #13 0x0000564efe7ff0d5 in maria_repair_by_sort (param=param@entry=0x14770596b088, info=0x1477058d1070, name=name@entry=0x14772ca937e0 "./test/t", rep_quick=<optimized out>) at /test/10.4_dbg/storage/maria/ma_check.c:3902
            #14 0x0000564efe7812c7 in ha_maria::repair (this=this@entry=0x14770588b088, thd=thd@entry=0x147705815070, param=param@entry=0x14770596b088, do_optimize=do_optimize@entry=false) at /test/10.4_dbg/storage/maria/ha_maria.cc:1652
            #15 0x0000564efe781bbc in ha_maria::repair (this=0x14770588b088, thd=0x147705815070, check_opt=0x14770581a248) at /test/10.4_dbg/storage/maria/ha_maria.cc:1447
            #16 0x0000564efe1073e3 in handler::ha_repair (this=0x14770588b088, thd=0x147705815070, check_opt=0x14770581a248) at /test/10.4_dbg/sql/handler.cc:4395
            #17 0x0000564efdf945dd in mysql_admin_table (thd=thd@entry=0x147705815070, tables=tables@entry=0x14770586d180, check_opt=check_opt@entry=0x14770581a248, operator_name=operator_name@entry=0x564efed58ca6 "repair", lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=true, extra_open_options=32, prepare_func=0x564efdf92938 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x564efe1073b2 <handler::ha_repair(THD*, st_ha_check_opt*)>, view_operator_func=0x564efdf327e2 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /test/10.4_dbg/sql/sql_admin.cc:791
            #18 0x0000564efdf96314 in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x147705815070) at /test/10.4_dbg/sql/sql_admin.cc:1415
            #19 0x0000564efde4ea3d in mysql_execute_command (thd=thd@entry=0x147705815070) at /test/10.4_dbg/sql/sql_parse.cc:6098
            #20 0x0000564efde51090 in mysql_parse (thd=thd@entry=0x147705815070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14772ca96460, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7896
            #21 0x0000564efde53920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x147705815070, packet=packet@entry=0x147705857071 "", packet_length=packet_length@entry=47, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:1834
            #22 0x0000564efde5735b in do_command (thd=0x147705815070) at /test/10.4_dbg/sql/sql_parse.cc:1352
            #23 0x0000564efdf838b6 in do_handle_one_connection (connect=connect@entry=0x147729835790) at /test/10.4_dbg/sql/sql_connect.cc:1412
            #24 0x0000564efdf839d6 in handle_one_connection (arg=0x147729835790) at /test/10.4_dbg/sql/sql_connect.cc:1316
            #25 0x000014772bc956db in start_thread (arg=0x14772ca97700) at pthread_create.c:463
            #26 0x000014772ae0fa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.1.47 (dbg), 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (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)

            Roel Roel Van de Paar added a comment - Note to self; one more to test with which causes corruption in various ways it seems. USE test; SET storage_engine=Aria; CREATE TABLE t(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592); INSERT INTO t VALUES (3,2,3,4,5,6); SET GLOBAL Aria_encrypt_TABLEs=ON; REPAIR NO_WRITE_TO_BINLOG TABLE t QUICK USE_FRM; Leads to: 10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug) mysqld: /test/10.4_dbg/storage/maria/ma_blockrec.c:5466: _ma_scan_block_record: Assertion `!(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))' failed. 10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug) Core was generated by `/test/MD110820-mariadb-10.4.15-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 0x14772ca97700 (LWP 1539572))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000564efe97d8a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482 #2 0x0000564efe0f9cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x000014772ad2e8b1 in __GI_abort () at abort.c:79 #6 0x000014772ad1e42a in __assert_fail_base (fmt=0x14772aea5a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x564efed50a40 "!(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))", file=file@entry=0x564efed4fc88 "/test/10.4_dbg/storage/maria/ma_blockrec.c", line=line@entry=5466, function=function@entry=0x564efed521d0 <__PRETTY_FUNCTION__.19958> "_ma_scan_block_record") at assert.c:92 #7 0x000014772ad1e4a2 in __GI___assert_fail (assertion=assertion@entry=0x564efed50a40 "!(offset < ((7 + 1 + 1 + 2 + 1) + (share)->crypt_page_header_space))", file=file@entry=0x564efed4fc88 "/test/10.4_dbg/storage/maria/ma_blockrec.c", line=line@entry=5466, function=function@entry=0x564efed521d0 <__PRETTY_FUNCTION__.19958> "_ma_scan_block_record") at assert.c:101 #8 0x0000564efe7d6809 in _ma_scan_block_record (info=info@entry=0x1477058d1070, record=0x147705862f30 '\245' <repeats 72 times>, "h4z\025", record_pos=0, skip_deleted=skip_deleted@entry=1 '\001') at /test/10.4_dbg/storage/maria/ma_blockrec.c:5466 #9 0x0000564efe8009a7 in sort_get_next_record (sort_param=sort_param@entry=0x14772ca92190) at /test/10.4_dbg/storage/maria/ma_check.c:4868 #10 0x0000564efe802e6b in sort_key_read (sort_param=0x14772ca92190, key=0x1477058665b8 '\245' <repeats 200 times>...) at /test/10.4_dbg/storage/maria/ma_check.c:4703 #11 0x0000564efe805a25 in find_all_keys (tempfile_for_exceptions=0x14772ca91d40, tempfile=0x14772ca91bd0, maxbuffer=0x14772ca91b6c, buffpek=0x14772ca91b70, sort_keys=0x1477058665b0, keys=<optimized out>, info=0x14772ca92190) at /test/10.4_dbg/storage/maria/ma_sort.c:324 #12 _ma_create_index_by_sort (info=info@entry=0x14772ca92190, no_messages=<optimized out>, sortbuff_size=<optimized out>) at /test/10.4_dbg/storage/maria/ma_sort.c:231 #13 0x0000564efe7ff0d5 in maria_repair_by_sort (param=param@entry=0x14770596b088, info=0x1477058d1070, name=name@entry=0x14772ca937e0 "./test/t", rep_quick=<optimized out>) at /test/10.4_dbg/storage/maria/ma_check.c:3902 #14 0x0000564efe7812c7 in ha_maria::repair (this=this@entry=0x14770588b088, thd=thd@entry=0x147705815070, param=param@entry=0x14770596b088, do_optimize=do_optimize@entry=false) at /test/10.4_dbg/storage/maria/ha_maria.cc:1652 #15 0x0000564efe781bbc in ha_maria::repair (this=0x14770588b088, thd=0x147705815070, check_opt=0x14770581a248) at /test/10.4_dbg/storage/maria/ha_maria.cc:1447 #16 0x0000564efe1073e3 in handler::ha_repair (this=0x14770588b088, thd=0x147705815070, check_opt=0x14770581a248) at /test/10.4_dbg/sql/handler.cc:4395 #17 0x0000564efdf945dd in mysql_admin_table (thd=thd@entry=0x147705815070, tables=tables@entry=0x14770586d180, check_opt=check_opt@entry=0x14770581a248, operator_name=operator_name@entry=0x564efed58ca6 "repair", lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=true, extra_open_options=32, prepare_func=0x564efdf92938 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x564efe1073b2 <handler::ha_repair(THD*, st_ha_check_opt*)>, view_operator_func=0x564efdf327e2 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /test/10.4_dbg/sql/sql_admin.cc:791 #18 0x0000564efdf96314 in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x147705815070) at /test/10.4_dbg/sql/sql_admin.cc:1415 #19 0x0000564efde4ea3d in mysql_execute_command (thd=thd@entry=0x147705815070) at /test/10.4_dbg/sql/sql_parse.cc:6098 #20 0x0000564efde51090 in mysql_parse (thd=thd@entry=0x147705815070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14772ca96460, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7896 #21 0x0000564efde53920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x147705815070, packet=packet@entry=0x147705857071 "", packet_length=packet_length@entry=47, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:1834 #22 0x0000564efde5735b in do_command (thd=0x147705815070) at /test/10.4_dbg/sql/sql_parse.cc:1352 #23 0x0000564efdf838b6 in do_handle_one_connection (connect=connect@entry=0x147729835790) at /test/10.4_dbg/sql/sql_connect.cc:1412 #24 0x0000564efdf839d6 in handle_one_connection (arg=0x147729835790) at /test/10.4_dbg/sql/sql_connect.cc:1316 #25 0x000014772bc956db in start_thread (arg=0x14772ca97700) at pthread_create.c:463 #26 0x000014772ae0fa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.1.47 (dbg), 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg) Bug confirmed not present in: MariaDB: 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (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)

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.