[drupal-devel] [bug] Bootstrap totally broken with PostgreSQL
plj
drupal-devel at drupal.org
Fri Aug 5 15:50:42 UTC 2005
Issue status update for
http://drupal.org/node/28274
Post a follow up:
http://drupal.org/project/comments/add/28274
Project: Drupal
Version: cvs
Component: base system
Category: bug reports
Priority: critical
Assigned to: Anonymous
Reported by: plj
Updated by: plj
Status: patch (code needs work)
Attachment: http://drupal.org/files/issues/bootstrap.inc_6.patch (1.41 KB)
Whoops, managed to write 'EXCLUSIVE ACCESS' instead of 'ACCESS
EXCLUSIVE'. And 'IN MODE' is not really necessary, as the strictest
locking mode is default, if nothing is defined.
Here is a patch that actually works.
Unfortunately, it seems that there is no standard table locking syntax
that both MySQL [1] and PostgreSQL [2] would accept. Perhaps we need
some other way to implement cache_set() and variable_set()?
[1] http://dev.mysql.com/doc/mysql/en/table-locking.html
[2] http://www.postgresql.org/docs/8.0/interactive/sql-lock.html
plj
Previous comments:
------------------------------------------------------------------------
Fri, 05 Aug 2005 15:06:08 +0000 : plj
Attachment: http://drupal.org/files/issues/bootstrap.inc_4.patch (986 bytes)
Just cheked out today's HEAD, installed, and attempted to access main
page. Results:
[client 10.10.59.23] PHP Notice: Undefined variable: _SESSION in
/var/www/drupal_HEAD/includes/bootstrap.inc on line 771
[client 10.10.59.23] PHP Notice: Undefined variable: _SESSION in
/var/www/drupal_HEAD/includes/bootstrap.inc on line 771
[client 10.10.59.23] PHP Notice: Undefined variable: _SESSION in
/var/www/drupal_HEAD/includes/bootstrap.inc on line 771
[client 10.10.59.23] PHP Warning: pg_query(): Query failed: ERROR:
syntax error at or near "cache" at character 13 in
/var/www/drupal_HEAD/includes/database.pgsql.inc on line 69
[client 10.10.59.23] PHP Fatal error: ERROR: syntax error at or near
"cache" at character 13\nquery: LOCK TABLES cache WRITE in
/var/www/drupal_HEAD/includes/database.pgsql.inc on line 86
[client 10.10.59.23] PHP Notice: Undefined property: cache in
/var/www/drupal_HEAD/includes/session.inc on line 45
[client 10.10.59.23] PHP Warning: pg_query(): Query failed: ERROR:
syntax error at or near "cache" at character 13 in
/var/www/drupal_HEAD/includes/database.pgsql.inc on line 69
[client 10.10.59.23] PHP Fatal error: ERROR: syntax error at or near
"cache" at character 13\nquery: LOCK TABLES cache WRITE in
/var/www/drupal_HEAD/includes/database.pgsql.inc on line 86
[client 10.10.59.23] PHP Warning: pg_query(): Query failed: ERROR:
syntax error at or near "cache" at character 13 in
/var/www/drupal_HEAD/includes/database.pgsql.inc on line 69
[client 10.10.59.23] PHP Fatal error: ERROR: syntax error at or near
"cache" at character 13\nquery: LOCK TABLES cache WRITE in
/var/www/drupal_HEAD/includes/database.pgsql.inc on line 86
This is because bootstap.inc uses LOCK/UNLOCK TABLES, but PostgreSQL
does not support this syntax. I've attached a patch that fixes the
problem on pgsql, but this probably still needs work as it most likely
won't work on MySQL as such.
------------------------------------------------------------------------
Fri, 05 Aug 2005 15:24:26 +0000 : plj
Attachment: http://drupal.org/files/issues/bootstrap.inc_5.patch (1.46 KB)
Actually, it seems there are two such problems (LOCK TABLES) in
bootstrap.inc. Here is a better patch, that fixes them both. Same
limitations apply as above, though.
More information about the drupal-devel
mailing list