From 0c69f22032abd6f162829ee31c5ee7d34b84e107 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 18 Jun 2012 22:32:17 -0700 Subject: 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. --- sql/field.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index 3cfcf308282..308ef788f9e 100644 --- a/sql/field.h +++ b/sql/field.h @@ -2199,6 +2199,10 @@ public: { return (flags & (BINCMP_FLAG | BINARY_FLAG)) != 0; } + uint virtual_col_expr_maxlen() + { + return 255 - FRM_VCOL_HEADER_SIZE(interval != NULL); + } }; -- cgit v1.2.1