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

zero could be a value #32616

Open
wants to merge 2 commits into
base: 18.0
Choose a base branch
from

Conversation

rycks
Copy link
Contributor

@rycks rycks commented Jan 10, 2025

fix #32615 (i hope) :-)

there is a race condition with zero because empty(0) is true ... then we did not display the value

@rycks
Copy link
Contributor Author

rycks commented Jan 10, 2025

please wait i forget to do the "update/edit" part of the problem

image

but on clic on 'update' the value will become ''

image

@rycks
Copy link
Contributor Author

rycks commented Jan 10, 2025

the last commit do the job for edit step ... but there is something funny now when i try to update the row with "code zero" :

image

@hregis
Copy link
Contributor

hregis commented Jan 10, 2025

@rycks maybe the unique key for the field

@rycks
Copy link
Contributor Author

rycks commented Jan 10, 2025

@hregis No ... that is really a test :

image

now i have to find the reason why zero is prohibited and why some dictionnaries use that number :-)

@rycks
Copy link
Contributor Author

rycks commented Jan 10, 2025

@hregis ok but tinyint could store (int)0 as a value ... no ?

i dig into commit history, here is the origin of the test: 20 years before :-)

thanks to comments we could understand that race condition : zero and '' could not be desactivated entries ... that's not really what nowdays code do (without comment i can't imagine the real target of that code in current version) ...

image

@lvessiller-opendsi lvessiller-opendsi self-requested a review January 16, 2025 11:12
Copy link
Contributor

@lvessiller-opendsi lvessiller-opendsi left a comment

Choose a reason for hiding this comment

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

I'm ok with this fix.
@rycks
Have you something else to add for the error message when you update the dictionary line with "0" as code ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants