Treat autoremove builds query parameter as integer#1627
Merged
williamjallen merged 2 commits intoAug 9, 2023
Conversation
7a8c576 to
7dce1de
Compare
56e4c0c to
e56d936
Compare
zackgalbreath
approved these changes
Aug 9, 2023
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.
The query parameter for the limit clause in one of the build autoremoval scripts is currently being passed to the database as a string. This is problematic, and prints the following message to the logs:
production.ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''500'' at line 9MySQL does a limited amount of type conversion, but does not extend the type conversion to limit clauses. By passing the query parameter as an integer, the problem will be resolved.
I also addressed the only other case of this type of bug, even though it's not directly related to the bug report per se.
This PR is a good example of why passing numeric strings around is a bad idea...