Skip to content
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

Expression index may not be used by the optimizer if created and used in different connection charsets [CORE5122] #5406

Closed
firebird-automations opened this issue Feb 29, 2016 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @dyemanov

If the index expression contains a string literal, e.g. computed by (my_udf(my_field, 'ABC')) or computed by (my_field || 'ABC'), index is created in connection charset X but used in connections with charset other than X, then index and user expressions are considered different and index is not used by the optimizer.

This is a regression introduced in v2.5.3 as well as in v3.0.

Commits: 28f320e a866b02 e977efc FirebirdSQL/fbt-repository@8f6d4ac FirebirdSQL/fbt-repository@b352f37 FirebirdSQL/fbt-repository@e4200b1

====== Test Details ======

Confirmed:
wrong plan (natural scan) on: WI-V3.0.0.32358.
plan with index usage on: WI-T4.0.0.32371, WI-V2.5.6.26979.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0.0 [ 10740 ]

Fix Version: 2.5.6 [ 10721 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

Test Details: Confirmed:
wrong plan (natural scan) on: WI-V3.0.0.32358.
plan with index usage on: WI-T4.0.0.32371, WI-V2.5.6.26979.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

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