From f92a12c265608e4907e3cfde2ba878b59668dc19 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 10 Jul 2017 20:35:20 -0700 Subject: [PATCH] Disabled prepared statements in test Some tests may test migrations and change the types of columns. If this happens, Rails may cache a statement that will cause PostgreSQL to fail with the message, "cached plan must not change result type": https://github.com/rails/rails/issues/12330 This happened in https://gitlab.com/gitlab-org/gitlab-ee/issues/2890#note_34636077. --- config/database.yml.mysql | 1 + config/database.yml.postgresql | 1 + 2 files changed, 2 insertions(+) diff --git a/config/database.yml.mysql b/config/database.yml.mysql index db1b712d3bc..eb71d3f5fe1 100644 --- a/config/database.yml.mysql +++ b/config/database.yml.mysql @@ -42,3 +42,4 @@ test: &test password: # host: localhost # socket: /tmp/mysql.sock + prepared_statements: false diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql index c517a4c0cb8..4b30982fe82 100644 --- a/config/database.yml.postgresql +++ b/config/database.yml.postgresql @@ -46,3 +46,4 @@ test: &test username: postgres password: # host: localhost + prepared_statements: false