Step#3 MDEV-27896 Wrong result upon `COLLATE latin1_bin CHARACTER SET latin1`...
Step#3 MDEV-27896 Wrong result upon `COLLATE latin1_bin CHARACTER SET latin1` on the table or the database level Splitting Lex_exact_charset_extended_collation_attrs_st into small components. - Adding classes: * Lex_exact_charset * Lex_context_collation * Lex_exact_collation * Lex_extended_collation_st * Lex_extended_collation and moving pieces of the code from methods * merge_charset_clause_and_collate_clause() * merge_collate_clause_and_collate_clause() into smaller methods in the new classes. It's easier to read, handle and reuse the code this way. - Moving static methods find_default_collation() and find_binary_collation() from Lex_exact_charset_extended_collation_attrs_st to non-static methods in Lex_exact_charset_opt_extended_collate, as now it's a better place for them. - Using Lex_extended_collation_st in sql_yacc.yy to handle COLLATE clauses, to handle both context and extended collations (instead of the previous notation with NULL CHARSET_INFO pointer meaning DEFAULT, and not-NULL meaning an exact collation). This change will also help to add more context (UCA1400) collations soon. The old notation with CHARSET_INFO won't be enough. - Adding LEX::set_names() and reusing it in two places in sql_yacc.yy - Removing the opt_collate_or_default rule. It's was used only to handle the CONVERT TO related grammar. Had to add some code duplication, but it will be gone in one of the next commits. This change will also soon help to add Lex_extended_charset_extended_collation_attrs_st - a new class to handle table and database level CHARACTER SET and COLLATE clauses easier.
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment