Skip to content

Conversation

ParadoxV5
Copy link
Contributor

@ParadoxV5 ParadoxV5 commented Oct 5, 2025

  • The Jira issue number for this PR is: MDEV-25674
    • cherry-picks mariadb-corporation/MariaDBEnterprise@2f8993c9ef.

Description

In the zero-assigning chain, the variable retry_count from MDEV-25674 is a ulong placed after a uint.
Assigning an unsigned long to an unsigned int is not safe in LP64. Moving the uints to after the ulongs in the chain solves this issue.

Release Notes

N/A, probably

How can this PR be tested?

PR quality check

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

In the zero-assigning chain, the variable `retry_count`
from MDEV-25674 is a `ulong` placed after a `uint`.

Assigning an `unsigned long` to an `unsigned int` is not safe in LP64.
Moving the `uint`s to after the `ulong`s in the chain solves this issue.

This commit is a cherry-pick of
mariadb-corporation/MariaDBEnterprise@2f8993c9ef.
@ParadoxV5 ParadoxV5 requested a review from vaintroub October 5, 2025 02:29
@ParadoxV5 ParadoxV5 added MariaDB Corporation Replication Patches involved in replication labels Oct 5, 2025
@ParadoxV5
Copy link
Contributor Author

@bnestere made this change in one of the Enterprise Server versions and asked me to port it to other versions as well, including the Community Server.

ES, I’m happy for just the sake of consistency, but CS…
Can you share your motivation, @bnestere? I thought this type mismatch doesn’t practically affect anything1, and compilers’ optimizations will probably hide it further.

Footnotes

  1. Implicit conversions § Integral conversions @ cppreference.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MariaDB Corporation Replication Patches involved in replication
Development

Successfully merging this pull request may close these issues.

2 participants