Commit fa70db5
authored
Fix
`administer schema_repair()` had a bug where, if any repairs were
done, it set the in-memory schema to be the "reloaded_schema" used to
compare against for mismatches. This schema is equivalent to the
original, except that all of the ids were different.
This meant that any queries that were compiled using that schema would
be broken, and would try to query nonexistent tables.
This only affected the `administer` codepath; running `schema_repair`
as part of patches during version upgrades still worked.
If no uncached queries were compiled before the server was restarted,
this might not be noticed, which I suspect is what happened with
previous uses of `administer schema_repair()`.
Previously schema_repair was not really tested, since it typically
only does anything when a bug resulted in a broken schema.
I've added infrastructure for intentionally breaking the schema (by
UPDATEing the reflection schema), and a couple tests.administer schema_repair() (#8730)1 parent cce73c8 commit fa70db5
File tree
4 files changed
+129
-16
lines changed- edb/server
- compiler
- tests
4 files changed
+129
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
707 | | - | |
| 707 | + | |
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
1321 | | - | |
| 1321 | + | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
| |||
1386 | 1386 | | |
1387 | 1387 | | |
1388 | 1388 | | |
1389 | | - | |
| 1389 | + | |
1390 | 1390 | | |
1391 | 1391 | | |
1392 | 1392 | | |
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
| 1407 | + | |
1410 | 1408 | | |
1411 | 1409 | | |
1412 | 1410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12117 | 12117 | | |
12118 | 12118 | | |
12119 | 12119 | | |
| 12120 | + | |
| 12121 | + | |
| 12122 | + | |
| 12123 | + | |
12120 | 12124 | | |
12121 | 12125 | | |
12122 | 12126 | | |
| |||
12439 | 12443 | | |
12440 | 12444 | | |
12441 | 12445 | | |
| 12446 | + | |
| 12447 | + | |
| 12448 | + | |
| 12449 | + | |
| 12450 | + | |
| 12451 | + | |
| 12452 | + | |
| 12453 | + | |
| 12454 | + | |
| 12455 | + | |
| 12456 | + | |
| 12457 | + | |
| 12458 | + | |
| 12459 | + | |
| 12460 | + | |
| 12461 | + | |
| 12462 | + | |
| 12463 | + | |
| 12464 | + | |
| 12465 | + | |
| 12466 | + | |
| 12467 | + | |
| 12468 | + | |
| 12469 | + | |
| 12470 | + | |
| 12471 | + | |
| 12472 | + | |
| 12473 | + | |
| 12474 | + | |
| 12475 | + | |
| 12476 | + | |
| 12477 | + | |
| 12478 | + | |
| 12479 | + | |
| 12480 | + | |
| 12481 | + | |
| 12482 | + | |
| 12483 | + | |
| 12484 | + | |
| 12485 | + | |
| 12486 | + | |
| 12487 | + | |
| 12488 | + | |
| 12489 | + | |
| 12490 | + | |
| 12491 | + | |
| 12492 | + | |
| 12493 | + | |
| 12494 | + | |
| 12495 | + | |
| 12496 | + | |
| 12497 | + | |
| 12498 | + | |
| 12499 | + | |
| 12500 | + | |
| 12501 | + | |
| 12502 | + | |
| 12503 | + | |
| 12504 | + | |
| 12505 | + | |
| 12506 | + | |
| 12507 | + | |
| 12508 | + | |
| 12509 | + | |
| 12510 | + | |
| 12511 | + | |
| 12512 | + | |
| 12513 | + | |
| 12514 | + | |
| 12515 | + | |
| 12516 | + | |
| 12517 | + | |
| 12518 | + | |
| 12519 | + | |
| 12520 | + | |
| 12521 | + | |
| 12522 | + | |
| 12523 | + | |
| 12524 | + | |
| 12525 | + | |
| 12526 | + | |
| 12527 | + | |
| 12528 | + | |
| 12529 | + | |
| 12530 | + | |
| 12531 | + | |
| 12532 | + | |
| 12533 | + | |
| 12534 | + | |
| 12535 | + | |
| 12536 | + | |
| 12537 | + | |
| 12538 | + | |
| 12539 | + | |
| 12540 | + | |
| 12541 | + | |
| 12542 | + | |
| 12543 | + | |
| 12544 | + | |
| 12545 | + | |
| 12546 | + | |
| 12547 | + | |
| 12548 | + | |
| 12549 | + | |
| 12550 | + | |
| 12551 | + | |
| 12552 | + | |
| 12553 | + | |
| 12554 | + | |
| 12555 | + | |
| 12556 | + | |
| 12557 | + | |
| 12558 | + | |
| 12559 | + | |
| 12560 | + | |
| 12561 | + | |
| 12562 | + | |
| 12563 | + | |
| 12564 | + | |
| 12565 | + | |
| 12566 | + | |
12442 | 12567 | | |
12443 | 12568 | | |
12444 | 12569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18878 | 18878 | | |
18879 | 18879 | | |
18880 | 18880 | | |
18881 | | - | |
18882 | | - | |
18883 | | - | |
18884 | | - | |
18885 | | - | |
18886 | | - | |
18887 | | - | |
18888 | | - | |
18889 | | - | |
18890 | | - | |
18891 | 18881 | | |
18892 | 18882 | | |
18893 | 18883 | | |
| |||
0 commit comments