-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dolt pull
fails in the presence of ignored tables
#7973
Comments
This is not a simple repro with merge. Trying pull next. $ dolt init --fun
Successfully initialized dolt data repository.
$ dolt sql -q "create table t (id int primary key, words varchar(100))"
$ dolt commit -Am "Added table"
commit 00bsg9s16meuesvdpldqgpokl9u9i2pe (HEAD -> main)
Author: timsehn <[email protected]>
Date: Fri Jun 07 09:57:09 -0700 2024
Added table
$ dolt branch test-branch
$ dolt sql -q "create table ignore_this (id int primary key, words varchar(100))"
$ dolt sql -q "INSERT INTO dolt_ignore VALUES ('ignore_*', true)"
Query OK, 1 row affected (0.01 sec)
$ dolt status
On branch main
Untracked tables:
(use "dolt add <table>" to include in what will be committed)
new table: dolt_ignore
$ dolt commit -Am "Added ignore_this table and added a rule in dolt_ignore"
commit pritv0h0vkk3h65pjijso5sl8lgcme2q (HEAD -> main)
Author: timsehn <[email protected]>
Date: Fri Jun 07 10:01:56 -0700 2024
Added ignore_this table and added a rule in dolt_ignore
$ dolt checkout test-branch
Switched to branch 'test-branch'
$ dolt sql -q "insert into t values (0, 'First row')"
Query OK, 1 row affected (0.00 sec)
$ dolt commit -am "Added a row"
commit mmb701tpfqekpsvgigahrf014qt34pbv (HEAD -> test-branch)
Author: timsehn <[email protected]>
Date: Fri Jun 07 10:02:40 -0700 2024
Added a row
$ dolt checkout main
Switched to branch 'main'
$ dolt merge test-branch
Updating 58s2crr0h65pir3k3ecb1rfnqqum6rb5..mmb701tpfqekpsvgigahrf014qt34pbv
commit 58s2crr0h65pir3k3ecb1rfnqqum6rb5 (HEAD -> main)
Merge: pritv0h0vkk3h65pjijso5sl8lgcme2q mmb701tpfqekpsvgigahrf014qt34pbv
Author: timsehn <[email protected]>
Date: Fri Jun 07 10:02:52 -0700 2024
Merge branch 'test-branch' into main
t | 1 +
1 tables changed, 1 rows added(+), 0 rows modified(*), 0 rows deleted(-)
$ dolt sql -q "create table ignore_that (id int primary key, words varchar(100))"
$ dolt status
On branch main
nothing to commit, working tree clean
$ dolt checkout test-branch
Switched to branch 'test-branch'
$ dolt sql -q "insert into t values (0, 'Second row')"
error on line 1 for query insert into t values (0, 'Second row'): duplicate primary key given: [0]
$ dolt sql -q "insert into t values (1, 'Second row')"
Query OK, 1 row affected (0.00 sec)
$ dolt commit -am "Added second row"
commit bhisqv0lv2k1v31glb35f5r4ckrvur15 (HEAD -> test-branch)
Author: timsehn <[email protected]>
Date: Fri Jun 07 10:04:29 -0700 2024
Added second row
$ dolt checkout main
Switched to branch 'main'
$ dolt merge test-branch
Updating bqddfg8sjdogdfi5ugpprjmdnsro8sda..bhisqv0lv2k1v31glb35f5r4ckrvur15
commit bqddfg8sjdogdfi5ugpprjmdnsro8sda (HEAD -> main)
Merge: 58s2crr0h65pir3k3ecb1rfnqqum6rb5 bhisqv0lv2k1v31glb35f5r4ckrvur15
Author: timsehn <[email protected]>
Date: Fri Jun 07 10:04:42 -0700 2024
Merge branch 'test-branch' into main
t | 1 +
1 tables changed, 1 rows added(+), 0 rows modified(*), 0 rows deleted(-)
$ dolt sql -q "show tables"
+-----------------------------+
| Tables_in_test_ignore_merge |
+-----------------------------+
| ignore_that |
| ignore_this |
| t |
+-----------------------------+ |
dolt pull
fails in the presence of ignored tables
I can reproduce the issue. It also reproduces with a local remote, which is a relief, and gives an unusual status message:
Definitely seems like |
This is fixed in the latest release. |
If you make tables ignored (add dolt_ignore to the table), then it is expected that they will not interfere with regular work with the repository and will be completely ignored by dolt, but they interfere and with the next dolt pull they will cause the error "Error 1105 (HY000): cannot merge with uncommitted changes", although the dolt status command shows a clear state.
I'm testing on a local computer with windows and dolt version 1.39.3.
The text was updated successfully, but these errors were encountered: