Hi Monty and Sergei!
Thank you for your response and reviewing.
> I will fix that during this week.
> It's hard to do in the caller, as there is no parameter that can be
> used for this.
>
> I can fix this by adding a new 'mysql_options()' where one says that
> the all memory in this connection will be thread specific and use this
> in the replication threads and in the federated engine (where this is
> needed).
>
> Would this solve your problem?
Yes, this solves my problem. Additionally, if 'mysql_options()' can be used dynamically before calling 'mysql_store_result()' and 'cli_use_result()' for switching "MY_THREAD_SPECIFIC" (or not), it is better for me.