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

IBX-8566: Fixed postgres language limit #454

Merged
merged 9 commits into from
Nov 25, 2024

Conversation

reithor
Copy link
Contributor

@reithor reithor commented Nov 18, 2024

🎫 Issue IBX-8566

Main Issue was in following subquery:

(SELECT
    CASE
        WHEN (initial_language_id = :language_id AND (language_mask & :language_id) <> 0 )
        THEN (:language_id | 1)
        ELSE :language_id
    END
    FROM ezcontentobject
    WHERE id = :content_id)

When using postgres the parameter :language_id in THEN (:language_id | 1) is casted to INT.
This can cause a "Numeric value out of range" error.

PR makes this part db-platform aware - using cast(:language_id as BIGINT) for postgres.
(Note: cast(:language_id as BIGINT) would cause an error for mysql as mysql cast does not support BIGINT)

@reithor reithor force-pushed the ibx-8566_fixed-postgres-language-limit branch 2 times, most recently from 3175c5a to a188172 Compare November 18, 2024 10:29
@reithor reithor marked this pull request as ready for review November 18, 2024 13:16
@reithor
Copy link
Contributor Author

reithor commented Nov 18, 2024

Note: There are PR unrelated issues with twig/twig that let some tests fail.

@reithor reithor requested a review from a team November 18, 2024 13:20
@adamwojs adamwojs changed the title IBX-8566 fixed postgres language limit IBX-8566: Fixed postgres language limit Nov 18, 2024
@adamwojs adamwojs force-pushed the ibx-8566_fixed-postgres-language-limit branch from 861a196 to e4bada3 Compare November 19, 2024 16:30
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

From my side +1

@alongosz alongosz requested a review from a team November 20, 2024 09:03
@alongosz alongosz added the Bug Something isn't working label Nov 20, 2024
Copy link
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Reproduced and retested.

Checked on postgres and mysql.

@micszo micszo removed their assignment Nov 25, 2024
@alongosz alongosz merged commit eed0cea into 4.6 Nov 25, 2024
21 checks passed
@alongosz alongosz deleted the ibx-8566_fixed-postgres-language-limit branch November 25, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants