Bug #34661 rpl_ndb_ctype_ucs2_def fails in cge-6.3
Submitted: 19 Feb 2008 12:56 Modified: 25 Feb 2009 9:24
Reporter: Tomas Ulin Email Updates:
Status: Verified Impact on me:
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: CGE-6.3.8

[19 Feb 2008 12:56] Tomas Ulin
see pushbuild:

WARNING:  'master1.err: rpl_ndb.rpl_ndb_ctype_ucs2_def: mysqld: log_event.cc:1740: Query_log_event::Query_log_event(THD*, const char*, ulong, bool, bool, THD::killed_state): Assertion `thd_arg->variables.character_set_client->mbminlen == 1' failed.'
    COUNT: 1
    FILES:    warnings
    TESTS:    <unknown>

How to repeat:

Suggested fix:
Suggestion by bar:

we need to set correct charset in ndb binlog thread:

cf. when a query log event is created:

  int2store(charset, thd_arg->variables.character_set_client->number);
  int2store(charset+2, thd_arg->variables.collation_connection->number);
  int2store(charset+4, thd_arg->variables.collation_server->number);

these values should somehow be properly propagated to the binlogging master
[20 Feb 2008 8:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


ChangeSet@1.2539, 2008-02-19 13:59:00+01:00, tomas@poseidon.ndb.mysql.com +1 -0
  bug #34661  	rpl_ndb_ctype_ucs2_def fails in cge-6.3
[31 Aug 2009 11:56] Andrei Elkin
A new occurrence of the tests's failure:


indicates a crash:

rpl_ndb.rpl_ndb_ctype_ucs2_def           w1 [ fail ]
        Test ended at 2009-08-28 08:13:51

CURRENT_TEST: rpl_ndb.rpl_ndb_ctype_ucs2_def
mysqltest: In included file "./include/ndb_not_readonly.inc": At line 8: query 'delete from mysql.ndb_apply_status where server_id=0' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 0...
Failed to read from '/export/home/pb2/test/sb_1-715076-1251437085.2/mysql-5.1.39-solaris11-i386-test/mysql-test/var/1/log/rpl_ndb_ctype_ucs2_def.log', errno: 22

Server [mysqld.2.1 - pid: 110, winpid: 110, exit: 256] failed during test run

 - saving '/export/home/pb2/test/sb_1-715076-1251437085.2/mysql-5.1.39-solaris11-i386-test/mysql-test/var/1/log/rpl_ndb.rpl_ndb_ctype_ucs2_def/' to '/export/home/pb2/test/sb_1-715076-1251437085.2/mysql-5.1.39-solaris11-i386-test/mysql-test/var/log/rpl_ndb.rpl_ndb_ctype_ucs2_def/'
 - found 'core' (0/5)

Trying 'dbx' to get a backtrace
Core generated by '/export/home/pb2/test/sb_1-715076-1251437085.2/mysql-5.1.39-solaris11-i386-test/libexec/mysqld'
Output from dbx follows. Stack trace is printed for all threads in order,
above this you should see info about which thread was the failing one.
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc
Reading mysqld
core file header read successfully
Reading ld.so.1
Reading libpthread.so.1
Reading libthread.so.1
Reading libdl.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libm.so.2
Reading libCstd.so.1
Reading libCrun.so.1
Reading libc.so.1
t@11 (l@11) terminated by signal SEGV (Segmentation Fault)
0xfffffd7ffed5337a: _lwp_kill+0x000a:	jae      _lwp_kill+0x18	[ 0xfffffd7ffed53388, .+0xe ]
Current function is my_write_core (optimized)
dbx: warning: can't find file "/export/home/pb2/build/sb_0-714789-1251384421.6/mysql-5.1.39/mysys/stacktrace.c"
dbx: warning: see `help finding-files'
[27 Oct 2009 17:13] Frazer Clement
Proposed patch

Attachment: bug34661.patch (text/x-patch), 1.46 KiB.

[27 Oct 2009 17:15] Frazer Clement
Proposed patch moves existing code to earlier point in initialisation of Binlog injector thread environment.

Existing code forcing Binlog Injector thread's thd->client_character_set to latin1 is moved to point in thread initialisation before schema events are handled.

This avoid assertion failure in the Binlog event code.