zettadb/kunlun

Enhance mysql charset and collation support

jd-zhang opened this issue · 8 comments

*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.

2022-07-11 16:46:12: smith changed owner from smith to david

2022-07-11 16:46:12: smith changed status from new to assigned

2022-07-12 11:08:13: zhaowei@zettadb.com edited the issue description

2022-07-12 11:08:13: zhaowei@zettadb.com changed owner from david to kunlun

2022-07-12 11:08:13: zhaowei@zettadb.com changed status from assigned to accepted

2022-07-12 11:08:13: zhaowei@zettadb.com changed title from Store charset and collation mapping between PostgreSQL and MySQL in system metadata tables to Enhance mysql charset and collation support

2022-07-12 11:08:13: zhaowei@zettadb.com changed type from task to enhancement

2022-07-12 21:28:04: zhaowei@zettadb.com edited the issue description