Skip to content
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

confusing error message when selecting from conflict tables with @@autocommit = true #2305

Closed
liuqianhong6007 opened this issue Oct 28, 2021 · 3 comments

Comments

@liuqianhong6007
Copy link

When I merge feature branch, some conflicts occurs. Then I can use select * from dolt_conflicts_mycolor to get the conflicts just as the following
image

Next the problem appears.
I use SELECT DOLT_MERGE('test2') to merge feature branch and an error of conflicts is expected. Then select * from dolt_conflicts_mycolor should get the same output as above. But this time followed by an unexpected error of merge has unresolved conflicts. please use the dolt_conflicts table to resolve
image

And in golang test, I also get the error when I try to find out the conflicts
image

If this is not a bug, hava any idea to advance my work ?

@zachmu
Copy link
Member

zachmu commented Oct 28, 2021

Hi @liuqianhong6007,

The reason you're seeing the error when you query the conflicts table is that @@autocommit is true (this is the default), so your client is trying to commit outstanding changes after every statement.

Use set @@autocommit = 0 instead.

We'll get a better error message for the client that mentions autocommit, this is confusing right now.

@zachmu zachmu changed the title "select * from dolt_conflicts_mydb" should't return conflicts followed by an error confusing error message when selecting from conflict tables with @@autocommit = true Oct 28, 2021
@liuqianhong6007
Copy link
Author

Hi @liuqianhong6007,

The reason you're seeing the error when you query the conflicts table is that @@autocommit is true (this is the default), so your client is trying to commit outstanding changes after every statement.

Use set @@autocommit = 0 instead.

We'll get a better error message for the client that mentions autocommit, this is confusing right now.

image

It works. But I think it is more appropriate that DOLT_MERGER throws an error that determines whether I should check conficts table, and while selecting conflict table it returns only conflicts without any error

@timsehn
Copy link
Sponsor Contributor

timsehn commented Aug 30, 2022

This error message is fixed in recent releases.

@timsehn timsehn closed this as completed Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants