1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
bell@sanja.is.com.ua
2002-06-05 21:32:22 +03:00
1077 changed files with 13614 additions and 99077 deletions

View File

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