Commit 5154683
153365: sql/schemachanger: implement TRUNCATE in declarative schema changer r=fqazi a=fqazi
Previously, we only supported truncate in the legacy schema changer, which meant that automatic toggling o schema_locked was not supported. This meant certain ORM tests were failing attempting to truncate tables with automatic schema locked enabled. This patch adds support for TRUNCATE in the declarative schema changer in majority of cases, as long as the index does not have references via index hints.
Fixes: #153241
Fixes: #153248
fixes #153498
fixes #153411
fixes #153343
fixes #153333
fixes #153319
fixes #153318
Release note: None
153598: server: call WaitFor5NodeReplication in TestCheckRestartSafe r=dhartunian a=dhartunian
This test should call the more specialized method to avoid timing out when we're waiting for 5 nodes to replicate.
Epic: None
Resolves: #153523
Release note: None
Co-authored-by: Faizan Qazi <faizan@cockroachlabs.com>
Co-authored-by: David Hartunian <davidh@cockroachlabs.com>
File tree
35 files changed
+1171
-158
lines changed- pkg
- bench/rttanalysis/testdata
- ccl
- logictestccl/testdata/logic_test
- schemachangerccl/sctestbackupccl
- server
- application_api
- sql
- logictest/testdata/logic_test
- schemachanger
- scbuild
- internal/scbuildstmt
- scdeps/sctestdeps
- scexec
- scmutationexec
- scop
- scplan/internal
- opgen
- rules/current
- testdata
- testdata/end_to_end/truncate
- sem/tree
- tests
- testutils/serverutils
35 files changed
+1171
-158
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1566 | 1569 | | |
1567 | 1570 | | |
1568 | 1571 | | |
| |||
1572 | 1575 | | |
1573 | 1576 | | |
1574 | 1577 | | |
| 1578 | + | |
| 1579 | + | |
1575 | 1580 | | |
1576 | 1581 | | |
1577 | 1582 | | |
| |||
Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
448 | 452 | | |
449 | 453 | | |
450 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
384 | 382 | | |
385 | 383 | | |
386 | 384 | | |
| |||
569 | 567 | | |
570 | 568 | | |
571 | 569 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
576 | 573 | | |
577 | 574 | | |
578 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
200 | 203 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
205 | 212 | | |
206 | 213 | | |
207 | 214 | | |
| |||
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
213 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
214 | 225 | | |
215 | 226 | | |
216 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
255 | 256 | | |
256 | | - | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
756 | 769 | | |
757 | 770 | | |
758 | 771 | | |
| 772 | + | |
759 | 773 | | |
760 | 774 | | |
761 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| 147 | + | |
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
| |||
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
| 222 | + | |
215 | 223 | | |
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
219 | 227 | | |
220 | 228 | | |
| 229 | + | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
| |||
0 commit comments