Allow consumers to pre-establish this version string based on the settings.php configuration for the database

Created on 29 May 2024, 3 months ago

Problem/Motivation

  • IIUC, the database connection logic in Drupal core depends on PDO's ATTR_SERVER_VERSION attribute to determine database language constructs etc. This attribute instantiates a connection and returns the version string using a SELECT query (generalization). This version string is then cached for subsequent queries for the life of the connection/

Steps to reproduce

  • Turn on the query logging feature of any database engine with drupal and see the SELECT like query for versions

Proposed resolution

  • Allow consumers to pre-establish this version string based on the settings.php configuration for the database

Remaining tasks

  • Write the test
  • Write the functionality
  • Replicate for each version of Drupal?

User interface changes

  • None

API changes

Data model changes

  • None

Release notes snippet

  • Developers can now specify an additional database option to specify the database engine, reducing the number of calls during connection instantiation
Feature request
Status

Active

Version

10.4

Component
Database 

Last updated less than a minute ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024