1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

New alternate UNION syntax and bug fix for multi-table deletes

This commit is contained in:
Sinisa@sinisa.nasamreza.org
2001-10-25 14:41:49 +03:00
parent 386b5ad183
commit 006ff09c34
6 changed files with 42 additions and 44 deletions

View File

@@ -455,11 +455,13 @@ int multi_delete::do_deletes (bool from_send_error)
bool multi_delete::send_eof()
{
thd->proc_info="deleting from reference tables"; /* out: 1 if error, 0 if success */
/* Does deletes for the last n - 1 tables, returns 0 if ok */
int error = do_deletes(false); /* do_deletes returns 0 if success */
/* reset used flags */
delete_tables->table->no_keyread=0;
if (error == -1) error = 0;
thd->proc_info="end";
if (error)
{
@@ -485,12 +487,10 @@ bool multi_delete::send_eof()
!some_table_is_not_transaction_safe(delete_tables))
error=1; /* Log write failed: roll back
the SQL statement */
if (deleted)
{
/* If autocommit is on we do a commit, in an error case we
roll back the current SQL statement */
VOID(ha_autocommit_or_rollback(thd, error != 0));
}
/* Commit or rollback the current SQL statement */
VOID(ha_autocommit_or_rollback(thd,error > 0));
}
::send_ok(&thd->net,deleted);