Commit 8dfdc02
committed
sql: use new increment when restarting sequence
Previously, if a sequence were restarted and its increment updated in
the same transaction (command), the old increment would be used to set
the value in KV.
This change corrects the `ALTER` DDL to use the new increment value.
Informs: #142914
Informs: #21564
Epic: CRDB-31283
Release note (sql change): Restarting a sequence with an updated
increment has the expected initial value.1 parent ef3f07e commit 8dfdc02
File tree
3 files changed
+17
-14
lines changed- pkg/sql
- logictest/testdata/logic_test
3 files changed
+17
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| |||
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
151 | | - | |
| 158 | + | |
152 | 159 | | |
153 | 160 | | |
154 | 161 | | |
| |||
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
160 | | - | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
177 | | - | |
| 184 | + | |
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
184 | | - | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| |||
209 | 216 | | |
210 | 217 | | |
211 | 218 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
1267 | 1268 | | |
1268 | 1269 | | |
1269 | 1270 | | |
1270 | | - | |
| 1271 | + | |
1271 | 1272 | | |
1272 | 1273 | | |
1273 | 1274 | | |
| |||
1288 | 1289 | | |
1289 | 1290 | | |
1290 | 1291 | | |
1291 | | - | |
| 1292 | + | |
1292 | 1293 | | |
1293 | 1294 | | |
1294 | 1295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4436 | 4436 | | |
4437 | 4437 | | |
4438 | 4438 | | |
4439 | | - | |
4440 | 4439 | | |
| 4440 | + | |
4441 | 4441 | | |
4442 | 4442 | | |
4443 | 4443 | | |
| |||
0 commit comments