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

  1. Have a database with a table name containing a semicolon (created outside of Drupal)
  2. visit /admin/config
  3. 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

Command icon 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

cmlara created an issue. See original summary.

nicxvan’s picture

Do you mean the table name? Or a column name?

cmlara’s picture

Issue summary: View changes

Table name.

larowlan’s picture

Priority: Normal » Minor

This falls outside the 80% use case and probably outside the 99.99% so marking as minor

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

Status: Active » Needs review
nicxvan’s picture

Issue tags: +Needs tests