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

core cats: Add IF EXISTS in drop table statements #1035

Merged

Conversation

bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Dec 21, 2021

  • Using if exists avoid return of fatal error from database
    Allow the use of parameter ExitOnFatal = true on normal workflow

Signed-off-by: Bruno Friedmann bruno.friedmann@bareos.com

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

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)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

@bruno-at-bareos
Copy link
Contributor Author

Question: shall we add a systemtest for checking parameter ExitOnFatal = yes ?

@pstorz
Copy link
Member

pstorz commented Jan 10, 2022

Question: shall we add a systemtest for checking parameter ExitOnFatal = yes ?
What should be this test for? The ExitOnFatal works as we see in the bug report :)

@pstorz pstorz changed the title core cats: fix bug #1409 Add if exists in drop table statement core cats: fix bug #1409 Addif exists in drop table statements Jan 10, 2022
@pstorz pstorz changed the title core cats: fix bug #1409 Addif exists in drop table statements core cats: fix bug #1409 Add IF EXISTS in drop table statements Jan 10, 2022
@pstorz pstorz self-assigned this Jan 10, 2022
@bruno-at-bareos
Copy link
Contributor Author

Question: shall we add a systemtest for checking parameter ExitOnFatal = yes ?
What should be this test for? The ExitOnFatal works as we see in the bug report :)

The test would have to run bareos-dir with ExitOnFatal = on to check we don't introduce a new error afterwards. But this is certainly too nitpicky

Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Good work, makes sense. I have the following remarks:

@pstorz pstorz changed the title core cats: fix bug #1409 Add IF EXISTS in drop table statements core cats: Add IF EXISTS in drop table statements Jan 10, 2022
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/bug#1409_drop_table_if_exists branch from e1ac8fd to 080d157 Compare January 11, 2022 09:47
@bruno-at-bareos
Copy link
Contributor Author

bruno-at-bareos commented Jan 11, 2022

Everything should be now fixed

Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

The commit should contain a line

Fixes #1409: DB error on restore with ExitOnFatal=true

This will automatically link the commit with the mantis bug.
Other than this everything is fine!

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/bug#1409_drop_table_if_exists branch from 080d157 to 9c483bb Compare January 13, 2022 12:44
- Using if exists avoid return of fatal error from database
  Allow the use of parameter ExitOnFatal = true on normal workflow
- Fixes bareos#1409: DB error on restore with ExitOnFatal=true

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@pstorz pstorz force-pushed the dev/bruno/bug#1409_drop_table_if_exists branch from 9c483bb to f3c94c9 Compare January 13, 2022 13:14
@pstorz pstorz self-requested a review January 13, 2022 13:15
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Good work

@pstorz pstorz merged commit 946bf7d into bareos:master Jan 13, 2022
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/bug#1409_drop_table_if_exists branch January 13, 2022 16:53
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.

None yet

2 participants