summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-05-06 01:13:05 +0200
committerSergei Golubchik <serg@mariadb.org>2022-05-15 20:37:51 +0200
commit29c07643a162d614dcb3ec6d69992bdd1df37cd6 (patch)
tree2760e6d394f929bb9388ba4c71c2224a30cc53dc /sql/sql_lex.h
parent16cebed54065ad9e18953aa86d48f6007d53c2d3 (diff)
downloadmariadb-git-29c07643a162d614dcb3ec6d69992bdd1df37cd6.tar.gz
enable -Wenum-compare -Wenum-conversion
to make the all headers -std=c++20 clean for those, who need c++20 (some plugins)
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 3db50222a27..09e0df2edca 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1995,8 +1995,7 @@ public:
@retval nonzero if the statement is a row injection
*/
inline bool is_stmt_row_injection() const {
- return binlog_stmt_flags &
- (1U << (BINLOG_STMT_UNSAFE_COUNT + BINLOG_STMT_TYPE_ROW_INJECTION));
+ return binlog_stmt_flags & (1U << BINLOG_STMT_TYPE_ROW_INJECTION);
}
/**
@@ -2006,8 +2005,7 @@ public:
*/
inline void set_stmt_row_injection() {
DBUG_ENTER("set_stmt_row_injection");
- binlog_stmt_flags|=
- (1U << (BINLOG_STMT_UNSAFE_COUNT + BINLOG_STMT_TYPE_ROW_INJECTION));
+ binlog_stmt_flags|= (1U << BINLOG_STMT_TYPE_ROW_INJECTION);
DBUG_VOID_RETURN;
}
@@ -2283,7 +2281,7 @@ private:
The statement is a row injection (i.e., either a BINLOG
statement or a row event executed by the slave SQL thread).
*/
- BINLOG_STMT_TYPE_ROW_INJECTION = 0,
+ BINLOG_STMT_TYPE_ROW_INJECTION = BINLOG_STMT_UNSAFE_COUNT,
/** The last element of this enumeration type. */
BINLOG_STMT_TYPE_COUNT
@@ -2297,8 +2295,8 @@ private:
- The low BINLOG_STMT_UNSAFE_COUNT bits indicate the types of
unsafeness that the current statement has.
- - The next BINLOG_STMT_TYPE_COUNT bits indicate if the statement
- is of some special type.
+ - The next BINLOG_STMT_TYPE_COUNT-BINLOG_STMT_TYPE_COUNT bits indicate if
+ the statement is of some special type.
This must be a member of LEX, not of THD: each stored procedure
needs to remember its unsafeness state between calls and each