summaryrefslogtreecommitdiff
path: root/sql/unireg.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-06-18 22:32:17 -0700
committerIgor Babaev <igor@askmonty.org>2012-06-18 22:32:17 -0700
commit0c69f22032abd6f162829ee31c5ee7d34b84e107 (patch)
treee524ff3959bfbe1bb63324a8cbcb01c6087909d4 /sql/unireg.h
parent64aa1fcb1354ffa24999a1512258c897116b0928 (diff)
downloadmariadb-git-0c69f22032abd6f162829ee31c5ee7d34b84e107.tar.gz
Fixed bug mdev-354.
Virtual columns of ENUM and SET data types were not supported properly in the original patch that introduced virtual columns into MariaDB 5.2. The problem was that for any virtual column the patch used the interval_id field of the definition of the column in the frm file as a reference to the virtual column expression. The fix stores the optional interval_id of the virtual column in the extended header of the virtual column expression.
Diffstat (limited to 'sql/unireg.h')
-rw-r--r--sql/unireg.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/unireg.h b/sql/unireg.h
index b22ec23cd51..64763992537 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -214,10 +214,7 @@
#define DEFAULT_KEY_CACHE_NAME "default"
/* The length of the header part for each virtual column in the .frm file */
-#define FRM_VCOL_HEADER_SIZE 3
-
-/* Maximum length of the defining expression for a virtual columns */
-#define VIRTUAL_COLUMN_EXPRESSION_MAXLEN 255 - FRM_VCOL_HEADER_SIZE
+#define FRM_VCOL_HEADER_SIZE(b) (3 + test(b))
/* Include prototypes for unireg */