dolt: Autocommit blocks access to conflict resolution table

Autocommit (on by default) prevents transactions from executing when conflicts exists. This causes problems from select * from dolt_conflicts query which is needed to resolve said queries.

Repro below

create database test_db;
use test_db;

select dolt_checkout('main');
create table state_populations (state varchar(14) not null,population int,rate double,primary key (state));
insert into state_populations (state, population, rate) values ('Delaware', 59096, 0.98),('New Hampshire', 141885, 1.007);
select dolt_commit('-a', '-m', 'initial table for merge conflict path');
select dolt_checkout('-b', 'mybranch_2', 'main');
select dolt_checkout('-b', 'mybranch_1', 'main');

update state_populations set population = 200000 where state like 'New%';
select dolt_commit('-a', '-m', 'commit data to mybranch_1');
select dolt_checkout('main');
select dolt_merge('mybranch_1');
select dolt_commit('-m', 'dolt_commit merge mybranch_1');

select dolt_checkout('mybranch_2');

update state_populations set population = 300000 where state like 'New%';
select dolt_commit('-a', '-m', 'commit data to mybranch_2');
select dolt_checkout('main');
select dolt_merge('mybranch_2');
select * from dolt_conflicts;

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (14 by maintainers)

Most upvoted comments

We’re still going to fix the error message. Here’s the PR:

https://github.com/dolthub/dolt/pull/3413