[drupal-devel] [bug] db_set_active acting strangely/not working
Issue status update for http://drupal.org/node/20235 Project: Drupal Version: cvs Component: database system Category: bug reports Priority: critical Assigned to: chx Reported by: jakeg Updated by: jakeg Status: patch legend jakeg Previous comments: ------------------------------------------------------------------------ April 9, 2005 - 20:50 : jakeg As per my forum posting at http://drupal.org/node/20211 , db_set_active isn't working, and is in fact acting extremely strangely. I've never used it before, so maybe I'm using it wrong, but I've looked at the contributed drupal docs and I believe I have the correct usage. See http://drupal.org/node/20211 for details. Jake. ------------------------------------------------------------------------ April 9, 2005 - 21:09 : jakeg This problem persists and hence is not related to my other problem I had concurrently (http://drupal.org/node/20233) which has now been resolved for me. ------------------------------------------------------------------------ April 10, 2005 - 07:57 : jakeg [GRRRRR... I just posted a long explanation of this problem only to get /Terminated request because of suspicious input data./, and when I pressed the back button my response was gone. Damn it!!! That took about half an hour to write and I don't have time to write it all again now] ------------------------------------------------------------------------ April 11, 2005 - 08:14 : jakeg some more detail: settings.php: ... $db_url['default'] = 'mysql://[snip]@localhost/local_aspodrupal'; $db_url['depletion'] = 'mysql://[snip]@localhost/local_aspo'; ... mymodule.module: ... // Switch to the depletion database to perform some queries db_set_active('depletion'); // [run a query on my custom db, or even do nothing and i still have the problem] // switch back to the default drupal database db_set_active('anything-but-default'); ... ... the code above works, but the last line should be, as far as I can understand, db_set_active('default'), but that causes errors. If I ue anything-but-default then it works. Jake ------------------------------------------------------------------------ April 13, 2005 - 16:39 : chx Yes. Working on this. ------------------------------------------------------------------------ April 13, 2005 - 18:44 : chx Attachment: http://drupal.org/files/issues/db_set_active.patch (760 bytes)
participants (1)
-
jakeg