1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Part 2 of the fix for bug mdev-504.

Any Field object should use current_thd instead of table->in_use 
when THD is needed if table == NULL.
This patch fixes the crash of test case from mdev-504.test.
This commit is contained in:
Igor Babaev
2012-09-08 20:33:03 -07:00
parent 0f393f07dd
commit 92eadf6415
3 changed files with 6 additions and 8 deletions

View File

@ -1586,7 +1586,7 @@ void create_min_max_stistical_fields_for_table_share(THD *thd,
Field *fld;
table_field= *field_ptr;
my_ptrdiff_t diff= record - table_share->default_values;
if (!(fld= table_field->clone(thd, &table_share->mem_root, diff)))
if (!(fld= table_field->clone(&table_share->mem_root, diff)))
continue;
store_address_if_first(i == 0 ?
(void **) &table_field->read_stats->min_value :