Skip to content

Enhance mysql charset and collation support #911

@jd-zhang

Description

@jd-zhang

*Issue migrated from trac ticket # 893 www.kunlunbase.com *

component: computing nodes | priority: major

2022-07-11 14:30:50: zhaowei@zettadb.com created the issue


  1. Store charset and collation mapping between PostgreSQL and MySQL in system metadata tables, so that such mapping can be extended and updated as needed at any time.

Such mappings used to be hard coded.

Now they are in pg_mysql_charset_mapping and pg_mysql_collation_mapping tables--- pg_mysql_charset_mapping maps pg charset to mysql charset, and pg_mysql_collation_mapping maps mysql charset and/or collation names to a pg charset&collation pair.

  1. support mysql SET NAMES grammar
    SET NAMES {charset_name [COLLATE collation_name] | DEFAULT }
    and make sure mysql charset and collation names here can be mapped to pg charset and collations.
  2. make sure collation references in DML stmts can refer to both mysql collations and pg collations, and mysql charset and collations are mapped to pg charset and collations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions