mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-11597 Assertion when doing select from virtual column with impossible value
- Changed error handlers interface so that they can change error level in the handler - Give warnings and errors when calculating virtual columns - On insert/update error is fatal in strict mode. - SELECT and DELETE will only give a warning if a virtual field generates an error - Added VCOL_UPDATE_FOR_DELETE and VCOL_UPDATE_INDEX_FOR_REPLACE to be able to easily detect in update_virtual_fields() if we should use an error handler to mask errors or not.
This commit is contained in:
@@ -3174,6 +3174,7 @@ bool Delayed_insert::handle_inserts(void)
|
||||
|
||||
while ((row=rows.get()))
|
||||
{
|
||||
int tmp_error;
|
||||
stacked_inserts--;
|
||||
mysql_mutex_unlock(&mutex);
|
||||
memcpy(table->record[0],row->record,table->s->reclength);
|
||||
@@ -3250,16 +3251,18 @@ bool Delayed_insert::handle_inserts(void)
|
||||
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
|
||||
thd.clear_error(); // reset error for binlog
|
||||
|
||||
tmp_error= 0;
|
||||
if (table->vfield)
|
||||
{
|
||||
/*
|
||||
Virtual fields where not calculated by caller as the temporary TABLE object used
|
||||
had vcol_set empty. Better to calculate them here to make the caller faster.
|
||||
Virtual fields where not calculated by caller as the temporary
|
||||
TABLE object used had vcol_set empty. Better to calculate them
|
||||
here to make the caller faster.
|
||||
*/
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE);
|
||||
tmp_error= table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE);
|
||||
}
|
||||
|
||||
if (write_record(&thd, table, &info))
|
||||
if (tmp_error || write_record(&thd, table, &info))
|
||||
{
|
||||
info.error_count++; // Ignore errors
|
||||
thread_safe_increment(delayed_insert_errors,&LOCK_delayed_status);
|
||||
|
Reference in New Issue
Block a user