summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 80bfc516ef7..2ee984e3a2a 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -134,6 +134,8 @@ public:
Field *tmp= (Field*) memdup_root(root,(char*) this,size_of());
if (tmp)
{
+ if (tmp->table->maybe_null)
+ tmp->flags&= ~NOT_NULL_FLAG;
tmp->table= new_table;
tmp->key_start= tmp->part_of_key= tmp->part_of_sortkey= 0;
tmp->unireg_check=Field::NONE;