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

    XMLWordPrintable

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

            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.