1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()

thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where
SF() modified non-ta table.
As the result of this artifact it was not possible to detect whether there were any side-effects when
top-level query ends. 
If the top level query table was not modified and the bit is lost there would be no binlogging.

Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags
telling whether the current query and the current transaction modified any non-ta table.
The flags stmt, all are dropped at the end of the query and the transaction.
This commit is contained in:
aelkin/elkin@andrepl.(none)
2007-03-23 17:12:58 +02:00
parent 0114c0a733
commit 2afa90b5c5
14 changed files with 140 additions and 69 deletions

View File

@ -311,7 +311,7 @@ cleanup:
error=1;
}
if (!transactional_table)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
thd->no_trans_update.all= TRUE;
}
free_underlaid_joins(thd, select_lex);
if (transactional_table)
@ -791,7 +791,7 @@ bool multi_delete::send_eof()
local_error=1; // Log write failed: roll back the SQL statement
}
if (!transactional_tables)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
thd->no_trans_update.all= TRUE;
}
/* Commit or rollback the current SQL statement */
if (transactional_tables)