When determining which type of SQL that is to be generated, the db_driver() is used. What you really want/need is the type of the database not the driver.

DatabaseConnection::driver()
DatabaseConnection::databaseType()

db_driver() returns Database::getConnection()->driver();

Database::getConnection()->databaseType(); should be used instead. There's no shorthand function for this however.

Patch coming up ...

CommentFileSizeAuthor
#1 1905096-1-database-type.patch4.61 KBgielfeldt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gielfeldt’s picture

gielfeldt’s picture

Status: Active » Needs review
gielfeldt’s picture

Anyone?

gumanist’s picture

Status: Needs review » Reviewed & tested by the community

Working fine for me and patch by itself sounds reasonable

cmoad’s picture

I encountered this issue and this is a real problem that needs addressed. Please accept.

cafuego’s picture

Status: Reviewed & tested by the community » Fixed

Applied to 7.x-2.x.

cafuego’s picture

Issue summary: View changes

Fixed links

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.