Skip to content

test: add SQL formatting tests#4052

Merged
wellwelwel merged 5 commits intosidorares:masterfrom
wellwelwel:perf
Feb 4, 2026
Merged

test: add SQL formatting tests#4052
wellwelwel merged 5 commits intosidorares:masterfrom
wellwelwel:perf

Conversation

@wellwelwel
Copy link
Collaborator

@wellwelwel wellwelwel commented Feb 4, 2026

Closes #1247.

In sqlstring, it skips formatting for null params in values, but proceeds with the logic for undefined.

This PR skips the formatting for undefined in the values parameter.

Edit: I just noticed the double operator for null ((undefined == null) === true).


#4051 mentions a blog that shows a potential vulnerability that can be resolved by a workaround, forcing the stringifyObjects option to true.

The new test proves this and also confirms that #1247 has been resolved over time.

Note

This PR doesn't cover the bug reported in #4051, but it serves as a precursor by recognizing the reported error and preparing tests for the subsequent fix for this matter.

@codecov

This comment has been minimized.

@wellwelwel wellwelwel changed the title perf: handle undefined values in SQL formatting test: add SQL formatting tests Feb 4, 2026
@wellwelwel wellwelwel marked this pull request as ready for review February 4, 2026 01:21
@wellwelwel wellwelwel merged commit b78e928 into sidorares:master Feb 4, 2026
104 checks passed
@wellwelwel wellwelwel deleted the perf branch February 4, 2026 02:08
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.

mysql2 does not appear to respect the "stringifyObjects" option

1 participant