drop database if exists bug44411; create database bug44411 charset utf8; use bug44411; set names utf8; create table t( v varchar(255) collate utf8_unicode_ci not null default '')charset=utf8 collate=utf8_unicode_ci; create table t2( v varchar(255) collate utf8_unicode_ci not null default '')charset=utf8 collate=utf8_unicode_ci; select length('戦') as length_v1, length('∩╗┐µêª') as length_v2, length('├»┬╗┬┐├ª╦å┬ª') as length_v3; select hex('戦') as hex_v1, hex('∩╗┐µêª') as hex_v2, hex('├»┬╗┬┐├ª╦å┬ª') as hex_v3; insert into t values('戦'),('∩╗┐µêª'),('├»┬╗┬┐├ª╦å┬ª'); insert into t2 values('戦'),('∩╗┐µêª'),('├»┬╗┬┐├ª╦å┬ª'); select * from t; select length(v) from t; select hex(v) from t; select * from t2; select length(v) from t2; select hex(v) from t2; select * into outfile 'bla' FIELDS ENCLOSED BY '"' LINES TERMINATED BY '\r\n' FROM t; select * into outfile 'bla2' FIELDS ENCLOSED BY '"' LINES TERMINATED BY '\r\n' FROM t2; Delete from t; LOAD DATA INFILE 'bla' REPLACE INTO TABLE t CHARACTER SET utf8 FIELDS ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (v); select * from t; select length(v) from t; select hex(v) from t; delete from t2; LOAD DATA INFILE 'bla2' REPLACE INTO TABLE t2 CHARACTER SET utf8 FIELDS ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (@PN2) SET v = @PN2; select * from t2; select length(v) from t2; select hex(v) from t2;