dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.58k stars 498 forks source link

`dolt_status` table unhelpful during merge when there are constraint violations. #8114

Closed timsehn closed 2 weeks ago

timsehn commented 1 month ago

Repro:

  1. Clone https://www.dolthub.com/repositories/timsehn/three_way_merge
  2. In a sql server, merge fire-tim into main
    
    three_way_merge/main> call dolt_merge('fire-tim');
    +------+--------------+-----------+-----------------+
    | hash | fast_forward | conflicts | message         |
    +------+--------------+-----------+-----------------+
    |      | 0            | 1         | conflicts found |
    +------+--------------+-----------+-----------------+
    1 row in set (0.00 sec)

three_way_merge/main> select * from dolt_status; +------------+--------+----------+ | table_name | staged | status | +------------+--------+----------+ | employees | 0 | modified | +------------+--------+----------+ 1 row in set (0.00 sec)

This should say `constraint violation` in status instead of modified. In the case of a schema conflict it says:

three_way_merge/main> select * from dolt_status; +------------+--------+-----------------+ | table_name | staged | status | +------------+--------+-----------------+ | employees | 0 | schema conflict | +------------+--------+-----------------+