Commit d9f39284 authored by Alexander Barkov's avatar Alexander Barkov

A cleanup for MDEV-19284, MDEV-19285

Fixing a test failure tokudb.change_column_varbin_descriptor
parent b8617574
...@@ -8287,6 +8287,15 @@ Charset::encoding_allows_reinterpret_as(const CHARSET_INFO *cs) const ...@@ -8287,6 +8287,15 @@ Charset::encoding_allows_reinterpret_as(const CHARSET_INFO *cs) const
bool bool
Charset::encoding_and_order_allow_reinterpret_as(CHARSET_INFO *cs) const Charset::encoding_and_order_allow_reinterpret_as(CHARSET_INFO *cs) const
{ {
/*
Test quickly if we have two exactly equal CHARSET_INFO pointers.
This also handles a special case with my_charset_bin:
it does not have a collation name specific part in CHARSET_INFO::name,
which is just "binary" (without a character set name prefix),
so the code with collation_specific_name() below won't work for it.
*/
if (m_charset == cs)
return true;
if (!encoding_allows_reinterpret_as(cs)) if (!encoding_allows_reinterpret_as(cs))
return false; return false;
LEX_CSTRING name0= collation_specific_name(); LEX_CSTRING name0= collation_specific_name();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment