diff options
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 0f85da68c8e..c4b7628aaf3 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1212,7 +1212,7 @@ public: void free_items(); /* Close the active state associated with execution of this statement */ - virtual void cleanup_stmt(); + virtual void cleanup_stmt(bool /*restore_set_statement_vars*/); }; @@ -5453,6 +5453,34 @@ public: return (variables.old_behavior & OLD_MODE_UTF8_IS_UTF8MB3 ? MY_UTF8_IS_UTF8MB3 : 0); } + + + /** + Save current lex to the output parameter and reset it to point to + main_lex. This method is called from mysql_client_binlog_statement() + to temporary + + @param[out] backup_lex original value of current lex + */ + + void backup_and_reset_current_lex(LEX **backup_lex) + { + *backup_lex= lex; + lex= &main_lex; + } + + + /** + Restore current lex to its original value it had before calling the method + backup_and_reset_current_lex(). + + @param backup_lex original value of current lex + */ + + void restore_current_lex(LEX *backup_lex) + { + lex= backup_lex; + } }; |