mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
bug#29562 default collation of ucs2_unicode_ci crashes slave
Problem: some pieces of code relied on the default character set settings, which didn't work in case of default character set ucs2. Fix: Specifying character set explicitly, not to depend on the default settings. mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result: Recording correct test result mysql-test/suite/rpl_ndb/t/disabled.def: Enabling test sql/ha_ndbcluster_binlog.cc: Character set of the NDB helper tables should not rely of the default settings, to avoid creating tables in different character sets on master and slave. Adding explicit character set. UTF8 should be fine. character_set_client should not rely on the default character set settings, which can be ucs2. Helper SQL queries sent by NDB are all in pure ASCII. Setting client_character_set to latin1. sql/log_event.cc: Adding assert to make sure that binary log does not have queries in character set which parser does not understand (e.g. ucs2).
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show variables like 'collation_server';
|
||||
Variable_name Value
|
||||
collation_server ucs2_unicode_ci
|
||||
@ -5,5 +11,17 @@ show variables like "%character_set_ser%";
|
||||
Variable_name Value
|
||||
character_set_server ucs2
|
||||
DROP TABLE IF EXISTS t1;
|
||||
create table t1 (a int);
|
||||
create table t1 (a int) ENGINE=NDB;
|
||||
drop table t1;
|
||||
CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
|
||||
`nom` char(4) default NULL,
|
||||
`prenom` char(4) default NULL,
|
||||
PRIMARY KEY (`nid`))
|
||||
ENGINE=ndbcluster;
|
||||
INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
|
||||
select * from t1 order by nid;
|
||||
nid nom prenom
|
||||
1 XYZ1 ABC1
|
||||
select * from t1 order by nid;
|
||||
nid nom prenom
|
||||
1 XYZ1 ABC1
|
||||
|
Reference in New Issue
Block a user