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

Unable to set statement_timeout #943

Closed
al-sabr opened this issue Nov 12, 2024 · 2 comments · Fixed by #947
Closed

Unable to set statement_timeout #943

al-sabr opened this issue Nov 12, 2024 · 2 comments · Fixed by #947
Assignees

Comments

@al-sabr
Copy link

al-sabr commented Nov 12, 2024

We started a thread concerning connection issues with HeidSQL and other GUI interface used to connect to doltgress.

https://discord.com/channels/746150696465727668/1305855201390886912

time="2024-11-12T19:23:33+01:00" level=warning msg="error running query" connectTime="2024-11-12 19:23:33.4210092 +0100 CET m=+392.647117201" connectionDb=doltgres connectionID=2 error="Variable 'statement_timeout' is a read only variable"

PR : #944

This is the debug log with HeidiSQL based on the previous PR username: doltgres pass: doltgress

time="2024-11-12T21:54:22+01:00" level=info msg=NewConnection DisableClientMultiStatements=true connectionID=1
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionID=1 query="SET database TO 'doltgres';"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 2 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SET database TO 'doltgres';"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SET database TO 'doltgres';"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 0 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SET database TO 'doltgres';"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"SELECT NOW()\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT NOW()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 1 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT NOW()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT NOW()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 1 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT NOW()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"SELECT 'citext'::regtype::oid\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT 'citext'::regtype::oid"
time="2024-11-12T21:54:22+01:00" level=warning msg="error running query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 error="type \"citext\" does not exist" query="SELECT 'citext'::regtype::oid"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT 'citext'::regtype::oid"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 0 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT 'citext'::regtype::oid"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"SELECT VERSION()\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT VERSION()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 1 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT VERSION()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT VERSION()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Query finished in 0 ms" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SELECT VERSION()"
time="2024-11-12T21:54:22+01:00" level=debug msg="Received message: {\"Type\":\"Query\",\"String\":\"SET statement_timeout TO 0\"}"
time="2024-11-12T21:54:22+01:00" level=debug msg="Starting query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 query="SET statement_timeout TO 0"
time="2024-11-12T21:54:22+01:00" level=warning msg="error running query" connectTime="2024-11-12 21:54:22.4457597 +0100 CET m=+16.282241701" connectionDb=doltgres connectionID=1 error="Variable 'statement_timeout' is a read only variable" query="SET statement_timeout TO 0"
time="2024-11-12T21:54:24+01:00" level=debug msg="Received message: {\"Type\":\"Terminate\"}"
time="2024-11-12T21:54:24+01:00" level=info msg=ConnectionClosed connectionID=1
@al-sabr al-sabr changed the title Connection issues on windows and may other platform. Connection issues on windows and maybe other platform. Nov 12, 2024
@zachmu zachmu assigned zachmu and fulghum and unassigned zachmu Nov 12, 2024
@fulghum fulghum changed the title Connection issues on windows and maybe other platform. Unable to set statement_timeout Nov 12, 2024
@fulghum
Copy link
Contributor

fulghum commented Nov 12, 2024

Thanks for reporting this bug @al-sabr. 🙏 Sure enough, we had an incorrect value configured for the statement_timeout setting, and that prevented users from being able to set it. I've fixed the configuration in #947 and added a test that asserts users can set the value.

When you pull the latest changes from main and rebuild, you should see this statement working. Let us know if you hit more issues with HeidiSQL and we'll be happy to dig in and get things working.

@al-sabr
Copy link
Author

al-sabr commented Nov 13, 2024

Thanks for reporting this bug @al-sabr. 🙏 Sure enough, we had an incorrect value configured for the statement_timeout setting, and that prevented users from being able to set it. I've fixed the configuration in #947 and added a test that asserts users can set the value.

Thank you for having fixed it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants