From 09f937693f287d57848fcb361fd55f1de41588b0 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 12 Jan 2021 12:26:19 +0400 Subject: [PATCH] MCOL-4454 "ORDER BY BINARY a" is not like in InnoDB --- utils/windowfunction/idborderby.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/utils/windowfunction/idborderby.cpp b/utils/windowfunction/idborderby.cpp index 50cababbe..f87a43708 100644 --- a/utils/windowfunction/idborderby.cpp +++ b/utils/windowfunction/idborderby.cpp @@ -336,14 +336,7 @@ int StringCompare::operator()(IdbCompare* l, Row::Pointer r1, Row::Pointer r2) if (!cs) cs = l->rowGroup()->getCharset(fSpec.fIndex); - if (cs->state & MY_CS_BINSORT) - { - ret = fSpec.fAsc * strncmp(s1, s2, max(len1,len2)); - } - else - { - ret = fSpec.fAsc * cs->strnncoll(s1, len1, s2, len2); - } + ret = fSpec.fAsc * cs->strnncollsp(s1, len1, s2, len2); } return ret;