Skip to content

[Bug] lost last used database when switch catalog back #14792

@Yulei-Yang

Description

@Yulei-Yang

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

mysql> switch internal;
Query OK, 0 rows affected (0.00 sec)

mysql> use db1;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> switch hive;
Query OK, 0 rows affected (0.01 sec)

mysql> switch internal;
Query OK, 0 rows affected (0.00 sec)

mysql> show tables;
ERROR 1046 (3D000): errCode = 2, detailMessage = No database selected

What You Expected?

fix it

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions