0

I want to select table use character in Unicode CJK Extension-B.

select * from saseung where hanja = '';

But the result shows all CJK Extension-B characters in the table.

, , , , , etc

I guess MySQL check only the first two characters of ''.

my table def is below.

CREATE TABLE `saseung` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `hanja` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5773 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

add March 4

my MySQL setting is

SHOW VARIABLES WHERE VARIABLE_NAME LIKE '%coll%'
OR VARIABLE_NAME LIKE '%char%' OR VARIABLE_NAME='init_connect';

result

MySQL setting

2 Answers2

0

Try this:

select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME like '%'
select * from hanja
Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
0

I'm pretty sure table names (and other SQL constructs) are limited to CHARACTER SET utf8mb3. File a bug report; it would be reasonable to move to utf8mb4. However, there may be incompatibilities brought on by the change.

SELECT HEX('');  --> F0A6A48E

Note the 4 bytes starting with F0, hence utf8mb4.

Meanwhile, your table can contain utf8mb4 characters.

init_connect is ignored when logging in with "root".

Rick James
  • 135,179
  • 13
  • 127
  • 222