Fixed parameters borked as soon as code was going through another sql(?) #1686
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.
Hi!
See this error message when having target versions & trying to resolve an issue via plugins/Source.
If you like to see, the parameter numbering goes up to 18, then another db action interrupts(uh, thats what I think, at least), and the parameter numbering starts from $1 again (at target_version).
I simply store the condition in a local variable and therefore have no need to restart db_param()
I am not sure if this is a good fix acording to your overall coding. Maybe I can also store db_param() somewhere, do another DB operation and pop it afterwards.
It would be good to have this fixed, it was at least disturbing plugins/Source.
Thank you,
Frank
LINE 11: target_version=$1,
^
DETAIL: integer gegen character varying for the query: UPDATE mantis_bug_table
SET project_id=$1, reporter_id=$2,
handler_id=$3, duplicate_id=$4,
priority=$5, severity=$6,
reproducibility=$7, status=$8,
resolution=$9, projection=$10,
category_id=$11, eta=$12,
os=$13, os_build=$14,
platform=$15, version=$16,
build=$17, fixed_in_version=$18,
target_version=$1,
view_state=$2,
summary=$3,
sponsorship_total=$4,
sticky=$5,
due_date=$6
WHERE id=$7.