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

a view referencing non-existing table causes restarted server to be not connectable by MySQL client #6920

Open
jennifersp opened this issue Oct 31, 2023 · 0 comments
Labels
bug Something isn't working sql server Issues related to the built in SQL server

Comments

@jennifersp
Copy link
Contributor

jennifersp commented Oct 31, 2023

MySQL client does automatic rehashing by default, which sends SELECT * FROM <table_name> LIMIT 0 over the wire for for every table on the database. If there is a view that references non-existing table, it crashes the client with ERROR 2008 (HY000): MySQL client ran out of memory error message.

Repro:

create table t (pk int primary key);
create view v as select * from t;
rename table t to tt;

then restart the server. After restarting the server, run SELECT 1 or any query.

Note:
show create view v should still work with a warning, but currently in Dolt it throws an error, which causes the client not be able to connect to the restarted server.

Workaround is to use mysql client with -A flag option, which disables automatic rehashing.

@jennifersp jennifersp added bug Something isn't working sql server Issues related to the built in SQL server labels Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sql server Issues related to the built in SQL server
Projects
None yet
Development

No branches or pull requests

1 participant