Commit a97b0cc3 authored by vasil's avatar vasil

branches/zip:

Fix Mantis issue#66.

Do not try to dereference the MySQL thread object if it is NULL.

Approved by:	Sunny (via IM)
parent 0ce4e51d
...@@ -391,7 +391,15 @@ fill_trx_row( ...@@ -391,7 +391,15 @@ fill_trx_row(
row->trx_weight = (ullint) ut_conv_dulint_to_longlong(TRX_WEIGHT(trx)); row->trx_weight = (ullint) ut_conv_dulint_to_longlong(TRX_WEIGHT(trx));
row->trx_mysql_thread_id = ib_thd_get_thread_id(trx->mysql_thd); if (trx->mysql_thd != NULL) {
row->trx_mysql_thread_id
= ib_thd_get_thread_id(trx->mysql_thd);
} else {
/* For internal transactions e.g., purge and transactions
being recovered at startup there is no associated MySQL
thread data structure. */
row->trx_mysql_thread_id = 0;
}
if (trx->mysql_query_str != NULL && *trx->mysql_query_str != NULL) { if (trx->mysql_query_str != NULL && *trx->mysql_query_str != NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment