Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2008 at 21:08 UTC
Updated:
30 Nov 2008 at 04:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
webchickTagging for perusal later.
Comment #2
damien tournoud commentedThe merge fix is already in #332002: MergeQuery should refuse to execute if there are no key fields. But that issue is on the verge of derailing.
Comment #3
damien tournoud commentedComment #4
damien tournoud commentedOk, tested the affected part. Good to go.
Comment #5
damien tournoud commentedAnd again... :)
Comment #6
webchickCould someone explain this hunk?
Looks like that's meant to be a constant? or..?
Comment #7
webchickComment #8
lilou commentedSee this : http://fr2.php.net/manual/en/pdo.errorcode.php
and also : http://developer.mimer.com/documentation/html_92/Mimer_SQL_Engine_DocSet...
Comment #9
webchickOk cool. But it's wrapped in single quotes. Bug?
Comment #10
chx commentedPDO returns a message in the form 'SQLSTATE[42S02]: Base table or view not found', but neither the error code nor the error message are standardised across database engines. Not bug.
Comment #11
damien tournoud commentedAdded a code comment about that.
Comment #12
webchickWhile this is a blocker for SQLite, it's not a blocker for UNSTABLE-3. Adjusting title accordingly.
Comment #13
webchickTo clarify, this patch changes three things:
1) It removes the required bit from the username field in the database settings, since some database systems (such as SQLite) do not require it.
2) It fixes an incorrect merge query in aggregator module. This doesn't fire errors in MySQL because MySQL's merge implementation that relies on the internal mysql collisions and not the keys.
3) It genericizes an error check in one of the tests so that it works across database systems.
What befuddled me above was I wasn't counting arguments so thought 'SQLSTATE' was the message displayed when the assertion was triggered, not the error message to check for. It's kinda crappy that we can't get any more fine-grained than "SQLSTATE" because that'll likely be triggered for almost any error. However, Damien and chx told me that even the specific error number varies from platform to platform, so this is the best we can do for now. :\
Tonight I'm working on UNSTABLE-3 but can commit this tomorrow.
Comment #14
webchickOk, committed!