MDEV-40168 wip - #5620
Conversation
|
|
8a9c029 to
21cf57e
Compare
21cf57e to
d3452c7
Compare
| t1 CREATE TABLE `t1` ( | ||
| `c` int(11) DEFAULT NULL, | ||
| `j` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`j`)) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
There was a problem hiding this comment.
So, the index is now shown in SHOW CREATE TABLE ?
| show index from t1; | ||
| Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored | ||
| t1 1 invisible1 1 invisible1 A 0 NULL NULL YES BTREE NO | ||
| t1 1 idx 1 DB_MVI_1 NULL NULL NULL NULL YES FULLTEXT NO |
There was a problem hiding this comment.
Do I miss something or the table has TWO indexes? one BTREE and one FULLTEXT?
There was a problem hiding this comment.
It's a side effect of the debug_dbug:
DBUG_EXECUTE_IF("test_invisible_index",{
LEX_CSTRING temp= "invisible1"_Lex_ident_column;
mysql_add_invisible_index(thd, &alter_info->key_list
, &temp, Key::MULTIPLE);
});
TODOs on top of those in the patch diff: - EXPLAIN output should not say fulltext - check type match to avoid false negative / positive bugs in mysql - transcode the value into the index charset in mvi_encode_key
d3452c7 to
7cfaf2b
Compare
| } | ||
| if (matches.elements == 1) | ||
| cond= matches.pop(); | ||
| else |
There was a problem hiding this comment.
Note that this doesn't distinguish between AND/OR so for
explain select * from t100 where json_contains(js1->'$.tags', '"val-1"') OR json_contains(js2->'$.tags', '"val-2"');it will generate
json_contains(json_extract(t100.js1,'$.tags'),'"val-1"') or
json_contains(json_extract(t100.js2,'$.tags'),'"val-2"')) and
(match t100.DB_MVI_1 against ('76616c2d31' in boolean mode)) and
(match t100.DB_MVI_2 against ('76616c2d32' in boolean mode))
There was a problem hiding this comment.
Let's just generate nothing for top-level ORs for the moment.
TODOs on top of those in the patch diff: