Commit 24beaf2
committed
issue2550727: db.newid is broken with sqlite.
Added proper transaction lock around the sql code to get a new id. The
the locking that pysqlite attempts had to be defeated because it is
broken. Had to explicitly manage transactions with BEGIN IMMEDIATE
and call sql_commit.
Note that this reduces performance by 30% in return for accuracy.
Also use update call set newid=newid+1 rather than incrementing in
python.1 parent 9ed3d9b commit 24beaf2
2 files changed
+30
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
283 | 289 | | |
284 | 290 | | |
285 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
369 | 383 | | |
370 | 384 | | |
371 | 385 | | |
372 | 386 | | |
373 | 387 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
377 | 391 | | |
378 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
379 | 400 | | |
380 | 401 | | |
381 | 402 | | |
| |||
0 commit comments