Commit 9b8634b
authored
Merge 'translate/upsert: use emit_column_or_rowid for DO UPDATE row snapshot' from ongyimeng
- In core/translate/upsert.rs, conflicting-row snapshots now use
emit_column_or_rowid(...)
- Replaces manual Column { default: None } handling
- Adds regression test in testing/sqltests/tests/upsert.sqltest
- UPSERT was reading NULL in cases where SQLite expects the column’s
default value
- This happens for missing trailing column values after ALTER TABLE ...
ADD COLUMN ... DEFAULT ...
- The fix restores SQLite-compatible behavior
- Applies specifically to the DO UPDATE path of UPSERT
Issue #6087
Used AI to trace the issue to upsert.rs, propose the minimal fix, and
draft the regression test.
Closes #6118File tree
3 files changed
+18
-13
lines changed- core/translate
- testing/sqltests/tests
- snapshot_tests/returning/snapshots
3 files changed
+18
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
| 415 | + | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | 422 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
| 423 | + | |
433 | 424 | | |
434 | 425 | | |
435 | 426 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
| |||
0 commit comments