From 934566de4acfdf0d3c3ab568a4ec2733d903ff4e Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Thu, 7 Mar 2013 12:11:44 +0000 Subject: [PATCH] clickhouse: fixed function hex [#CONV-6788]. --- dbms/include/DB/Functions/FunctionsCoding.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbms/include/DB/Functions/FunctionsCoding.h b/dbms/include/DB/Functions/FunctionsCoding.h index 2de0af34d18..1a18a49013d 100644 --- a/dbms/include/DB/Functions/FunctionsCoding.h +++ b/dbms/include/DB/Functions/FunctionsCoding.h @@ -263,6 +263,8 @@ public: if (byte == 0 && !was_nonzero && offset) continue; + was_nonzero = true; + *(out++) = digit[byte >> 4]; *(out++) = digit[byte & 15]; }