Makes actions PostgreSQL and ANSI compatible
rse - May 23, 2008 - 08:58
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | system.module |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
The admin/settings/actions/configure/ dialog (Admin -> Actions -> Configure) is broken because the "aid" field of the "actions" SQL table is a character type while the SQL query tries to use it as an integer type. This at least breaks with the "White Screen of Death" if Drupal is running on PostgreSQL. MySQL might be forgiving on those invalid uses, but PostgreSQL at least is strict enough here and rejects the query.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| drupal-admin-action-configure.patch | 603 bytes | Ignored | None | None |

#1
Actually, Drupal 6.2 incorrectly uses the "aid" field of the "actions" table at more code locations.
I append an updated patch named "drupal-action-aid.patch" which fixes all known locations now.
#2
Because this breaks the functionality on PostgreSQL, I agree that this is a critical issue.
Thanks for the patch, but be careful: there are unrelated changes in your patch to
{access}.aid(that is an integer). Marking at patch need work.Also, because that bug is also present in the current development branch (Drupal 7.x-dev), it has to be fixed first there, and then backported. This ensure that there is no regression between versions.
#3
Also note that {access}.aid is no longer in core for D7, but that shouldn't matter since it ought to not be in the patch anyway.
#4
I had a small quoting bug left in the last patch. I've now fixed this and also tested the
patch against Drupal 6.2 under run-time and now Drupal seems to work just fine on PostgreSQL.
No more breaks seen now.
#5
This still includes hunks affecting the {access} table (leaving at needs work).
#6
applied the patch in #4, in D6.2 and no more errors, it seems to work fine.
#7
Here is a proper patch.
Test results (on PostgreSQL 8.3):
Before: Actions configuration 30 passes, 8 fails, 0 exceptions
After: Actions configuration 37 passes, 0 fails, 0 exceptions
#8
Look good, still applied to HEAD, more tests passes so mark as RTBC.
#9
This can and should be applied to both D6 and D7, especially before we convert D7 queries to PDO.
#10
I've committed to DRUPAL-6 and CVS HEAD. Thanks rse and Damien! :)
#11
Automatically closed -- issue fixed for two weeks with no activity.