[drupal-devel] [bug] have db_prefix_tables() handle 'default' key not being set
Issue status update for http://drupal.org/node/19609 Project: Drupal Version: cvs Component: base system Category: bug reports Priority: normal Assigned to: Anonymous Reported by: danielc Updated by: danielc Status: patch And the patch to issue 19474 (http://drupal.org/node/19474) contains a patch to provide such information to settings.php. danielc Previous comments: ------------------------------------------------------------------------ March 28, 2005 - 16:24 : danielc Attachment: http://drupal.org/files/issues/database.diff (720 bytes) The db_prefix_tables() function in includes/database.inc generates notices if $db_prefix['default'] is not set. This patch fixes that problem. This has a side benefit of making $db_prefix easier to use. ------------------------------------------------------------------------ March 28, 2005 - 17:06 : moshe weitzman nice ... this has been a bit a pimple for a while. ------------------------------------------------------------------------ March 29, 2005 - 10:40 : danielc Attachment: http://drupal.org/files/issues/database2.diff (1.17 KB) I've come up with a new version of the patch that optimizes the speed of the whole function. ------------------------------------------------------------------------ March 29, 2005 - 10:56 : danielc Change Version from "4.5.2" to "cvs". ------------------------------------------------------------------------ March 29, 2005 - 11:01 : danielc Pardon me, I'm testing if this goes the drupal-dev list now that the version is "cvs." ------------------------------------------------------------------------ April 3, 2005 - 07:45 : Dries Any idea of how much faster the second patch is? I don't think it makes a real difference in which case I'd favor the first patch. ------------------------------------------------------------------------ April 3, 2005 - 13:40 : danielc The speed increase is 5%. ------------------------------------------------------------------------ April 3, 2005 - 13:52 : Dries 5% compared to what? What did you measure? ------------------------------------------------------------------------ April 3, 2005 - 23:56 : danielc I tested the db_prefix_tables() function in two configurations. With my first patch applied and with my second patch applied. The second patch is 5% faster than the first. This improvement is the same for both the string and array formats of $db_url. ------------------------------------------------------------------------ April 7, 2005 - 19:43 : danielc Can this please be applied to 4-6 and HEAD? ------------------------------------------------------------------------ April 8, 2005 - 06:34 : Dries I was checking settings.php to read up on how to use $db_prefix but noticed that only the 'simple' case was documented. The fact that $db_prefix can be an array isn't explained anywhere (not in the phpdoc of db_prefix_tables() and not in settings.php). Where did that go? I wanted to check what the documentation had to say on the availability of a 'default' entry ... ------------------------------------------------------------------------ April 8, 2005 - 07:11 : moshe weitzman docs in the administrators guide - http://drupal.org/node/2622
participants (1)
-
danielc