summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-04 18:16:10 +0200
committerunknown <monty@mysql.com>2004-03-04 18:16:10 +0200
commit0b751edc57385e125415a3d0aa8f37ad772e7178 (patch)
tree23e1c598bde21cc2cb86a6228f23c9965a8633f5 /sql/sql_delete.cc
parenteadfe4ddfa810972daa323131f6cc1476eee8055 (diff)
downloadmariadb-git-0b751edc57385e125415a3d0aa8f37ad772e7178.tar.gz
Rollback UPDATE/DELETE statements on kill
nsure that rows in a multi-row INSERT DELAYED are inserted atomicly mysql-test/mysql-test-run.sh: Make test case safe for openserver/unixware (Bug #2700) sql/sql_delete.cc: Rollback statement on kill sql/sql_insert.cc: Ensure that rows in a multi-row INSERT DELAYED are inserted atomicly (without releasing logs). This is needed to ensure that the mysqlbinlog is consistent. Bug #2491 sql/sql_list.h: Ensure that rows in a multi-row INSERT DELAYED is inserted atomicly (without releasing logs). This is needed to ensure that the mysqlbinlog is consistent. Bug #2491 sql/sql_update.cc: Rollback statement on kill
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index c8b85d57c0e..b568166a766 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -167,6 +167,8 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
else
table->file->unlock_row(); // Row failed selection, release lock on it
}
+ if (thd->killed && !error)
+ error= 1; // Aborted
thd->proc_info="end";
end_read_record(&info);
free_io_cache(table); // Will not do any harm
@@ -366,6 +368,7 @@ bool multi_delete::send_data(List<Item> &values)
DBUG_RETURN(0);
}
+
void multi_delete::send_error(uint errcode,const char *err)
{
DBUG_ENTER("multi_delete::send_error");
@@ -450,15 +453,13 @@ int multi_delete::do_deletes(bool from_send_error)
if ((local_error=table->file->delete_row(table->record[0])))
{
table->file->print_error(local_error,MYF(0));
- if (transactional_tables)
- {
- DBUG_RETURN(local_error);
- }
break;
}
deleted++;
}
end_read_record(&info);
+ if (thd->killed && !local_error)
+ local_error= 1;
if (local_error == -1) // End of file
local_error = 0;
}