Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This removes the required username from installer (a followup patch, I presume, could add a validator for other DB), fixes up aggregator test and DrupalErrorHandlerUnitTest.
Comment | File | Size | Author |
---|---|---|---|
#11 | 333095-demeow.patch | 2.02 KB | Damien Tournoud |
demeowsqlite.patch | 1.62 KB | chx | |
Comments
Comment #1
webchickTagging for perusal later.
Comment #2
Damien Tournoud CreditAttribution: 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 CreditAttribution: Damien Tournoud commentedComment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedOk, tested the affected part. Good to go.
Comment #5
Damien Tournoud CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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!