fix: land pending community fixes (columns, numeric, IN-lists, packet_size, zeroize, bulk, …) - #441
Open
MattJackson wants to merge 17 commits into
Open
fix: land pending community fixes (columns, numeric, IN-lists, packet_size, zeroize, bulk, …)#441MattJackson wants to merge 17 commits into
MattJackson wants to merge 17 commits into
Conversation
This was referenced Sep 2, 2026
Closed
MattJackson
force-pushed
the
stack/s3
branch
from
September 2, 2026 19:34
b42bdfe to
3e29cb8
Compare
MattJackson
force-pushed
the
stack/s3
branch
3 times, most recently
from
September 2, 2026 21:17
6ece6d2 to
6954578
Compare
MattJackson
force-pushed
the
stack/s3
branch
from
September 2, 2026 23:54
1b5327d to
9afcb52
Compare
SQL Server has no array parameter, so an IN list must name one placeholder per value. Binding a comma-separated string to IN (@p1) matches nothing rather than failing, so every caller ends up writing the same format loop (#157). Adds four small, additive items to Query: Query::placeholders(first, count) -> String builds "@p1, @p2, @p3" Query::bind_iter(iter) binds each item in order Query::param_count() -> usize how many are bound Query::MAX_PARAMETERS: usize = 2100 the server's limit MAX_PARAMETERS matters most for exactly these runtime-sized statements: an IN list or a multi-row INSERT reaches the limit by data volume, on a batch that may be larger than any that was tested, and the server reports it only after the whole batch has been sent. No public API changes; nothing is renamed or removed. Eight unit tests and four doc tests, none of which need a server. (cherry picked from commit 9071362) (cherry picked from commit c90714a)
Add the ability to configure the TDS packet size in the LOGIN7 message. Larger packet sizes can significantly improve bulk insert performance by reducing network round-trips and protocol overhead. The default packet size remains 4096 bytes for backwards compatibility. Valid values are 512 to 32767 bytes. The server may negotiate a different size than requested. Example usage: ```rust let mut config = Config::new(); config.packet_size(32767); // Request 32KB packets ``` Performance testing showed that increasing packet size from 4KB to 16KB improved bulk insert throughput by ~40% (from 104K to 178K rows/sec for a 19.3M row dataset). (cherry picked from commit 23aedd6) (cherry picked from commit 6110ce9)
(cherry picked from commit b114498)
The bulk_insert and bulk_insert_columns doctests both created global temp
table ##bulk_test; run in parallel they raced and one hit error 2714
('object already exists'). Give each a distinct name so they never collide.
MattJackson
force-pushed
the
stack/s3
branch
from
September 3, 2026 00:01
9afcb52 to
35065b6
Compare
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.
A batch of community-contributed fixes, each kept as a standalone commit with its original author preserved:
occuredtypo (@DucMinhNe) · emptyinto_resultsQueryStream into_result doesn't return correct number of results #380 (ingrese1nombre) · column names likeEnd/ with spaces (@cjordan) · negative-Numeric sign/padding (@zuckschwerdt) · IN-list & 2100-param helpers (@joelparkerhenderson) · row-by-index accessors (LazyDope) · SSPI response header (@staticlibs) ·packet_sizeconfig (@johndauphine) · zeroize SQL password buffers (@lstkz) ·IntoSqlforrust_decimal(@esheppa) · bulk-insert column list (@NTmatter) ·test-server.shhelper (@joelparkerhenderson).Supersedes #296, #304, #351, #359, #376, #385, #388, #390, #400, #411, #423, #429.
Complementary — not superseded, please keep open: #387 (@polina-alekseeva-rogii) adds
]→]]escaping beyond #388.Sequential series — merge in order after #432, #433. Based on
main, so its diff reduces to its own 16 commits once the earlier PRs land.Reviewer note: please rebase-merge or merge-commit, not squash — these carry each contributor's authorship; squashing collapses that credit.