summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-05-20 18:54:43 -0700
committerunknown <igor@rurik.mysql.com>2006-05-20 18:54:43 -0700
commitdb5d19741402294761fb0194d29b3cb6313fdf97 (patch)
tree0b8dec39db90ebdf6a685c0bbd32330e0f176bd7 /sql/field.h
parent47302570e639927b258e10a7c009e6d585ba8adf (diff)
downloadmariadb-git-db5d19741402294761fb0194d29b3cb6313fdf97.tar.gz
Fixed bug #19089.
When a CREATE TABLE command created a table from a materialized view id does not inherit default values from the underlying table. Moreover the temporary table used for the view materialization does not inherit those default values. In the case when the underlying table contained ENUM fields it caused misleading error messages. In other cases the created table contained wrong default values. The code was modified to ensure inheritance of default values for materialized views. mysql-test/r/view.result: Added a test case for bug #19089. mysql-test/t/view.test: Added a test case for bug #19089. sql/field.cc: Fixed bug ##19089. Added field dflt_field to the class Field. This field is set for temp table fields that inherits default values of items from which they are created. sql/field.h: Fixed bug ##19089. Added field dflt_field to the class Field. This field is set for temp table fields that inherits default values of items from which they are created. sql/sql_select.cc: Fixed bug #19089. When a CREATE TABLE command created a table from a materialized view id does not inherit default values from the underlying table. Moreover the temporary table used for the view materialization does not inherit those default values. The code was modified to ensure inheritance of default values for materialized views.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index f4d27e46877..1801f0d0f86 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -53,6 +53,7 @@ public:
char *ptr; // Position to field in record
uchar *null_ptr; // Byte where null_bit is
+ Field *dflt_field; // Field to copy default value from
/*
Note that you can use table->in_use as replacement for current_thd member
only inside of val_*() and store() members (e.g. you can't use it in cons)