MySQL 5.6.14 Source Code Document
|
Classes | |
struct | CodeMetaInfo |
Public Member Functions | |
NdbInterpretedCode (const NdbDictionary::Table *table=0, Uint32 *buffer=0, Uint32 buffer_word_size=0) | |
int | load_const_null (Uint32 RegDest) |
int | load_const_u16 (Uint32 RegDest, Uint32 Constant) |
int | load_const_u32 (Uint32 RegDest, Uint32 Constant) |
int | load_const_u64 (Uint32 RegDest, Uint64 Constant) |
int | read_attr (Uint32 RegDest, Uint32 attrId) |
int | read_attr (Uint32 RegDest, const NdbDictionary::Column *column) |
int | write_attr (Uint32 attrId, Uint32 RegSource) |
int | write_attr (const NdbDictionary::Column *column, Uint32 RegSource) |
int | add_reg (Uint32 RegDest, Uint32 RegSource1, Uint32 RegSource2) |
int | sub_reg (Uint32 RegDest, Uint32 RegSource1, Uint32 RegSource2) |
int | def_label (int LabelNum) |
int | branch_label (Uint32 Label) |
int | branch_ge (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_gt (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_le (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_lt (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_eq (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_ne (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_ne_null (Uint32 RegLvalue, Uint32 Label) |
int | branch_eq_null (Uint32 RegLvalue, Uint32 Label) |
int | branch_col_eq (const void *val, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_ne (const void *val, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_lt (const void *val, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_le (const void *val, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_gt (const void *val, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_ge (const void *val, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_eq_null (Uint32 attrId, Uint32 Label) |
int | branch_col_ne_null (Uint32 attrId, Uint32 Label) |
int | branch_col_like (const void *val, Uint32 len, Uint32 attrId, Uint32 Label) |
int | branch_col_notlike (const void *val, Uint32 len, Uint32 attrId, Uint32 Label) |
int | branch_col_and_mask_eq_mask (const void *mask, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_and_mask_ne_mask (const void *mask, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_and_mask_eq_zero (const void *mask, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | branch_col_and_mask_ne_zero (const void *mask, Uint32 unused, Uint32 attrId, Uint32 Label) |
int | interpret_exit_ok () |
int | interpret_exit_nok (Uint32 ErrorCode) |
int | interpret_exit_nok () |
int | interpret_exit_last_row () |
int | add_val (Uint32 attrId, Uint32 aValue) |
int | add_val (Uint32 attrId, Uint64 aValue) |
int | sub_val (Uint32 attrId, Uint32 aValue) |
int | sub_val (Uint32 attrId, Uint64 aValue) |
int | def_sub (Uint32 SubroutineNumber) |
int | call_sub (Uint32 SubroutineNumber) |
int | ret_sub () |
int | finalise () |
const NdbDictionary::Table * | getTable () const |
struct NdbError & | getNdbError () const |
Uint32 | getWordsUsed () const |
int | copy (const NdbInterpretedCode &src) |
Friends | |
class | NdbOperation |
class | NdbScanOperation |
class | NdbQueryOperationImpl |
class | NdbQueryOptionsImpl |
Definition at line 72 of file NdbInterpretedCode.hpp.
NdbInterpretedCode::NdbInterpretedCode | ( | const NdbDictionary::Table * | table = 0 , |
Uint32 * | buffer = 0 , |
||
Uint32 | buffer_word_size = 0 |
||
) |
NdbInterpretedCode constructor
table | The table which this program will be run against. This parameter must be supplied if the program is table specific (i.e. reads from or writes to columns in the table). |
buffer | Pointer to a buffer of 32bit words used to store the program. |
buffer_word_size | Length of the buffer passed in If the program exceeds this length then adding new instructions will fail with error 4518, Too many instructions in interpreted program. |
Alternatively, if no buffer is passed, a buffer will be dynamically allocated internally and extended to cope as instructions are added.
Definition at line 40 of file NdbInterpretedCode.cpp.
int NdbInterpretedCode::call_sub | ( | Uint32 | SubroutineNumber | ) |
call_sub Call a subroutine by number. When the subroutine returns, the program will continue executing at the next instruction. Subroutines can be called from the main program, or from subroutines. The maximum stack depth is currently 32.
Space required Buffer Request message call_sub 1 word 1 word
SubroutineNumber | Which subroutine to call |
Definition at line 889 of file NdbInterpretedCode.cpp.
int NdbInterpretedCode::copy | ( | const NdbInterpretedCode & | src | ) |
Makes a deep copy of 'src'
Each NdbInterpretedCode manages life cycle of m_internal_buffer.
Definition at line 967 of file NdbInterpretedCode.cpp.
int NdbInterpretedCode::def_sub | ( | Uint32 | SubroutineNumber | ) |
def_subroutine Define a subroutine. Subroutines can only be defined after all main program instructions are defined. Instructions following this, up to the next ret_sub() instruction are part of this subroutine. Subroutine numbers must be contiguous from zero but do not have to be in order.
Space required Buffer Request message def_sub 2 words 0 words
SubroutineNumber | number to identify this subroutine |
Definition at line 859 of file NdbInterpretedCode.cpp.
int NdbInterpretedCode::finalise | ( | ) |
finalise This method must be called after an Interpreted program is defined and before it is used. It uses the label and subroutine meta information to resolve branch jumps and subroutine calls. It can only be called once. If no instructions have been defined, then it will attempt to add a single interpret_exit_ok instruction before finalisation.
Definition at line 1047 of file NdbInterpretedCode.cpp.
|
read |
getNdbError This method returns the most recent error associated with this NdbInterpretedCode object.
Definition at line 949 of file NdbInterpretedCode.cpp.
const NdbDictionary::Table * NdbInterpretedCode::getTable | ( | ) | const |
getTable() Returns a pointer to the table object representing the table that this NdbInterpretedCode object operates on. This can be NULL if no table object was supplied at construction time.
Definition at line 940 of file NdbInterpretedCode.cpp.
Uint32 NdbInterpretedCode::getWordsUsed | ( | ) | const |
getWordsUsed Returns the number of words of the supplied or internal buffer that have been used.
Definition at line 959 of file NdbInterpretedCode.cpp.
int NdbInterpretedCode::ret_sub | ( | ) |
ret_sub Return from a subroutine.
Space required Buffer Request message ret_sub 1 word 1 word
Definition at line 900 of file NdbInterpretedCode.cpp.
|
friend |
Sender(s)
Definition at line 544 of file NdbInterpretedCode.hpp.