dolt
dolt copied to clipboard
Bad error message on `DROP DATABASE` when called on a database that initialized the sql-server
Repro.
Shell 1:
dolt_new $ mkdir drop_repro
dolt_new $ cd drop_repro/
drop_repro $ dolt init --new-format
Successfully initialized dolt data repository.
drop_repro $ dolt sql-server
Starting server with Config HP="localhost:3306"|T="28800000"|R="false"|L="info"
2022-09-12T15:38:49-07:00 INFO [conn 1] NewConnection {DisableClientMultiStatements=false}
2022-09-12T15:39:06-07:00 WARN [conn 1] error running query {connectTime=2022-09-12T15:38:49-07:00, connectionDb=drop_repro, error=database not found: drop_repro, query=drop database drop_repro}
Shell 2:
rollback $ mysql -h 127.0.01 -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.9-Vitess
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use drop_repro;
Database changed
mysql> drop database drop_repro;
ERROR 1105 (HY000): database not found: drop_repro
The error message should say Permission Denied: Can't drop the database while it's in use. or something like that.