Commit e13c53a
Preserve decoded schema on Exec/Query request round-trip
The upstream C client sends schema=1 for ExecRequest / QueryRequest /
ExecSqlRequest / QuerySqlRequest regardless of param count, but the
Python encoder's count-based heuristic downgraded the schema byte to
0 on re-encode whenever params numbered <= 255. A proxy or mock
server that decoded then re-encoded a real client's bytes therefore
emitted a different wire shape than it received. Carry the decoded
schema on a private dataclass field and honour it on encode so the
round-trip stays byte-identical; default construction still uses the
count heuristic for callers that do not hold a hint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ff137e2 commit e13c53a
2 files changed
Lines changed: 102 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
| 213 | + | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| |||
217 | 225 | | |
218 | 226 | | |
219 | 227 | | |
220 | | - | |
| 228 | + | |
221 | 229 | | |
222 | 230 | | |
223 | 231 | | |
| |||
233 | 241 | | |
234 | 242 | | |
235 | 243 | | |
| 244 | + | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
240 | 249 | | |
241 | 250 | | |
| 251 | + | |
| 252 | + | |
242 | 253 | | |
243 | 254 | | |
244 | 255 | | |
| |||
252 | 263 | | |
253 | 264 | | |
254 | 265 | | |
255 | | - | |
| 266 | + | |
256 | 267 | | |
257 | 268 | | |
258 | 269 | | |
| |||
294 | 305 | | |
295 | 306 | | |
296 | 307 | | |
| 308 | + | |
297 | 309 | | |
298 | 310 | | |
299 | 311 | | |
300 | 312 | | |
301 | 313 | | |
| 314 | + | |
| 315 | + | |
302 | 316 | | |
303 | 317 | | |
304 | 318 | | |
| |||
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
317 | | - | |
| 331 | + | |
318 | 332 | | |
319 | 333 | | |
320 | 334 | | |
| |||
330 | 344 | | |
331 | 345 | | |
332 | 346 | | |
| 347 | + | |
333 | 348 | | |
334 | 349 | | |
335 | 350 | | |
336 | 351 | | |
337 | 352 | | |
| 353 | + | |
| 354 | + | |
338 | 355 | | |
339 | 356 | | |
340 | 357 | | |
| |||
350 | 367 | | |
351 | 368 | | |
352 | 369 | | |
353 | | - | |
| 370 | + | |
354 | 371 | | |
355 | 372 | | |
356 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
0 commit comments