MySQL "USE dbname" command

[expired user #8018]'s profile image [expired user #8018] posted 10 years ago in General Permalink
Hi,
When I do the "USE dbname" command and I have done it in different databases there is no way that I can see which Database is currently selected.
Is it possible to highlight the database that is currently in use?
Hope I'm clear enough.
Thanks!
jfalch's profile image jfalch posted 10 years ago Permalink
quick fix: use query
SELECT Database()
ansgar's profile image ansgar posted 10 years ago Permalink
HeidiSQL should magically detect those USE queries and highlight the one in the left database tree. But that's broken somehow. I'm just going to fix that.
Code modification/commit from ansgar.becker, 10 years ago, revision 4763
Make detection of USE query more reliable, and implement it once for all descendants of TDBConnection. See also http://www.heidisql.com/forum.php?t=15530
ansgar's profile image ansgar posted 10 years ago Permalink
Should be fixed in r4763
[expired user #8018]'s profile image [expired user #8018] posted 10 years ago Permalink
Clicking on the database gives the following errors.

SELECT `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`='';
/* Result #1 fetched. */
/* Ping server ... */
SHOW TABLE STATUS FROM ``;
/* SQL Error (1102): Incorrect database name '' */
/* Ping server ... */
SHOW FUNCTION STATUS WHERE `Db`='';
/* Result #1 fetched. */
/* Ping server ... */
SHOW PROCEDURE STATUS WHERE `Db`='';
/* Result #1 fetched. */
/* Ping server ... */
SHOW TRIGGERS FROM ``;
/* SQL Error (1102): Incorrect database name '' */
/* Ping server ... */
SHOW EVENTS FROM ``;
/* SQL Error (1102): Incorrect database name '' */

Please login to leave a reply, or register at first.