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.
When attempting to access "/admin/config" I get the message "The website encountered an unexpected error. Please try again later."
Logs tell me this:
PDOException: SQLSTATE[HY000]: General error: 1 near "SHOW": syntax error: SHOW VARIABLES WHERE variable_name = :name; Array ( [:name] => max_allowed_packet ) in views_data_export_requirements() (line 130 of sites/all/modules/views_data_export/views_data_export.install).
I am on Drupal 7.14 and using an SQLITE database.
I recently migrated from MYSQL database using dbtng_migrator module: http://drupal.org/project/dbtng_migrator
Comment | File | Size | Author |
---|---|---|---|
#4 | views_data_export-Fix_Mysql_specific_code-1690438-4.patch | 2.44 KB | Ben Coleman |
Comments
Comment #1
dsnoeck CreditAttribution: dsnoeck commentedSame issue with D 7.14 and PostgreSQL.
Side note: I have installed Drupal from the command line with Drush.
Comment #2
jamsilver CreditAttribution: jamsilver commentedHmm, it would appear that the technique we're using to auto-detect what mysql's max_allowed_packet size is not exactly compatible with all versions / alternatives of database backend. This code was added in #1421828: Warn if max allowed packet is too small.
I guess is the 'SHOW VARIABLES' syntax simply is unsupported in PostgreSQL and SQLITE.
At the very least we probably need to pop a try/catch around that line so if the db backend does throw an exception we don't cause a WSOD. Patches welcome!
Comment #3
robertwb CreditAttribution: robertwb commentedThanks jamsilver - I commented out the offending line in order to get mine to survive the fatal errors, but yours is of course the more corrtrect solution.
r.b.
Comment #4
Ben Coleman CreditAttribution: Ben Coleman commentedI ran into this after upgrading to the latest -dev on a PostgreSQL-based system. Not only is the SQL code MySQL-specific, the need is MySQL-specific - from what I've been able to find out PostgreSQL doesn't have the problem that this checks for. The attached patch checks the database type and only runs the code if MySQL is being used. I set it up as a switch/case so if there is similar code needed for other database types, there's a place to put it in.
Bumped the priority to major as this kills the status page on PostgreSQL.
Comment #5
tricasse CreditAttribution: tricasse commentedSame for a site installed with SQLite from the beginning. The patch in #4 works for me.
Comment #6
Steven Jones CreditAttribution: Steven Jones commentedGoing to get the testbot to review the patch...
Comment #7
Steven Jones CreditAttribution: Steven Jones commentedPatch looks good.
Comment #8
Steven Jones CreditAttribution: Steven Jones commentedThanks so much for the patch, fixed in 7.x-3.x.