mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merged
sql/item.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged
This commit is contained in:
@ -262,6 +262,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
info.copied=values_list.elements;
|
||||
end_delayed_insert(thd);
|
||||
}
|
||||
if (info.copied || info.deleted)
|
||||
query_cache_invalidate3(thd, table_list, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -303,6 +305,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
}
|
||||
if (using_transactions)
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
if (info.copied || info.deleted)
|
||||
{
|
||||
query_cache_invalidate3(thd, table_list, 1);
|
||||
}
|
||||
if (thd->lock)
|
||||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
@ -310,8 +316,6 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
}
|
||||
}
|
||||
thd->proc_info="end";
|
||||
if (info.copied || info.deleted)
|
||||
query_cache_invalidate3(thd, table_list, 1);
|
||||
table->time_stamp=save_time_stamp; // Restore auto timestamp ptr
|
||||
table->next_number_field=0;
|
||||
thd->count_cuted_fields=0;
|
||||
@ -443,6 +447,7 @@ int write_record(TABLE *table,COPY_INFO *info)
|
||||
err:
|
||||
if (key)
|
||||
my_afree(key);
|
||||
info->errorno= error;
|
||||
table->file->print_error(error,MYF(0));
|
||||
return 1;
|
||||
}
|
||||
@ -1331,7 +1336,9 @@ void select_insert::send_error(uint errcode,const char *err)
|
||||
table->file->activate_all_index(thd);
|
||||
ha_rollback_stmt(thd);
|
||||
if (info.copied || info.deleted)
|
||||
{
|
||||
query_cache_invalidate3(thd, table, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1344,8 +1351,9 @@ bool select_insert::send_eof()
|
||||
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
|
||||
error=error2;
|
||||
if (info.copied || info.deleted)
|
||||
{
|
||||
query_cache_invalidate3(thd, table, 1);
|
||||
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
table->file->print_error(error,MYF(0));
|
||||
|
Reference in New Issue
Block a user