#include <sp_head.h>
List of all members.
Detailed Description
sp_parser_data provides a scope for attributes used at the SP-parsing stage only.
Member Function Documentation
Put the instruction on the backpatch list, associated with the label.
- Parameters:
-
i | The SP-instruction. |
label | The label. |
- Returns:
- Error flag.
Add a SP-instruction to the current level.
- Parameters:
-
- Returns:
- Error flag.
Update all instruction with the given label in the backpatch list to the given instruction pointer.
- Parameters:
-
label | The label. |
dest | The instruction pointer. |
Backpatch (and pop) the current level to the given instruction pointer.
- Parameters:
-
dest | The instruction pointer. |
Finish parsing of a stored program body statement.
This method switches THD::mem_root and THD::free_list back when SP-body parsing is completed.
- Parameters:
-
- Return values:
-
true | if SP-body statement is being parsed. |
false | otherwise. |
Start a new backpatch level for the SP-instruction requiring continue destination. If the SP-instruction is NULL, the level is just increased.
- Note:
- Only subclasses of sp_lex_branch_instr need backpatching of continue destinations (and no other classes do):
That's why the methods below accept sp_lex_branch_instr to make this relationship clear. And these two functions are the only places where set_cont_dest() is used, so set_cont_dest() is also a member of sp_lex_branch_instr.
- Todo:
- These functions should probably be declared in a separate interface class, but currently we try to minimize the sp_instr hierarchy.
- Returns:
- false always.
Retrieve expression start pointer in the query string.
This function is named 'pop' to highlight that it changes the internal state, and two subsequent calls may not return same value.
- Note:
- It's true only in the debug mode, but this check is very useful in the parser to ensure we "pop" every "pushed" pointer, because we have lots of branches, and it's pretty easy to forget something somewhere.
Remember expression start pointer in the query string.
This function is named 'push' to highlight that the pointer must be retrieved (pop) later.
- See also:
- the note for pop_expr_start_ptr().
Start parsing a stored program body statement.
This method switches THD::mem_root and THD::free_list in order to parse SP-body. The current values are kept to be restored after the body statement is parsed.
- Parameters:
-
thd | Thread context. |
sp | Stored Program being parsed. |
The documentation for this class was generated from the following files: