fix sql error on bad virtualfull; detect parsing errors with strtod#1725
Merged
BareosBot merged 10 commits intobareos:masterfrom Jun 5, 2024
Merged
Conversation
sebsura
commented
Mar 5, 2024
pstorz
requested changes
Mar 28, 2024
Member
pstorz
left a comment
There was a problem hiding this comment.
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
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.
e2c72d2 to
5877286
Compare
This file contains hidden or 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
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,5as1and 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 Hourscorrectly, 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-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests