summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 22a75a7a99e..2b83b7afd5e 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2301,7 +2301,7 @@ end_create:
TABLE *Delayed_insert::get_local_table(THD* client_thd)
{
my_ptrdiff_t adjust_ptrs;
- Field **field,**org_field, *found_next_number_field, **dfield_ptr;
+ Field **field,**org_field, *found_next_number_field, **dfield_ptr= 0;
TABLE *copy;
TABLE_SHARE *share;
uchar *bitmap;
@@ -2374,6 +2374,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
{
copy->default_field= (Field**) client_thd->alloc((share->default_fields+1)*
sizeof(Field**));
+ if (!copy->default_field)
+ goto error;
dfield_ptr= copy->default_field;
}
/*