Fixed bug mdev-4019.

The bug could cause a crash when several connections needed
persistent statistics for the same table.

Also added a missing call of set_statistics_for_table() in the code
of the function mysql_update.
This commit is contained in:
Igor Babaev 2013-01-13 00:40:38 -08:00
commit 7d5c56cb41
7 changed files with 85 additions and 2 deletions

View file

@ -4654,6 +4654,7 @@ open_and_process_table(THD *thd, LEX *lex, TABLE_LIST *tables,
Field **table_field_ptr= tables->table->field;
for ( ; *field_ptr; field_ptr++, table_field_ptr++)
(*table_field_ptr)->read_stats= (*field_ptr)->read_stats;
tables->table->stats_is_read= table_share->stats_cb.stats_is_read;
}
}
}