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

go/cmd/dolt: commands/sqlserver: Add configuration for disabling MULTI_STATEMENTS support on the server. #2454

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Dec 1, 2021

Currently sql-server parses some MULTI_STATEMENTS incorrectly, in particular
statements that include substatements get split up incorrectly. This adds
server configuration for the yaml config, so that multi-statement handling can
be disabled server-side. This will allow things like CREATE TRIGGERs submitted
with a client that advertises MULTI_STATEMENTS support to work correctly with
Dolt sql-server. However, if the client actually sends a multi-statement in
this mode, even two SELECTs separated by a ';', for example, while the server
is running in this mode, it will not work.

To enable, place:

behavior:
  disable_client_multi_statements: false

in the config.yaml for the server.

…I_STATEMENTS support on the server.

Currently sql-server parses some MULTI_STATEMENTS incorrectly, in particular
statements that include substatements get split up incorrectly. This adds
server configuration for the yaml config, so that multi-statement handling can
be disabled server-side. This will allow things like CREATE TRIGGERs submitted
with a client that advertises MULTI_STATEMENTS support to work correctly with
Dolt sql-server. However, if the client actually sends a multi-statement in
this mode, even two SELECTs separated by a ';', for example, while the server
is running in this mode, it will not work.

To enable, place:

```yaml
behavior:
  disable_client_multi_statements: false
```

in the config.yaml for the server.
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

host: "0.0.0.0"
port: $PORT
EOF
dolt sql-server --config ./config.yml &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use start_sql_server_with_config for this

@reltuk reltuk merged commit 5a3ee4d into main Dec 2, 2021
@Hydrocharged Hydrocharged deleted the aaron/sqlserver-cfg-disable-multi-statements branch December 8, 2021 07:15
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

Successfully merging this pull request may close these issues.

None yet

2 participants