mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Don't give errors for default value copy in create_tmp_table
This commit is contained in:
@@ -18151,6 +18151,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
|||||||
bool using_unique_constraint= false;
|
bool using_unique_constraint= false;
|
||||||
bool use_packed_rows= false;
|
bool use_packed_rows= false;
|
||||||
bool not_all_columns= !(select_options & TMP_TABLE_ALL_COLUMNS);
|
bool not_all_columns= !(select_options & TMP_TABLE_ALL_COLUMNS);
|
||||||
|
bool save_abort_on_warning;
|
||||||
char *tmpname,path[FN_REFLEN];
|
char *tmpname,path[FN_REFLEN];
|
||||||
uchar *pos, *group_buff, *bitmaps;
|
uchar *pos, *group_buff, *bitmaps;
|
||||||
uchar *null_flags;
|
uchar *null_flags;
|
||||||
@@ -18618,6 +18619,11 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
|||||||
}
|
}
|
||||||
null_count= (blob_count == 0) ? 1 : 0;
|
null_count= (blob_count == 0) ? 1 : 0;
|
||||||
hidden_field_count=param->hidden_field_count;
|
hidden_field_count=param->hidden_field_count;
|
||||||
|
|
||||||
|
/* Protect against warnings in field_conv() in the next loop*/
|
||||||
|
save_abort_on_warning= thd->abort_on_warning;
|
||||||
|
thd->abort_on_warning= 0;
|
||||||
|
|
||||||
for (i=0,reg_field=table->field; i < field_count; i++,reg_field++,recinfo++)
|
for (i=0,reg_field=table->field; i < field_count; i++,reg_field++,recinfo++)
|
||||||
{
|
{
|
||||||
Field *field= *reg_field;
|
Field *field= *reg_field;
|
||||||
@@ -18704,6 +18710,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
|||||||
bzero(pos, table->s->reclength - (pos - table->record[0]));
|
bzero(pos, table->s->reclength - (pos - table->record[0]));
|
||||||
MEM_CHECK_DEFINED(table->record[0], table->s->reclength);
|
MEM_CHECK_DEFINED(table->record[0], table->s->reclength);
|
||||||
|
|
||||||
|
thd->abort_on_warning= save_abort_on_warning;
|
||||||
param->copy_field_end=copy;
|
param->copy_field_end=copy;
|
||||||
param->recinfo= recinfo; // Pointer to after last field
|
param->recinfo= recinfo; // Pointer to after last field
|
||||||
store_record(table,s->default_values); // Make empty default record
|
store_record(table,s->default_values); // Make empty default record
|
||||||
|
Reference in New Issue
Block a user