From 327959e961f9aa624e2bfa3071127e0278437131 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 6 Dec 2021 13:18:36 +0100 Subject: [PATCH] Catch output variation for recent MariaDB server changes MariaDB 10.5 prints "Unknown server host" instead of "Unknown MySQL server host". We are already normalizing the error message in tests, accept that form as well. Regression diff observed was: -NOTICE: failed to connect to MySQL: Unknown MySQL server host 'localhos' +NOTICE: failed to connect to MySQL: Unknown server host 'localhos' (-2) --- expected/connection_validation.out | 2 +- sql/connection_validation.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/expected/connection_validation.out b/expected/connection_validation.out index 234f4c8..ea8d792 100644 --- a/expected/connection_validation.out +++ b/expected/connection_validation.out @@ -34,7 +34,7 @@ $$ BEGIN SELECT * FROM f_mysql_test ORDER BY 1, 2; EXCEPTION WHEN others THEN - IF SQLERRM LIKE 'failed to connect to MySQL: Unknown MySQL server host ''localhos'' (%)' THEN + IF SQLERRM LIKE 'failed to connect to MySQL: Unknown %server host ''localhos'' (%)' THEN RAISE NOTICE 'failed to connect to MySQL: Unknown MySQL server host ''localhos'''; ELSE RAISE NOTICE '%', SQLERRM; diff --git a/sql/connection_validation.sql b/sql/connection_validation.sql index 99f4a32..2570ff4 100644 --- a/sql/connection_validation.sql +++ b/sql/connection_validation.sql @@ -34,7 +34,7 @@ $$ BEGIN SELECT * FROM f_mysql_test ORDER BY 1, 2; EXCEPTION WHEN others THEN - IF SQLERRM LIKE 'failed to connect to MySQL: Unknown MySQL server host ''localhos'' (%)' THEN + IF SQLERRM LIKE 'failed to connect to MySQL: Unknown %server host ''localhos'' (%)' THEN RAISE NOTICE 'failed to connect to MySQL: Unknown MySQL server host ''localhos'''; ELSE RAISE NOTICE '%', SQLERRM;