summaryrefslogtreecommitdiff
path: root/sql/sp_pcontext.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2002-12-16 15:40:44 +0100
committerunknown <pem@mysql.com>2002-12-16 15:40:44 +0100
commitf6611aa0ab45aa5586101b34c444b8fab305fac9 (patch)
tree6a965cec0f444a67ed29877855da3a7309f6dce5 /sql/sp_pcontext.h
parent390b3e745c05a39704c01365958710189e216f79 (diff)
downloadmariadb-git-f6611aa0ab45aa5586101b34c444b8fab305fac9.tar.gz
Fixed the broken backpatching implementation.
Implemented IF-THEN-ELSE. sql/sp_head.cc: Reimplemented the broken backpatching, so it works for nested constructions and IF-THEN-ELSE too. sql/sp_head.h: Reimplemented the broken backpatching, so it works for nested constructions and IF-THEN-ELSE too. sql/sp_pcontext.cc: Return the value from push-methods, for convenience. sql/sp_pcontext.h: Return the value from push-methods, for convenience. sql/sql_yacc.yy: Implemented IF-THEN-ELSE. Corrected for the new backpatch method.
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r--sql/sp_pcontext.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h
index 7c8e2ba0c43..2eb59172365 100644
--- a/sql/sp_pcontext.h
+++ b/sql/sp_pcontext.h
@@ -38,7 +38,7 @@ typedef struct
my_bool isset;
} sp_pvar_t;
-typedef struct
+typedef struct sp_label
{
char *name;
uint ip; // Instruction index
@@ -116,10 +116,10 @@ class sp_pcontext : public Sql_alloc
return m_pvar+i;
}
- void
+ sp_label_t *
push_label(char *name, uint ip);
- void
+ sp_label_t *
push_gen_label(uint ip);
sp_label_t *
@@ -131,10 +131,10 @@ class sp_pcontext : public Sql_alloc
return m_label.head();
}
- inline void
+ inline sp_label_t *
pop_label()
{
- m_label.pop();
+ return m_label.pop();
}
private: