summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h
index 86e03cdaaf5..3ac75ec06e1 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -2190,7 +2190,7 @@ struct TABLE_LIST
void set_materialized_derived()
{
DBUG_ENTER("set_materialized_derived");
- derived_type= ((derived_type & DTYPE_MASK) |
+ derived_type= ((derived_type & (derived ? DTYPE_MASK : DTYPE_VIEW)) |
DTYPE_TABLE | DTYPE_MATERIALIZE);
set_check_materialized();
DBUG_VOID_RETURN;