Commit 9c86441e authored by heikki@donna.mysql.fi's avatar heikki@donna.mysql.fi

ha_innobase.cc:

  Fix the crashes reported by Peter; SHOW CREATE does not call external_lock before calling ::info, and consequently the trx struct in prebuilt is obsolete; setting trx->op_info caused erratic memory corruption in mysqldump
parent 4f3e7f68
......@@ -2953,10 +2953,6 @@ ha_innobase::records_in_range(
DBUG_ENTER("records_in_range");
if (prebuilt->trx) {
prebuilt->trx->op_info = "estimating range size";
}
active_index = keynr;
key = table->key_info + active_index;
......@@ -2989,10 +2985,6 @@ ha_innobase::records_in_range(
my_free((char*) key_val_buff2, MYF(0));
if (prebuilt->trx) {
prebuilt->trx->op_info = "";
}
DBUG_RETURN((ha_rows) n_rows);
}
......@@ -3013,11 +3005,6 @@ ha_innobase::estimate_number_of_rows(void)
ulonglong estimate;
ulonglong data_file_length;
if (prebuilt->trx) {
prebuilt->trx->op_info =
"estimating upper bound of table size";
}
DBUG_ENTER("info");
index = dict_table_get_first_index_noninline(prebuilt->table);
......@@ -3033,10 +3020,6 @@ ha_innobase::estimate_number_of_rows(void)
estimate = 2 * data_file_length / dict_index_calc_min_rec_len(index);
if (prebuilt->trx) {
prebuilt->trx->op_info = "";
}
return((ha_rows) estimate);
}
......@@ -3076,10 +3059,6 @@ ha_innobase::info(
DBUG_ENTER("info");
if (prebuilt->trx) {
prebuilt->trx->op_info = "calculating table stats";
}
ib_table = prebuilt->table;
if (flag & HA_STATUS_TIME) {
......@@ -3150,10 +3129,6 @@ ha_innobase::info(
trx_get_error_info(prebuilt->trx));
}
if (prebuilt->trx) {
prebuilt->trx->op_info = "";
}
DBUG_VOID_RETURN;
}
......
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