Skip to content

Added prepare_cached as a wrapper to the DBConnect.pm module

Created by: markmcdowall

Description

Added a new wrapper function to the DBConnection.pm module for the prepare_cached so that the statements do not need to get prepared multiple times.

Also no trailing whitespace.

Use case

This should help for loading of data and querying of the database in pipelines where there are multiple requests using the same statement that changes the variables.

Benefits

Should improve the responsiveness of queries that run multiple times

Possible Drawbacks

Theoretically none. Would only affect those that decide to use it. It should have no effect on those that do not use it.

Testing

A new test has been added. Tests should not be run with the 4.050 version of the DBD MySQL driver as there appears to be a wider bug in this code.

Merge request reports