-
Notifications
You must be signed in to change notification settings - Fork 256
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
fix sql error on bad virtualfull; detect parsing errors with strtod #1725
Merged
BareosBot
merged 10 commits into
bareos:master
from
sebsura:dev/ssura/master/fix-sql-error-on-bad-virtualfull
Jun 5, 2024
Merged
fix sql error on bad virtualfull; detect parsing errors with strtod #1725
BareosBot
merged 10 commits into
bareos:master
from
sebsura:dev/ssura/master/fix-sql-error-on-bad-virtualfull
Jun 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sebsura
commented
Mar 5, 2024
pstorz
requested changes
Mar 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I have enabled a former commented out test in test_edit.cc
and it fails. It seems that the last single 1 without modifier ist not accepted.
pstorz
requested changes
May 14, 2024
pstorz
approved these changes
May 16, 2024
sebsura
force-pushed
the
dev/ssura/master/fix-sql-error-on-bad-virtualfull
branch
2 times, most recently
from
May 24, 2024 07:46
3cb2429
to
e2c72d2
Compare
6 tasks
This way we are forced to always consider the fact that this member might not be set.
This way you can optionally ignore space at the end of the string.
Since we replaced jcr->dir_impl->previous_jcr with prev_jr, we also need to check that the functions we call do not expect it to be set like CreateRestoreBootstrap did.
sebsura
force-pushed
the
dev/ssura/master/fix-sql-error-on-bad-virtualfull
branch
from
June 5, 2024 05:32
e2c72d2
to
5877286
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to the Bareos Project!
This pr makes it so prev_jr an optional, so that code can check whether this particular member was initialized or not.
Previously the cleanup did not check whether prev_jr was initialised before it tried to clean it up (this happened if the
job ended in an error quickly).
It also changes the number parsing code somewhat. Now we check that everything is parsed, not just that something was parsed. In particular, with certain locales, we used to parse
1,5
as1
and did not emit any errors since we managed to parse something.Now we actually check if any characters are left over and fail the parsing if so.
Additionally a small enhancement was added to the parsing routines. Previously we could parse durations like
1 Year 5 Days 10 Hours
correctly, but we could not parse numbers like1 TB 500 GB
, since the code did not loop until every token was consumed. This PR unified the duration/number parsing somewhat so that now even numbers can be split like above.Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-tool
to have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests