Details
- 
    Bug 
- 
    Status: Closed (View Workflow)
- 
    Critical 
- 
    Resolution: Fixed
- 
    10.5(EOL)
Description
| --source include/have_innodb.inc | 
|  | 
| CREATE TABLE t1 (a INT NOT NULL, UNIQUE(a)) ENGINE=InnoDB; | 
| # Optional, fails with an empty table as well | 
| INSERT INTO t1 VALUES (1),(2); | 
| DELETE FROM t1 ORDER BY a LIMIT 1; | 
|  | 
| # Cleanup | 
| DROP TABLE t1; | 
| 10.5 eb483c51 | 
| mysqld: /data/src/10.5/sql/sql_base.cc:1022: void close_thread_table(THD*, TABLE**): Assertion `!table->file->keyread_enabled()' failed. | 
| 200327 19:35:18 [ERROR] mysqld got signal 6 ; | 
|  | 
| #7  0x00007f2dab15ef12 in __GI___assert_fail (assertion=0x55d83faddf70 "!table->file->keyread_enabled()", file=0x55d83faddbf8 "/data/src/10.5/sql/sql_base.cc", line=1022, function=0x55d83fadfba0 <close_thread_table(THD*, TABLE**)::__PRETTY_FUNCTION__> "void close_thread_table(THD*, TABLE**)") at assert.c:101 | 
| #8  0x000055d83eca72e6 in close_thread_table (thd=0x7f2d74000b18, table_ptr=0x7f2d74000bf8) at /data/src/10.5/sql/sql_base.cc:1022 | 
| #9  0x000055d83eca71aa in close_thread_tables (thd=0x7f2d74000b18) at /data/src/10.5/sql/sql_base.cc:1008 | 
| #10 0x000055d83ed5b8be in mysql_execute_command (thd=0x7f2d74000b18) at /data/src/10.5/sql/sql_parse.cc:5976 | 
| #11 0x000055d83ed616b2 in mysql_parse (thd=0x7f2d74000b18, rawbuf=0x7f2d74013920 "DELETE FROM t1 ORDER BY a LIMIT 1", length=33, parser_state=0x7f2da46e3520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7953 | 
| #12 0x000055d83ed4cf03 in dispatch_command (command=COM_QUERY, thd=0x7f2d74000b18, packet=0x7f2d74008689 "DELETE FROM t1 ORDER BY a LIMIT 1", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1840 | 
| #13 0x000055d83ed4b639 in do_command (thd=0x7f2d74000b18) at /data/src/10.5/sql/sql_parse.cc:1359 | 
| #14 0x000055d83eeedcd5 in do_handle_one_connection (connect=0x55d8428874d8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1422 | 
| #15 0x000055d83eeeda04 in handle_one_connection (arg=0x55d8428874d8) at /data/src/10.5/sql/sql_connect.cc:1319 | 
| #16 0x000055d83f4215e4 in pfs_spawn_thread (arg=0x55d8427f7e08) at /data/src/10.5/storage/perfschema/pfs.cc:2201 | 
| #17 0x00007f2dad0e74a4 in start_thread (arg=0x7f2da46e4700) at pthread_create.c:456 | 
| #18 0x00007f2dab21bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
 | 
No obvious effect on a non-debug build.
The failure appeared in 10.5 tree with this commit:
| commit eb483c5181ab430877c135c16224284cfc517b3d | 
| Author: Monty <monty@mariadb.org> | 
| Date:   Fri Feb 28 12:59:30 2020 +0200 | 
|  | 
|     Updated optimizer costs in multi_range_read_info_const() and sql_select.cc
 | 
Attachments
Issue Links
- relates to
- 
                    MDEV-22077 Assertion `table->no_keyread || !table->covering_keys.is_set(tab->index) || table->file->keyread == tab->index' failed in join_read_first after upgrade from 10.1 -         
- Closed
 
-         
- 
                    MDEV-22237 Assertion `!table->file->keyread_enabled()' failed in handler::ha_reset on DELETE -         
- Closed
 
-