-
Notifications
You must be signed in to change notification settings - Fork 680
Closed
Description
Currently when your connection is lost and a reconnect occurs, mycli thinks you are still connected to a database, while the connection itself does not:
MySQL scottn@localhost:(none)> use dev;
You are now connected to database "dev" as user "scottn"
Time: 0.001s
MySQL scottn@localhost:dev> select * from t2;
+----+
| id |
+----+
| 2 |
| 2 |
+----+
2 rows in set
Time: 0.004s
MySQL scottn@localhost:dev> select * from t2;
Reconnecting...
Reconnected successfully.
Any session state was reset.
(1046, 'No database selected')
MySQL scottn@localhost:dev>
This should be fixable by using the connection.select_db() method after the connection.ping(reconnect=True) is sent.
Metadata
Metadata
Assignees
Labels
No labels