Commit 95de116
committed
fix(db_sqlite): per_second_deltas survives schema mismatch
When a plugin's cumulative-counter cache table schema does not
match what the current plugin version expects, the internal
insert() call hits an OperationalError. With the default
delete_db_on_operational_error=True it then runs rm_db(conn) -
which closes the connection - and the explicit drop_table(conn) +
recreate path right below blew up with
sqlite3.ProgrammingError: Cannot operate on a closed database
Hit on production by mysql-aria. Fix: per_second_deltas calls
insert() with delete_db_on_operational_error=False so the
connection stays alive across the schema-mismatch error, and the
plugin-level drop+recreate path can do its work as intended.1 parent 08c2f65 commit 95de116
2 files changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
925 | 929 | | |
926 | 930 | | |
927 | 931 | | |
| |||
933 | 937 | | |
934 | 938 | | |
935 | 939 | | |
936 | | - | |
| 940 | + | |
937 | 941 | | |
938 | 942 | | |
939 | 943 | | |
| |||
0 commit comments