Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
CREATE TABLE t (a INT, v BLOB NOT NULL, VECTOR INDEX (v)); |
INSERT INTO t VALUES (1,VEC_FROMTEXT('[0]')); |
|
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
|
UPDATE t SET v = VEC_FROMTEXT('[0,0]'); |
|
SELECT a, VEC_TOTEXT(v) FROM t; |
UPDATE t SET a = 2; |
|
# Cleanup
|
DROP TABLE t; |
bb-11.6-MDEV-32887-vector f20a1f4e94f5fc700959ff6b7945aa8a5fd0c307 |
UPDATE t SET v = VEC_FROMTEXT('[0,0]'); |
ERROR 22007: Incorrect vector value: '...' for column `test`.`t`.`v` at row 1 |
SELECT a, VEC_TOTEXT(v) FROM t; |
a VEC_TOTEXT(v)
|
1 [0.000000,0.000000]
|
UPDATE t SET a = 2; |
bug.vec10-1 [ fail ]
|
Test ended at 2024-09-27 17:16:09 |
|
CURRENT_TEST: bug.vec10-1
|
mysqltest: At line 8: query 'UPDATE t SET a = 2' failed: ER_KEY_NOT_FOUND (1032): Can't find record in 't' |
So, UPDATE from 1 to 2 dimensions failed, but the value was updated nevertheless.
And the next UPDATE causes a corruption-like error.
Attachments
Issue Links
- is blocked by
-
MDEV-33410 VECTOR data type
-
- Closed
-
- is caused by
-
MDEV-34939 vector search in 11.7
-
- Closed
-
- relates to
-
MDEV-35033 LeakSanitizer errors in my_malloc / safe_mutex_lazy_init_deadlock_detection / MHNSW_Context::alloc_node and alike
-
- Closed
-
it's a known deficiency, the code has a comment
"easiest" may be a wrong word here, there isn't much we can do for MyISAM, because the vector value is validated after was inserted into the main MyISAM table. With the VECTOR type we can do the validation before and this kind of corruptions will be impossible.