1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -1440,7 +1440,11 @@ public:
bool charset_is_system_charset, charset_is_collation_connection;
bool charset_is_character_set_filesystem;
bool enable_slow_log; /* enable slow log for current statement */
bool no_trans_update, abort_on_warning;
struct {
bool all:1;
bool stmt:1;
} no_trans_update;
bool abort_on_warning;
bool got_warning; /* Set on call to push_warning() */
bool no_warnings_for_error; /* no warnings on call to my_error() */
/* set during loop of derived table processing */
@ -1664,7 +1668,7 @@ public:
inline bool really_abort_on_warning()
{
return (abort_on_warning &&
(!no_trans_update ||
(!no_trans_update.stmt ||
(variables.sql_mode & MODE_STRICT_ALL_TABLES)));
}
void set_status_var_init();