Skip to content

MDEV-40168 wip - #5620

Draft
mariadb-YuchenPei wants to merge 2 commits into
mainfrom
bb-main-mdev-40168
Draft

MDEV-40168 wip#5620
mariadb-YuchenPei wants to merge 2 commits into
mainfrom
bb-main-mdev-40168

Conversation

@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor

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

@CLAassistant

CLAassistant commented Sep 1, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mariadb-YuchenPei
mariadb-YuchenPei force-pushed the bb-main-mdev-40168 branch 2 times, most recently from 8a9c029 to 21cf57e Compare September 1, 2026 06:51
@spetrunia
spetrunia self-requested a review September 1, 2026 09:05
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the index is now shown in SHOW CREATE TABLE ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather is NOT shown in SHOW CREATE TABLE

Comment thread mysql-test/main/multi_valued_index.result
Comment thread sql/opt_multi_valued_index.cc
@mariadb-YuchenPei
mariadb-YuchenPei force-pushed the bb-main-mdev-40168 branch 4 times, most recently from 344ad21 to 08d0e46 Compare September 3, 2026 07:45
Comment thread sql/sql_yacc.yy
@spetrunia

Copy link
Copy Markdown
Member

For the record: index is not visible in information_schema:

create table t25 (
  js json,
  key idx ((CAST(json_extract(js, '$.tags') AS CHAR(6) ARRAY)))
)engine=innodb;
select * from information_schema.statistics where table_name='t25'

gives nothing.

@spetrunia

Copy link
Copy Markdown
Member

And this crashes:

create table t25 (
  js json,
  key idx ((CAST(json_extract(js, '$.tags') AS CHAR(6) ARRAY)))
)engine=innodb;
insert into t25 values ('{}');

@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor Author

For the record: index is not visible in information_schema:

create table t25 (
  js json,
  key idx ((CAST(json_extract(js, '$.tags') AS CHAR(6) ARRAY)))
)engine=innodb;
select * from information_schema.statistics where table_name='t25'

gives nothing.

Isn't this the same problem as your other comment #5620 (comment)?

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
@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor Author

And this crashes:

create table t25 (
  js json,
  key idx ((CAST(json_extract(js, '$.tags') AS CHAR(6) ARRAY)))
)engine=innodb;
insert into t25 values ('{}');

Fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants