Hi Sergey,
> I'm afraid fixing rnd_end() callers in the server may stall for a long time.
O.K. No need to fix it if it is not easy. This request is not high priority request.
> Is it accaptable for spider to use bulk updates and deletes API instead
> (see handler.h: start_bulk_update/start_bulk_delete).
Spider use it already. This API is not used if target table has after trigger. I understand why this API is not used in this case, but it sometimes causes performance problem. So, I thought it is better to prepare other choice for something wrong. Anyway, I will disable bulk updating/deleting feature without using API.
> Nope, it looks like a bug in thread pool. MDEV-4739 has different trace, how
did you get this one? Just executed given test?
I got this trace when I try to reproduce MDEV-4739. I did as the followings.
1. start mysqld
2. log in mysqld
3. mysql> CREATE TABLE t1 (a INT) ENGINE=InnoDB;
4. mysql> XA START 'xa1';
5. mysql> INSERT INTO t1 (a) VALUES (1),(2);
6. mysql> XA END 'xa1';
7. mysql> XA PREPARE 'xa1';
8. kill -9 mysqld_safe and mysqld from another terminal
9. start mysqld on gdb
At that time, InnoDB and Spider were enabled and log-bin was disabled. So probably "total_ha_2pc > 1" was true, "opt_bin_log" was false.
Does it help you?
Thanks,
Kentoku