Connector is using a memory root for the result set, and
mysql_stmt_execute()/mysql_stmt_store_result(), when executed in a loop,
leads to series of ma_alloc_root() and ma_free_root() calls for the same
memory root.
The problem is that ma_alloc_root() calculates the allocation size based
on MA_MEM_ROOT::block_num, this value is incremented for larger allocation,
but is never reset. As a result, the allocation size continuously
grows, for an empty memroot.
This patch resets MA_MEM_ROOT::block_num in ma_free_root().
* ma_multi_malloc wanted uint for size arguments, not size_t
* ma_multi_malloc needs NULL pointer at the end. Simple 0
is not always the right size
* don't look for tracker info, if the packet does not even
has the info_len field
- At the moment the following session tracking types are supported:
SESSION_TRACK_SCHEMA
SESSION_TRACK_SYSTEM_VARIABLES
SESSION_TRACK_STATE_CHANGE
SESSION_TRACK_TRANSACTION_CHARACTERISTICS
- New API functions
mysql_session_track_get_next
mysql_session_track_get_first