Repository navigation
Commit a04832b
fix(connection): validate settings in the setter and keep one timeout value
set_query_timeout() and set_max_threads_for_exec() now check the value
before queueing it: an integer (TypeError otherwise) between 0 and
2**64 - 1 (ValueError otherwise). Only the native call is deferred to the
next query. Before, a bad value surfaced on the next execute() on the
pybind backend (TypeError from the uint64 conversion), and the C-API
backend wrapped negative values into huge ones. Negative values now raise
ValueError on both backends.
The connection no longer keeps its own copy of the timeout: the C-API
short-circuit reads the backend connection's value, which is set when the
native setter runs, so both backends see the timeout from the same point.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent d1d0462 commit a04832b
2 files changed
Lines changed: 53 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
388 | 398 | | |
389 | 399 | | |
390 | 400 | | |
| |||
410 | 420 | | |
411 | 421 | | |
412 | 422 | | |
413 | | - | |
414 | 423 | | |
415 | 424 | | |
416 | 425 | | |
| |||
474 | 483 | | |
475 | 484 | | |
476 | 485 | | |
477 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
478 | 495 | | |
479 | 496 | | |
| 497 | + | |
480 | 498 | | |
481 | 499 | | |
482 | | - | |
| 500 | + | |
483 | 501 | | |
484 | 502 | | |
485 | 503 | | |
| |||
1005 | 1023 | | |
1006 | 1024 | | |
1007 | 1025 | | |
1008 | | - | |
| 1026 | + | |
1009 | 1027 | | |
1010 | 1028 | | |
1011 | 1029 | | |
| |||
1213 | 1231 | | |
1214 | 1232 | | |
1215 | 1233 | | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
1216 | 1241 | | |
| 1242 | + | |
1217 | 1243 | | |
1218 | | - | |
1219 | 1244 | | |
1220 | | - | |
| 1245 | + | |
1221 | 1246 | | |
1222 | 1247 | | |
1223 | 1248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
0 commit comments