open-vault/builtin/logical/database
Christopher Swenson aa6d61477e
VAULT-5827 Don't prepare SQL queries before executing them (#15166)
VAULT-5827 Don't prepare SQL queries before executing them

We don't support proper prepared statements, i.e., preparing once and
executing many times since we do our own templating. So preparing our
queries does not really accomplish anything, and can have severe
performance impacts (see
https://github.com/hashicorp/vault-plugin-database-snowflake/issues/13
for example).

This behavior seems to have been copy-pasted for many years but not for
any particular reason that we have been able to find. First use was in
https://github.com/hashicorp/vault/pull/15

So here we switch to new methods suffixed with `Direct` to indicate
that they don't `Prepare` before running `Exec`, and switch everything
here to use those. We maintain the older methods with the existing
behavior (with `Prepare`) for backwards compatibility.
2022-04-26 12:47:06 -07:00
..
dbplugin plugin/catalog: support plugin registration when type is explicitly provided (#14142) 2022-02-17 18:40:33 -08:00
backend.go feature: multiplexing support for database plugins (#14033) 2022-02-17 08:50:33 -06:00
backend_test.go Warnings indicating ignored and replaced parameters (#14962) 2022-04-11 09:57:12 -04:00
mocks_test.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
mockv4.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
mockv5.go db plugin multiplexing: add test coverage (#14330) 2022-03-03 08:40:46 -06:00
path_config_connection.go Ensure that URL encoded passwords are properly redacted. (#14744) 2022-03-29 10:33:55 -04:00
path_creds_create.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
path_roles.go Port: Premature Rotation For autorotate (#12563) 2021-09-21 17:45:04 -07:00
path_roles_test.go Port: Premature Rotation For autorotate (#12563) 2021-09-21 17:45:04 -07:00
path_rotate_credentials.go Port: Premature Rotation For autorotate (#12563) 2021-09-21 17:45:04 -07:00
rollback.go DB engine: Check ErrPluginStaticUnsupported in rollback code (#11601) 2021-05-12 17:09:56 -06:00
rollback_test.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
rotation.go Port: Premature Rotation For autorotate (#12563) 2021-09-21 17:45:04 -07:00
rotation_test.go VAULT-5827 Don't prepare SQL queries before executing them (#15166) 2022-04-26 12:47:06 -07:00
secret_creds.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
version_wrapper.go Check ErrPluginStaticUnsupported for fallback to RotateRootCredentials (#11585) 2021-05-12 15:22:41 -06:00
version_wrapper_test.go Check ErrPluginStaticUnsupported for fallback to RotateRootCredentials (#11585) 2021-05-12 15:22:41 -06:00
versioning_large_test.go db plugin multiplexing: add test coverage (#14330) 2022-03-03 08:40:46 -06:00