From 46e1d05a89fd5b78660765cc8be0f3699fba18ba Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 7 Sep 2023 19:18:13 +0000 Subject: [PATCH] Fix another test --- .../test_backward_compatibility/test_functions.py | 5 +++++ tests/queries/0_stateless/00732_base64_functions.reference | 1 + tests/queries/0_stateless/00732_base64_functions.sql | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/integration/test_backward_compatibility/test_functions.py b/tests/integration/test_backward_compatibility/test_functions.py index c86c3ba0ab2..607ac74d725 100644 --- a/tests/integration/test_backward_compatibility/test_functions.py +++ b/tests/integration/test_backward_compatibility/test_functions.py @@ -148,6 +148,11 @@ def test_string_functions(start_cluster): # 22.8 Backward Incompatible Change: Extended range of Date32 "toDate32OrZero", "toDate32OrDefault", + # 23.9 changed the base64-handling library from Turbo base64 to aklomp-base64. They differ in the way they deal with base64 values + # that are not properly padded by '=', for example below test value v='foo'. (Depending on the specification/context, padding is + # mandatory or optional). The former lib produces a value based on implicit padding, the latter lib throws an error. + "FROM_BASE64", + "base64Decode", ] functions = filter(lambda x: x not in excludes, functions) diff --git a/tests/queries/0_stateless/00732_base64_functions.reference b/tests/queries/0_stateless/00732_base64_functions.reference index 19486ff95de..f97c19427e7 100644 --- a/tests/queries/0_stateless/00732_base64_functions.reference +++ b/tests/queries/0_stateless/00732_base64_functions.reference @@ -22,6 +22,7 @@ foobar 1 1 1 1 fooba +~Š Zm9v foo foo diff --git a/tests/queries/0_stateless/00732_base64_functions.sql b/tests/queries/0_stateless/00732_base64_functions.sql index 4272cca19ee..99268004003 100644 --- a/tests/queries/0_stateless/00732_base64_functions.sql +++ b/tests/queries/0_stateless/00732_base64_functions.sql @@ -17,6 +17,9 @@ SELECT tryBase64Decode('foo', 'excess argument'); -- { serverError NUMBER_OF_ARG SELECT base64Decode('Zm9vYmF=Zm9v'); -- { serverError INCORRECT_DATA } SELECT tryBase64Decode('Zm9vYmF=Zm9v'); +SELECT base64Decode('foo'); -- { serverError INCORRECT_DATA } +SELECT tryBase64Decode('foo'); + select base64Encode(toFixedString('foo', 3)); select base64Decode(toFixedString('Zm9v', 4)); select tryBase64Decode(toFixedString('Zm9v', 4));