summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-05-29 22:17:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-05-29 22:17:00 +0300
commitf98bb23168ee9bc0da8aa7111f35cf2539986387 (patch)
treeb7e9c3dc28e9d1fd82eebea077f3ca0aac640218 /sql/sql_lex.h
parente35676f5557d68c7b51ba47aa73dcdf72eafa436 (diff)
parente99ed820d790617a029b03d9c4ab437c246c956a (diff)
downloadmariadb-git-f98bb23168ee9bc0da8aa7111f35cf2539986387.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index b205207f64d..0e1d17d13f0 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -2143,6 +2143,38 @@ public:
}
/**
+ Checks either a trans/non trans temporary table is being accessed while
+ executing a statement.
+
+ @return
+ @retval TRUE if a temporary table is being accessed
+ @retval FALSE otherwise
+ */
+ inline bool stmt_accessed_temp_table()
+ {
+ DBUG_ENTER("THD::stmt_accessed_temp_table");
+ DBUG_RETURN(stmt_accessed_non_trans_temp_table() ||
+ stmt_accessed_trans_temp_table());
+ }
+
+ /**
+ Checks if a temporary transactional table is being accessed while executing
+ a statement.
+
+ @return
+ @retval TRUE if a temporary transactional table is being accessed
+ @retval FALSE otherwise
+ */
+ inline bool stmt_accessed_trans_temp_table()
+ {
+ DBUG_ENTER("THD::stmt_accessed_trans_temp_table");
+
+ DBUG_RETURN((stmt_accessed_table_flag &
+ ((1U << STMT_READS_TEMP_TRANS_TABLE) |
+ (1U << STMT_WRITES_TEMP_TRANS_TABLE))) != 0);
+ }
+
+ /**
Checks if a temporary non-transactional table is about to be accessed
while executing a statement.