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.
A method is called incorrectly in mysql columnExists(). The resulting error message is An error occurred. Fatal error: Call to undefined method DatabaseSchema_mysql::escapeTable() in /includes/database/mysql/schema.inc on line 22
It's a minor bug but is blocking at least one other patch from being reviewed.
Comment | File | Size | Author |
---|---|---|---|
#7 | d7-testExists.patch | 1.33 KB | mfb |
#5 | d7-testExists.patch | 1.33 KB | mfb |
#3 | d7-testExists.patch | 1.2 KB | mfb |
d7.escapeTable.patch | 921 bytes | mfb | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedGood catch. Did you check the other database layers to make sure there are no copy-paste errors made? :)
I've committed this patch to CVS HEAD.
Seems like we did not have tests for this so I'm marking this 'code needs work'. Hopefully tests still follow.
Comment #2
mfbpgsql uses db_escape_table(). Is that the preferred way to call escapeTable()? If so I should reroll the patch. Test to follow..
Comment #3
mfbSeems like there's a need for unit tests for each function in the db layer. For now I added some tests for db_*_exists() to the regression tests.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedThe last submitted patch failed testing.
Comment #5
mfbhere's a reroll splitting it up into two different test methods. note, maybe these should go in some unit test class rather than regression test class.
Comment #7
mfbComment #8
catchPatch looks good, test passes. RTBC.
Comment #9
Dries CreditAttribution: Dries commentedThanks for the follow-up, mfb. Committed to CVS HEAD. Thanks.