Merge doesn't validate not-null constraints for keyless tables
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
Repro:
```sql
CREATE TABLE aTable (aColumn INT NULL, bColumn INT NULL);
INSERT INTO aTable VALUES (1, 1);
CALL dolt_commit('-Am', 'add tables');
CALL dolt_checkout('-b', 'side');
INSERT INTO aTable VALUES (2,NULL);
CALL dolt_commit('-am', 'add side data');
CALL dolt_checkout('main');
ALTER TABLE aTable modify column bColumn INT NOT NULL;
CALL dolt_commit('-am', 'add main data');
CALL dolt_checkout('side');
SET @@dolt_force_transaction_commit=1;
-- This should return a response indicating a constraint violation, but instead it creates a new
call dolt_merge('main');
-- Looking at the table data shows the NULLs are in the table, even though the column does have the `NOT NULL ` constraint
select * from aTable;
show create table aTable;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.