summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_binlog.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-11-28 15:35:25 +0400
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-11-28 15:35:25 +0400
commit7ed596398becf839238e02fc6e0b30a1b8dd2b54 (patch)
tree5cf83e220595d3b69bd8c7263a931712516ec393 /sql/ha_ndbcluster_binlog.cc
parent80b33c48b172cb017d3c17504c10a3c1931c8b0b (diff)
downloadmariadb-git-7ed596398becf839238e02fc6e0b30a1b8dd2b54.tar.gz
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).
Diffstat (limited to 'sql/ha_ndbcluster_binlog.cc')
-rw-r--r--sql/ha_ndbcluster_binlog.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index fc35a7a930e..cf13110e359 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -775,7 +775,7 @@ static int ndbcluster_create_ndb_apply_status_table(THD *thd)
" log_name VARCHAR(255) BINARY NOT NULL, "
" start_pos BIGINT UNSIGNED NOT NULL, "
" end_pos BIGINT UNSIGNED NOT NULL, "
- " PRIMARY KEY USING HASH (server_id) ) ENGINE=NDB");
+ " PRIMARY KEY USING HASH (server_id) ) ENGINE=NDB CHARACTER SET utf8");
const int no_print_error[4]= {ER_TABLE_EXISTS_ERROR,
701,
@@ -835,7 +835,7 @@ static int ndbcluster_create_schema_table(THD *thd)
" id INT UNSIGNED NOT NULL,"
" version INT UNSIGNED NOT NULL,"
" type INT UNSIGNED NOT NULL,"
- " PRIMARY KEY USING HASH (db,name) ) ENGINE=NDB");
+ " PRIMARY KEY USING HASH (db,name) ) ENGINE=NDB CHARACTER SET utf8");
const int no_print_error[4]= {ER_TABLE_EXISTS_ERROR,
701,
@@ -3959,6 +3959,7 @@ restart:
i_ndb->setReportThreshEventFreeMem(ndb_report_thresh_binlog_mem_usage);
bzero((char*) &row, sizeof(row));
+ thd->variables.character_set_client= &my_charset_latin1;
injector::transaction trans;
// pass table map before epoch
{