diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 903300c0402..b362835412a 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1961,7 +1961,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) my_ptrdiff_t adjust_ptrs; Field **field,**org_field, *found_next_number_field; TABLE *copy; - TABLE_SHARE *share= table->s; + TABLE_SHARE *share; uchar *bitmap; DBUG_ENTER("Delayed_insert::get_local_table"); @@ -1985,6 +1985,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) goto error; } } + share= table->s; /* Allocate memory for the TABLE object, the field pointers array, and