镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: preserve percent values in bulk parameter binding - #17

Merged
sdojjy merged 1 commit into
tidbcloud:mainfrom
sdojjy:fix/percent-binding-regression-20261105
Nov 5, 2026
Merged

sdojjy merged 1 commit into
tidbcloud:mainfrom
sdojjy:fix/percent-binding-regression-20261105

Conversation

@sdojjy

@sdojjy sdojjy commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Bulk INSERT doubled percent signs in bound strings, so inserting 50% through executemany stored 50%% while a single INSERT stored 50%. Remove percent escaping from data values, decode compiled SQL percent escapes once, and decode the optimized batch prefix without rewriting bound data.

Validation:

  • PASS: 64 unit tests, including single/bulk values and compiled percent-containing identifiers.
  • PASS: real warehouse Core INSERT/SELECT, metadata reflection, ORM mapping and streamed results on SQLAlchemy 1.4.54 and 2.1.8.
  • PASS: original implementation reproduced the value mismatch; corrected implementation preserves quotes, backslashes, Unicode and percent signs.
  • PASS: whitespace checks.

@ti-chi-bot ti-chi-bot Bot added the size/M label Nov 5, 2026
@sdojjy
sdojjy merged commit 0eb624b into tidbcloud:main Nov 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant