-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix multi-valued index #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I sent a PR for the first fix some months ago but failed to fulfill the OCA, I wouldn't like to spend time on that again, you can just take those little patches as you will, they are licensed under GPL same with MySQL. Any review to the patches are very appreciated. |
Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at https://oca.opensource.oracle.com/ |
7560481
to
c93c00a
Compare
Bug report: https://bugs.mysql.com/bug.php?id=104700 The second commit fixes https://bugs.mysql.com/bug.php?id=104325 too. |
REF_ITEM was not considered in Item::can_be_substituted_for_gc() and get_gc_for_expr(), so optimizer failed to use multi-valued index in view.
Parameters in prepare statement are not constant literal but if they are constant during statement execution the multi-valued index should be picked. This also fixes Bug#104325.
…" expression "json_contains" and "json_overlaps" already works but "member of" didn't work.
…occurs in AND clause For a multi-valued index on json array field f=[1, 2], this statement wrongly returned empty result set: SELECT * FROM f WHERE JSON_CONTAINS(f, 1) AND JSON_CONTAINS(f, 2); The cause is `get_func_mm_tree()` converts two JSON_CONTAINS() to `f_idx = 1 AND f_idx = 2` which is impossible for single value index but possible for multi-valued index.
c93c00a
to
8bf7efe
Compare
@Dieken: |
@mysql-admin I just signed a new OCA, it's still under review, could you accelerate that? I have no idea why my last signing in June was rejected. |
@Dieken : Thanks for submitting the OCA - we will process it shortly and then the bot will ask you to confirm the contributions are under the terms of the OCA |
Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment: |
I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it. |
Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow |
These commits fixed four bugs in multi-valued index:
member of(col) OR member of(col)
WHERE func(...) AND func(...)
wherefunc
ismember of
,json_contains
orjson_overlaps
.