summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-09-09 09:43:09 -0700
committerunknown <igor@rurik.mysql.com>2006-09-09 09:43:09 -0700
commita65342f38daf35199c21f366fe9ada98a11f4de9 (patch)
tree9721a6992699f7fc19bcb239fd0d92cb5d40c151 /sql/item.h
parent21be389b46ae539a4a917539027636644d7f4dec (diff)
downloadmariadb-git-a65342f38daf35199c21f366fe9ada98a11f4de9.tar.gz
Post-pushbuild corrections for fix of bug #21698.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index f6145d6e20c..cdd0f863aea 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -411,6 +411,17 @@ public:
typedef bool (Item::*Item_processor) (byte *arg);
+/*
+ Analyzer function
+ SYNOPSIS
+ argp in/out IN: Analysis parameter
+ OUT: Parameter to be passed to the transformer
+
+ RETURN
+ TRUE Invoke the transformer
+ FALSE Don't do it
+
+*/
typedef bool (Item::*Item_analyzer) (byte **argp);
typedef Item* (Item::*Item_transformer) (byte *arg);
typedef void (*Cond_traverser) (const Item *item, void *arg);
@@ -740,6 +751,22 @@ public:
return (this->*transformer)(arg);
}
+ /*
+ This function performs a generic "compilation" of the Item tree.
+ The process of compilation is assumed to go as follows:
+
+ compile()
+ {
+ if (this->*some_analyzer(...))
+ {
+ compile children if any;
+ this->*some_transformer(...);
+ }
+ }
+
+ i.e. analysis is performed top-down while transformation is done
+ bottom-up.
+ */
virtual Item* compile(Item_analyzer analyzer, byte **arg_p,
Item_transformer transformer, byte *arg_t)
{