summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <mats@kindahl-laptop.dnsalias.net>2007-05-31 20:17:31 +0200
committerunknown <mats@kindahl-laptop.dnsalias.net>2007-05-31 20:17:31 +0200
commitdb0ce6ff6eb7c7dd16538fc8ce63e9ce8660000d (patch)
treebbfe50d2fc0a5dc85adedfa669b350604759b382 /sql/sql_lex.h
parent80af30efe10621b7c2b64f98cf957e0c1b5b5f8d (diff)
parente9adcac2e8f663dbfda38ea917e00ca8af18440c (diff)
downloadmariadb-git-db0ce6ff6eb7c7dd16538fc8ce63e9ce8660000d.tar.gz
Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into kindahl-laptop.dnsalias.net:/home/bk/b28618-mysql-5.1-rpl sql/item_create.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/share/errmsg.txt: Auto merged sql/sql_view.cc: Auto merged sql/sql_lex.h: Manual merge.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h44
1 files changed, 36 insertions, 8 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 68a3092cd77..a953f1a2684 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -951,14 +951,6 @@ public:
uint sroutines_list_own_elements;
/*
- Tells if the parsing stage detected that some items require row-based
- binlogging to give a reliable binlog/replication, or if we will use
- stored functions or triggers which themselves need require row-based
- binlogging.
- */
- bool binlog_row_based_if_mixed;
-
- /*
These constructor and destructor serve for creation/destruction
of Query_tables_list instances which are used as backup storage.
*/
@@ -1005,12 +997,48 @@ public:
query_tables_own_last= 0;
}
}
+
+ /**
+ Has the parser/scanner detected that this statement is unsafe?
+ */
+ inline bool is_stmt_unsafe() const {
+ return binlog_stmt_flags & (1U << BINLOG_STMT_FLAG_UNSAFE);
+ }
+
+ /**
+ Flag the current (top-level) statement as unsafe.
+
+ The flag will be reset after the statement has finished.
+
+ */
+ inline void set_stmt_unsafe() {
+ binlog_stmt_flags|= (1U << BINLOG_STMT_FLAG_UNSAFE);
+ }
+
+ inline void clear_stmt_unsafe() {
+ binlog_stmt_flags&= ~(1U << BINLOG_STMT_FLAG_UNSAFE);
+ }
+
/**
true if the parsed tree contains references to stored procedures
or functions, false otherwise
*/
bool uses_stored_routines() const
{ return sroutines_list.elements != 0; }
+
+private:
+ enum enum_binlog_stmt_flag {
+ BINLOG_STMT_FLAG_UNSAFE,
+ BINLOG_STMT_FLAG_COUNT
+ };
+
+ /*
+ Tells if the parsing stage detected properties of the statement,
+ for example: that some items require row-based binlogging to give
+ a reliable binlog/replication, or if we will use stored functions
+ or triggers which themselves need require row-based binlogging.
+ */
+ uint32 binlog_stmt_flags;
};