mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 06:05:32 +02:00
Merge 5.2->5.3
This commit is contained in:
commit
746152959a
14 changed files with 235 additions and 70 deletions
|
|
@ -2129,6 +2129,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
|
|||
{
|
||||
my_ptrdiff_t adjust_ptrs;
|
||||
Field **field,**org_field, *found_next_number_field;
|
||||
Field **vfield;
|
||||
TABLE *copy;
|
||||
TABLE_SHARE *share;
|
||||
uchar *bitmap;
|
||||
|
|
@ -2172,6 +2173,13 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
|
|||
if (!copy_tmp)
|
||||
goto error;
|
||||
|
||||
if (share->vfields)
|
||||
{
|
||||
vfield= (Field **) client_thd->alloc((share->vfields+1)*sizeof(Field*));
|
||||
if (!vfield)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Copy the TABLE object. */
|
||||
copy= new (copy_tmp) TABLE;
|
||||
*copy= *table;
|
||||
|
|
@ -2201,6 +2209,27 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
|
|||
}
|
||||
*field=0;
|
||||
|
||||
if (share->vfields)
|
||||
{
|
||||
copy->vfield= vfield;
|
||||
for (field= copy->field; *field; field++)
|
||||
{
|
||||
if ((*field)->vcol_info)
|
||||
{
|
||||
bool error_reported= FALSE;
|
||||
if (unpack_vcol_info_from_frm(client_thd,
|
||||
client_thd->mem_root,
|
||||
copy,
|
||||
*field,
|
||||
&(*field)->vcol_info->expr_str,
|
||||
&error_reported))
|
||||
goto error;
|
||||
*vfield++= *field;
|
||||
}
|
||||
}
|
||||
*vfield= 0;
|
||||
}
|
||||
|
||||
/* Adjust timestamp */
|
||||
if (table->timestamp_field)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue