mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-7968 Virtual column set to NULL using load data infile
Don't forget to set thd->lex->unit.insert_table_with_stored_vcol in the mysql_load(). Othewise virtual columns will not be updated.
This commit is contained in:
@ -314,6 +314,18 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
table->prepare_triggers_for_insert_stmt_or_event();
|
||||
table->mark_columns_needed_for_insert();
|
||||
|
||||
if (table->vfield)
|
||||
{
|
||||
for (Field **vfield_ptr= table->vfield; *vfield_ptr; vfield_ptr++)
|
||||
{
|
||||
if ((*vfield_ptr)->stored_in_db)
|
||||
{
|
||||
thd->lex->unit.insert_table_with_stored_vcol= table;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint tot_length=0;
|
||||
bool use_blobs= 0, use_vars= 0;
|
||||
List_iterator_fast<Item> it(fields_vars);
|
||||
|
Reference in New Issue
Block a user