1
0
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:
Sergei Golubchik
2015-07-27 12:50:51 +02:00
parent 6f14531b52
commit cf30074c3f
3 changed files with 45 additions and 0 deletions

View File

@ -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);