Description:
During sql query api node in mysql-cluster crashed.
select t1.text_field, t1.one_id, t1.two_id, t2.one_id as table_test2, t3.two_id as table_test3 from table_test1 t1 left join table_test2 t2 on t1.one_id=t2.one_id left join table_test3 t3 on t1.two_id=t3.two_id where t1.id=1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
in error.log:
stack_bottom = 0x7f99dfbbae70 thread_stack 0x30000
./mysqld(my_print_stacktrace+0x33)[0x9a6083]
./mysqld(handle_segfault+0x322)[0x643522]
/lib/libpthread.so.0(+0xfb40)[0x7f99df799b40]
./mysqld(_ZN13ha_ndbcluster16make_pushed_joinER22ndb_pushed_builder_ctxPKN3AQP12Table_accessE+0xd1)[0x7e3ce1]
./mysqld[0x7e48d9]
./mysqld(_Z20ha_make_pushed_joinsP3THDPN3AQP9Join_planE+0x33)[0x73dc43]
./mysqld[0x6ac86c]
./mysqld(_ZN4JOIN8optimizeEv+0x25ff)[0x6c4bdf]
./mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xab)[0x6cbafb]
./mysqld(_Z13handle_selectP3THDP6st_lexP13select_resultm+0x16e)[0x6cc52e]
./mysqld[0x64ed1c]
./mysqld(_Z21mysql_execute_commandP3THD+0x25fa)[0x654cea]
./mysqld(_Z11mysql_parseP3THDPcjPPKc+0x2d6)[0x65ae16]
./mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x8a8)[0x65b6c8]
./mysqld(_Z10do_commandP3THD+0xe4)[0x65c514]
./mysqld(handle_one_connection+0x62b)[0x64c17b]
/lib/libpthread.so.0(+0x7971)[0x7f99df791971]
/lib/libc.so.6(clone+0x6d)[0x7f99dea0b92d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x1099ca0 = select t1.text_field, t1.one_id, t1.two_id, t2.one_id as table_test2, t3.two_id as table_test3 from table_test1 t1 left join table_test2 t2 on t1.one_id=t2.one_id left join table_test3 t3 on t1.two_id=t3.two_id where t1.id=1
thd->thread_id=23
thd->killed=NOT_KILLED
...With `text` field type in table_test1;
How to repeat:
CREATE TABLE `table_test1` (
`id` int(64) NOT NULL AUTO_INCREMENT,
`one_id` int(16) DEFAULT NULL,
`two_id` int(16) DEFAULT NULL,
`text_field` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
CREATE TABLE `table_test2` (
`one_id` int(16) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`one_id`)
) ENGINE=NDBCLUSTER;
CREATE TABLE `table_test3` (
`two_id` int(16) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`two_id`)
) ENGINE=NDBCLUSTER;
insert into table_test1 (text_field) values ("sometext_or_null");
table_test2 and table_test3 can be left empty
Note:
`text_field` in table_test1 must be `text` type. Other field types works well.
Query:
select t1.text_field, t1.one_id, t1.two_id, t2.one_id as table_test2, t3.two_id as table_test3 from table_test1 t1 left join table_test2 t2 on t1.one_id=t2.one_id left join table_test3 t3 on t1.two_id=t3.two_id where t1.id=1;