diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-08-14 12:42:06 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-08-14 12:42:06 +0300 |
commit | b34c8645cdb301140327528a76a79a9e68c25611 (patch) | |
tree | cb49384a1f2715f859ecea334f20bf4a46ecbcce /sql/sql_class.h | |
parent | 7772c7cd945cf674b212b82f4d156099c67344a2 (diff) | |
parent | 65d48b4a7bd7a57a27f2e9ca54473e1ae86223b5 (diff) | |
download | mariadb-git-b-10.3-10.3-merge.tar.gz |
Merge 10.3 into 10.4b-10.3-10.3-merge
Conflicts:
mysql-test/suite/galera/disabled.def (resolved)
mysql-test/suite/galera/r/MW-328A.result (run tests)
mysql-test/suite/innodb/r/alter_copy.result (needs check)
mysql-test/suite/innodb/t/trx_id_future.test (needs check)
sql/opt_range.cc (needs check)
sql/share/errmsg-utf8.txt (needs check)
sql/sql_parse.cc (needs check)
sql/sql_select.cc (needs check)
sql/sql_table.cc (need check)
sql/wsrep_mysqld.cc (resolved)
sql/wsrep_sst.cc (resolved)
sql/wsrep_thd.cc (resolved)
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 5fac4369623..2b46fc69365 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2437,6 +2437,20 @@ public: /* container for handler's private per-connection data */ Ha_data ha_data[MAX_HA]; + /** + Bit field for the state of binlog warnings. + + The first Lex::BINLOG_STMT_UNSAFE_COUNT bits list all types of + unsafeness that the current statement has. + + This must be a member of THD and not of LEX, because warnings are + detected and issued in different places (@c + decide_logging_format() and @c binlog_query(), respectively). + Between these calls, the THD->lex object may change; e.g., if a + stored routine is invoked. Only THD persists between the calls. + */ + uint32 binlog_unsafe_warning_flags; + #ifndef MYSQL_CLIENT binlog_cache_mngr * binlog_setup_trx_data(); @@ -2546,20 +2560,6 @@ private: */ enum_binlog_format current_stmt_binlog_format; - /** - Bit field for the state of binlog warnings. - - The first Lex::BINLOG_STMT_UNSAFE_COUNT bits list all types of - unsafeness that the current statement has. - - This must be a member of THD and not of LEX, because warnings are - detected and issued in different places (@c - decide_logging_format() and @c binlog_query(), respectively). - Between these calls, the THD->lex object may change; e.g., if a - stored routine is invoked. Only THD persists between the calls. - */ - uint32 binlog_unsafe_warning_flags; - /* Number of outstanding table maps, i.e., table maps in the transaction cache. @@ -4536,6 +4536,18 @@ public: } void leave_locked_tables_mode(); int decide_logging_format(TABLE_LIST *tables); + /* + In Some cases when decide_logging_format is called it does not have all + information to decide the logging format. So that cases we call decide_logging_format_2 + at later stages in execution. + One example would be binlog format for IODKU but column with unique key is not inserted. + We dont have inserted columns info when we call decide_logging_format so on later stage we call + decide_logging_format_low + + @returns 0 if no format is changed + 1 if there is change in binlog format + */ + int decide_logging_format_low(TABLE *table); enum need_invoker { INVOKER_NONE=0, INVOKER_USER, INVOKER_ROLE}; void binlog_invoker(bool role) { m_binlog_invoker= role ? INVOKER_ROLE : INVOKER_USER; } |