Problem/Motivation
When visiting /admin/config and the database contains at least one table name contains a semicolon a WSOD appears.
InvalidArgumentException: ; is not supported in SQL strings. Use only one statement at a time. in Drupal\Core\Database\Connection->preprocessStatement() (line 484 of core/lib/Drupal/Core/Database/Connection.php).
Drupal\Core\Database\Connection->prepareStatement() (Line: 664)
Drupal\Core\Database\Connection->query() (Line: 33)
Drupal\mysql\Hook\MysqlRequirements->getRuntimeRequirements() (Line: 35)
Drupal\mysql\Hook\MysqlRequirements->runtime()
call_user_func_array() (Line: 389)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 340)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 129)
Drupal\system\SystemManager->listRequirements() (Line: 112)
Drupal\system\SystemManager->checkRequirements() (Line: 116)
Drupal\system\Controller\SystemController->overview()
...
Filing under Mysql driver as it is the hook triggering the exception, however this could also be a fault in the Database subsystem in assuming all ; 'are attempts at multiple statements.
Steps to reproduce
- Have a database with a table name containing a semicolon (created outside of Drupal)
- visit
/admin/config - Observe WSOD/exception
Proposed resolution
MysqlRequirements hook should not cause a WSOD to propagate to the top of the stack..
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3594007
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nicxvan commentedDo you mean the table name? Or a column name?
Comment #3
cmlaraTable name.
Comment #4
larowlanThis falls outside the 80% use case and probably outside the 99.99% so marking as minor
Comment #7
dkmishra commentedComment #8
nicxvan commented