Commit 8b028b2
committed
fix(databases): scope result load to the target database
`databases load --result` (and `tables load --result`) hit the
connection-scoped load endpoint, where the server scopes a result-sourced
load by the X-Database-Id header. That header carried the ambient active
database, which may be unset or differ from the --catalog/--database
target, so the load could be rejected (missing scope) or resolve against
the wrong database.
Re-scope the load client to the resolved target database via the new
Api::scoped_to_database, so the load request always carries X-Database-Id
for the addressed database.1 parent 3a3d1a0 commit 8b028b2
2 files changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
612 | 625 | | |
613 | 626 | | |
614 | 627 | | |
| |||
1442 | 1455 | | |
1443 | 1456 | | |
1444 | 1457 | | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
1445 | 1482 | | |
1446 | 1483 | | |
1447 | 1484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1407 | 1412 | | |
1408 | 1413 | | |
1409 | 1414 | | |
| |||
2154 | 2159 | | |
2155 | 2160 | | |
2156 | 2161 | | |
2157 | | - | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
2158 | 2165 | | |
2159 | 2166 | | |
2160 | 2167 | | |
2161 | 2168 | | |
2162 | 2169 | | |
| 2170 | + | |
2163 | 2171 | | |
2164 | 2172 | | |
2165 | 2173 | | |
| |||
2177 | 2185 | | |
2178 | 2186 | | |
2179 | 2187 | | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
2180 | 2191 | | |
2181 | 2192 | | |
2182 | 2193 | | |
| |||
0 commit comments