summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-11-08 22:54:03 -0800
committerIgor Babaev <igor@askmonty.org>2018-11-08 22:55:26 -0800
commit2d7d19a3cd18f4bc2ac39ac61e99eb8f2ff933ca (patch)
treec7c7392f8ce8c711ee080c4920de18d1c892b419 /sql/item.h
parent3fbee66499624cf2340eaebcd230cbabf0dd97ee (diff)
downloadmariadb-git-2d7d19a3cd18f4bc2ac39ac61e99eb8f2ff933ca.tar.gz
MDEV-17574 SIGSEGV or Assertion `producing_item != __null' in
Item_direct_view_ref::derived_field_transformer_for_where upon updating a view The condition pushed into a materialized derived / view mast be adjusted for the new context: its column references must be substituted for references to the columns of the underlying tables if the condition is pushed into WHERE. The substitution is performed by the 'transform' method. If the materialized derived is used in a mergeable view then the references to the columns of the view are represented by Item_direct_view_ref objects. The transform method first processes the item wrapped in such an object and only after this it transforms the object itself. The transformation procedure of an Item_direct_view_ref object has to know whether the item it wraps has been substituted. If so the procedure does not have to do anything. In the code before this patch it was not possible for the transformation procedure used by an Item_direct_view_ref object to find out whether a substitution for the wrapped item had happened.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 8d02d981d38..3a64ea1a75d 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -147,6 +147,7 @@ bool mark_unsupported_function(const char *w1, const char *w2,
#define NO_EXTRACTION_FL (1 << 6)
#define FULL_EXTRACTION_FL (1 << 7)
+#define SUBSTITUTION_FL (1 << 8)
#define EXTRACTION_MASK (NO_EXTRACTION_FL | FULL_EXTRACTION_FL)
class DTCollation {