来看个测试,下面是两张表,关联字段的字符集不一样:
CREATE TABLE `t3` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` char(50) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_a` (`a`)) ;
CREATE TABLE `t4` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`b` char(50) CHARACTER SET latin1 DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_b` (`b`));