summaryrefslogtreecommitdiff
path: root/sql/json_table.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-10-04 13:32:38 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-04 13:32:38 +0200
commitbb76dcbec77d31818ec7dfc0d0dc1f4b49185bc5 (patch)
tree0c288f685ac6fbc8d4bd4cdbc60bcf9942f019f7 /sql/json_table.cc
parent1ac8149b83f002cd4754e1eca225560bc02b22e4 (diff)
parent55e07d9ade51e9e969f528d903509806142f4d1e (diff)
downloadmariadb-git-bb76dcbec77d31818ec7dfc0d0dc1f4b49185bc5.tar.gz
Merge branch '10.9' into 10.10
Diffstat (limited to 'sql/json_table.cc')
-rw-r--r--sql/json_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/json_table.cc b/sql/json_table.cc
index e51b71d5650..5f9ba8d3351 100644
--- a/sql/json_table.cc
+++ b/sql/json_table.cc
@@ -984,7 +984,7 @@ int Json_table_column::print(THD *thd, Field **f, String *str)
((*f)->has_charset() && m_explicit_cs &&
(str->append(STRING_WITH_LEN(" CHARSET ")) ||
str->append(&m_explicit_cs->cs_name) ||
- (!(m_explicit_cs->state & MY_CS_PRIMARY) &&
+ (Charset(m_explicit_cs).can_have_collate_clause() &&
(str->append(STRING_WITH_LEN(" COLLATE ")) ||
str->append(&m_explicit_cs->coll_name))))) ||
str->append(m_column_type == PATH ? &path : &exists_path) ||