dolt icon indicating copy to clipboard operation
dolt copied to clipboard

`select * from dolt_status as of BRANCHNAME` shows status of currently checked out branch.

Open nicktobey opened this issue 6 months ago • 0 comments

To reproduce:

call dolt_branch('main');
call dolt_branch('other');
call dolt_checkout('main');
create table t(pk int primary key);
select * from dolt_status; -- 1
select * from dolt_status as of main; -- 2
select * from dolt_status as of other; -- 3
call dolt_checkout('other');
select * from dolt_status; -- 4
select * from dolt_status as of main; -- 5
select * from dolt_status as of other; -- 6

Expected behavior: selects (1), (2), and (5) are non-empty Actual behavior: selects (1), (2), and (3) are non-empty

The results seem to be based on the currently checked out branch, not the branch specified in the query.

Note that this only applies to as of. select * from dbname/main.dolt_status; works as expected.

nicktobey avatar Aug 18 '24 06:08 nicktobey