fix: land pending community fixes (columns, numeric, IN-lists, packet_size, zeroize, bulk, …) - #434
Closed
MattJackson wants to merge 16 commits into
Closed
fix: land pending community fixes (columns, numeric, IN-lists, packet_size, zeroize, bulk, …)#434MattJackson wants to merge 16 commits into
MattJackson wants to merge 16 commits into
Conversation
tiberius-rs#380) (cherry picked from commit a9eb0bf) (cherry picked from commit dae6bdb)
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 (tiberius-rs#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)
…rius-rs#351, tiberius-rs#390, tiberius-rs#411) - header.rs: allow(dead_code) on PacketHeader::sspi (platform/feature-gated use) - connection.rs: drop needless reborrow in the zeroizing send path - row.rs: elide lifetime on get_column_data - rustfmt negative-numeric formatting from tiberius-rs#390 (cherry picked from commit 09079ca)
Additive helper from upstream tiberius-rs#430 (author Joel Parker Henderson): brings a SQL Server container up under podman or docker, defaults to arm64-friendly azure-sql-edge, and polls the log for readiness. (The cert-renewal part of tiberius-rs#430 is already covered by tiberius-rs#419.) (cherry picked from commit e22dbf9)
From upstream tiberius-rs#376 (author Eric Sheppard) — the numeric.rs IntoSql impl only; the PR's stale edits to CI/TLS files (already covered by tiberius-rs#419) are omitted. Lets a rust_decimal Decimal be bound directly in queries. (cherry picked from commit 54bf399)
(cherry picked from commit b114498)
This was referenced Sep 1, 2026
Contributor
Author
|
Superseded by #441. Re-opened as a native GitHub stacked PR (stack #445) per @aqrln's request in #440 — the fork origin of these PRs made a native stack impossible (GitHub can't add fork-head PRs to a stack), so the branches now live in |
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.