commit e5e1d89c2d3e5c773696d0fc0af2b28036744a79 Author: root Date: Tue Sep 14 16:10:07 2021 +0800 json_table wrong behaviour diff --git a/sql/table_function.cc b/sql/table_function.cc index 3af81dba53b..7106c72b69b 100644 --- a/sql/table_function.cc +++ b/sql/table_function.cc @@ -302,7 +302,7 @@ bool Table_function_json::init() { List_iterator li2(m_vt_list); // Compare 'first' with all columns prior to it while ((col = li2++) && col != first) { - if (!strncmp(first->field_name, col->field_name, NAME_CHAR_LEN)) { + if (!strncmp(first->field_name, col->field_name, NAME_LEN)) { my_error(ER_DUP_FIELDNAME, MYF(0), first->field_name); return true; }