diff options
author | unknown <konstantin@mysql.com> | 2006-02-08 13:11:44 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2006-02-08 13:11:44 +0300 |
commit | 2e07d010cdfe6fa14d62ab5ef8c4dd06a3ea8803 (patch) | |
tree | d52a6a2982aebb6ef2627a7d45c870911ee5e677 /sql/sp_head.h | |
parent | b38ec6f44adadef5e8838da24614edc60d08758b (diff) | |
parent | 1bbd24a6ee6578321f6632d9765ffe072c3b1751 (diff) | |
download | mariadb-git-2e07d010cdfe6fa14d62ab5ef8c4dd06a3ea8803.tar.gz |
Merge mysql.com:/home/kostja/mysql/tmp_merge
into mysql.com:/home/kostja/mysql/mysql-5.1-merge
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
mysql-test/t/trigger-grant.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index c4b6cb36090..f9c37090322 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -460,17 +460,34 @@ public: virtual void backpatch(uint dest, sp_pcontext *dst_ctx) {} + /* + Mark this instruction as reachable during optimization and return the + index to the next instruction. Jump instruction will mark their + destination too recursively. + */ virtual uint opt_mark(sp_head *sp) { marked= 1; return m_ip+1; } + /* + Short-cut jumps to jumps during optimization. This is used by the + jump instructions' opt_mark() methods. 'start' is the starting point, + used to prevent the mark sweep from looping for ever. Return the + end destination. + */ virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start) { return m_ip; } + /* + Inform the instruction that it has been moved during optimization. + Most instructions will simply update its index, but jump instructions + must also take care of their destination pointers. Forward jumps get + pushed to the backpatch list 'ibp'. + */ virtual void opt_move(uint dst, List<sp_instr> *ibp) { m_ip= dst; @@ -695,6 +712,9 @@ public: m_dest= dest; } + /* + Update the destination; used by the optimizer. + */ virtual void set_destination(uint old_dest, uint new_dest) { if (m_dest == old_dest) @@ -738,6 +758,7 @@ public: virtual uint opt_mark(sp_head *sp); + /* Override sp_instr_jump's shortcut; we stop here */ virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start) { return m_ip; @@ -821,6 +842,7 @@ public: virtual uint opt_mark(sp_head *sp); + /* Override sp_instr_jump's shortcut; we stop here. */ virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start) { return m_ip; @@ -858,15 +880,6 @@ public: virtual void print(String *str); - virtual void backpatch(uint dest, sp_pcontext *dst_ctx); - - virtual uint opt_mark(sp_head *sp) - { - if (m_count) - marked= 1; - return m_ip+1; - } - private: uint m_count; @@ -952,15 +965,6 @@ public: virtual void print(String *str); - virtual void backpatch(uint dest, sp_pcontext *dst_ctx); - - virtual uint opt_mark(sp_head *sp) - { - if (m_count) - marked= 1; - return m_ip+1; - } - private: uint m_count; |