Description:
1) I create database with character set utf8mb3 and collation utf8mb3_sinhala_ci.
2) I create underlying tables with same character set and collation.
3) Insert some values in to the table.
4) When you select contents from table, junk is detected in the data contents.
set names utf8mb3;
CREATE DATABASE bup_ts character set utf8mb3 collate utf8mb3_sinhala_ci;
use bup_ts;
CREATE TABLE t3 (a varchar(3) COLLATE utf8mb3_sinhala_ci DEFAULT NULL)ENGINE=MyISAM CHARACTER SET utf8mb3 COLLATE utf8mb3_sinhala_ci;
INSERT INTO t3 VALUES
('a'),('b'),('c'),('d'),('f'),('h'),('i'),('j'),('k'),('l'),('m'),
('n');
How to repeat:
mysql> set names utf8mb3;
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE DATABASE bup_ts character set utf8mb3 collate utf8mb3_sinhala_ci;
Query OK, 1 row affected (0.01 sec)
mysql> use bup_ts;
Database changed
mysql> CREATE TABLE t3 (a varchar(3) COLLATE utf8mb3_sinhala_ci DEFAULT NULL)ENGINE=MyISAM CHARACTER SET utf8mb3 COLLATE utf8mb3_sinhala_ci;
Query OK, 0 rows affected (0.02 sec)
mysql> INSERT INTO t3 VALUES
-> ('a'),('b'),('c'),('d'),('f'),('h'),('i'),('j'),('k'),('l'),('m'),
-> ('n');
Query OK, 12 rows affected (0.01 sec)
Records: 12 Duplicates: 0 Warnings: 0
mysql> select * from t3;
+------+
| a |
+------+
| a¥¥¥ |
| b¥¥¥ |
| c¥¥¥ |
| d¥¥¥ |
| f¥¥¥ |
| h¥¥¥ |
| i¥¥¥ |
| j¥¥¥ |
| k¥¥¥ |
| l¥¥¥ |
| m¥¥¥ |
| n¥¥¥ |
+------+
12 rows in set (0.00 sec)
mysql> show create table t3;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| t3 | CREATE TABLE `t3` (
`a` varchar(3) COLLATE utf8mb3_sinhala_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_sinhala_ci |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)