Commit 3a91af6
155292: logical: external conn should not require db name r=msbutler a=kev-cao
LDR currently erroneously requires the db name in the external connection with setting up a bidirectional connection. This was determined to be caused by the fact that the privilege lookup on the source cluster was using unqualified table names during the reverse stream setup. This commit fixes the issue by using fully qualified table names.
Fixes: #152395
Release note: LDR no longer requires the database name to be specified in the external connection URI when setting up a bidirectional stream.
155537: sql/opt: fix RLS metadata clearing r=spilchen a=spilchen
This commit addresses two issues in the handling of RLS metadata in the sql/opt package:
- The RLS metadata was not being properly cleared after calling the Clear() function. This function is only used in test.
- Emitting RLS information during explain could theoretically result in a nil pointer dereference. While this path cannot be reached with a nil pointer under current conditions, the code was caught by an LLM. This change adds a defensive safeguard.
Closes #153192
Release note: none
Epic: none
Co-authored-by: Kevin Cao <39608887+kev-cao@users.noreply.github.com>
Co-authored-by: Matt Spilchen <matt.spilchen@cockroachlabs.com>
File tree
5 files changed
+71
-16
lines changed- pkg
- crosscluster/logical
- sql/opt
- exec/explain
- memo
5 files changed
+71
-16
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
362 | 364 | | |
363 | | - | |
| 365 | + | |
364 | 366 | | |
365 | | - | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1733 | 1733 | | |
1734 | 1734 | | |
1735 | | - | |
| 1735 | + | |
1736 | 1736 | | |
1737 | 1737 | | |
1738 | 1738 | | |
| |||
2905 | 2905 | | |
2906 | 2906 | | |
2907 | 2907 | | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1518 | 1521 | | |
1519 | | - | |
1520 | 1522 | | |
1521 | 1523 | | |
1522 | 1524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| 675 | + | |
| 676 | + | |
675 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
676 | 681 | | |
677 | 682 | | |
678 | 683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
0 commit comments