Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 11.4
-
None
Description
Upon reading a vector key via HANDLER on an InnoDB table with PK, ER_GET_ERRNO "Operation not permitted" is returned, which may be expected; but in addition, errors and a warning are written into the error log which don't belong there if it's a case of an unsupported operation:
--source include/have_innodb.inc
|
|
CREATE TABLE t (a INT PRIMARY KEY, v BLOB NOT NULL, VECTOR(v)) ENGINE=InnoDB; |
HANDLER t OPEN; |
--error ER_GET_ERRNO
|
HANDLER t READ v NEXT; |
|
# Cleanup
|
DROP TABLE t; |
bb-11.6-MDEV-32887-vector 77be73c489fb7c21ca58e78cef10e0c166f293d8 |
HANDLER t READ v NEXT;
|
ERROR HY000: Got error 1 "Operation not permitted" from storage engine InnoDB
|
DROP TABLE t;
|
bug.vec6-4a [ fail ] Found warnings/errors in server log file!
|
Test ended at 2024-10-05 14:52:13
|
line
|
2024-10-05 14:52:12 4 [ERROR] InnoDB could not find key no 1 with name v from dict cache for table test/t
|
2024-10-05 14:52:12 4 [Warning] InnoDB: change_active_index(1) failed
|
There is another error in the log, which is globally suppressed in include/mtr_warnings.sql:
2024-10-05 14:57:27 4 [ERROR] InnoDB could not find key no 1 with name v from dict cache for table test/t
|
2024-10-05 14:57:27 4 [Warning] InnoDB: change_active_index(1) failed
|
2024-10-05 14:57:27 4 [ERROR] mysql_ha_read: Got error 1 when reading table 't'
|
On a MyISAM table, or on an InnoDB table without a primary key, it leads to the non-debug assertion failure instead:
CREATE TABLE t (a INT PRIMARY KEY, v BLOB NOT NULL, VECTOR(v)) ENGINE=MyISAM; |
HANDLER t OPEN; |
--error ER_GET_ERRNO
|
HANDLER t READ v NEXT; |
|
# Cleanup
|
DROP TABLE t; |
mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:4265: void pfs_end_table_io_wait_v1(PSI_table_locker*, ulonglong): Assertion `(state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)' failed.
|
241005 14:54:11 [ERROR] mysqld got signal 6 ;
|
|
#9 0x00007fb257453e32 in __GI___assert_fail (assertion=0x55aa08d473e0 "(state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)", file=0x55aa08d44520 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc", line=4265, function=0x55aa08d47340 "void pfs_end_table_io_wait_v1(PSI_table_locker*, ulonglong)") at ./assert/assert.c:101
|
#10 0x000055aa0739b6ff in pfs_end_table_io_wait_v1 (locker=0x7fb24c1b40e0, numrows=1) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:4265
|
#11 0x000055aa06baba36 in handler::ha_index_first (this=0x61d0002256b8, buf=0x61900009ddc8 "") at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:3927
|
#12 0x000055aa06136ace in mysql_ha_read (thd=0x62c0000c0218, tables=0x6290000e63c0, mode=RFIRST, keyname=0x6290000e6ad8 "v", key_expr=0x0, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_handler.cc:914
|
#13 0x000055aa06219d48 in mysql_execute_command (thd=0x62c0000c0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:5447
|
#14 0x000055aa06229bfa in mysql_parse (thd=0x62c0000c0218, rawbuf=0x6290000e6238 "HANDLER t READ v NEXT", length=21, parser_state=0x7fb24c1b59f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
|
#15 0x000055aa06200c1c in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x629000253219 "", packet_length=21, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
|
#16 0x000055aa061fd930 in do_command (thd=0x62c0000c0218, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1405
|
#17 0x000055aa066ed189 in do_handle_one_connection (connect=0x6080000034b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
|
#18 0x000055aa066ecb4a in handle_one_connection (arg=0x608000003438) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
|
#19 0x000055aa07390672 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
|
#20 0x00007fb2574a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#21 0x00007fb25752861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Attachments
Issue Links
- relates to
-
MDEV-34939 vector search in 11.7
- In Testing