-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
read_only mode in sql-server not working properly #4434
Comments
We agree this should't be possible. Do you mind including a complete repro? How you started the server and the logs from Otherwise, we'll play around and see if we can get a repro. |
Steps to reproduce the issue
dolt server configdatabases:
- path: .
name: default
behavior:
read_only: true
user:
name: b/KXkLAJo3EFS/wj+cVbcQ==
password: tc2cEcZFuZ2Fjj+Nxd7hog==
listener:
host: 0.0.0.0
port: 3335
tls_key: ...
tls_cert: ... |
Thanks for the repro. We'll dig into this today. |
So something a little more nuanced is going on: Shell 1:
Shell 2:
So, it's respecting read-only mode through a standard mysql client. Trying the crystal client now. |
I can repro. Step 1:
Step 2 (slightly modified
Step 3:
Step 4:
|
Here's the query in log level debug:
|
Also, we agree on the severity. This will be patched immediately once we figure out what is going on. |
Our current working hypothesis is the "prepared statement" path does not check for |
Looks like crystal is always sending Prepared statements even when there are no bind variables. We had a hole in our Nice find! |
This is patched and release in 0.50.1. Thanks for the bug report. |
When running a dolt database in
read_only
mode, it's not possible to insert new data using themysql
command line client. The following error is reported:ERROR 1105 (HY000): database server is set to read only mode
.When using the mysql client from the crystal language no error is reported and the row is inserted. Afterwards the changes are visible to the
mysql
command line client.It should never be possible to insert new data into a read only dolt database, even with an exotic client.
I' using dolt version 0.41.6 on a Mac M1.
The text was updated successfully, but these errors were encountered: