Retrieving the CURRENT default database name
Meir Guttman <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <!&!AAAAAAAAAAAYAAAAAAAAAKC25OsDcMdGneFIQhy+Pc3CgAAAEAAAAKiDeOLHD/[email protected]> |
Dear mavens, My application interacts with a MySQL DBMS. There I am using subroutines and packages that set the various attributes passed to the DBI "connect" method. Also, I later switch databases based on a user's input by executing a "USE 'DB_name'" SQL statement. What I am after is a way to debug my application and/or log a particular run to verify what was actually selected as the "default database name" at any given juncture. A bug there might be devastating.... Unfortunately, a real SQL maven says (http://forums.mysql.com/read.php?10,571841,571848) that no SQL statement exists to retrieve the currently set database. I searched the web to find a way to do so, without success. Is there a DBI (or DBD?) way to do so? Regards Meir