diff options
author | Igor Babaev <igor@askmonty.org> | 2012-06-26 11:37:48 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-06-26 11:37:48 -0700 |
commit | 4a6a08309cd78091246a7fd598bc43cd25deba45 (patch) | |
tree | 67d596918a2c844d7d873342caa754c39e526041 /sql/field.h | |
parent | 4ff6fd34dae6315384d8c38ea69092cde09b78ba (diff) | |
parent | 072097174c8b91299fe74a3cd7c5248e6e3cfc57 (diff) | |
download | mariadb-git-4a6a08309cd78091246a7fd598bc43cd25deba45.tar.gz |
Merge 5.5 -> 5.5-mwl248.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index 5df2f57fee4..ec09353c3de 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. - Copyright (c) 2008-2011 Monty Program Ab +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2008, 2011, Monty Program Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,7 +63,11 @@ enum Derivation #define my_charset_numeric my_charset_latin1 #define MY_REPERTOIRE_NUMERIC MY_REPERTOIRE_ASCII +/* The length of the header part for each virtual column in the .frm file */ +#define FRM_VCOL_HEADER_SIZE(b) (3 + test(b)) + class Count_distinct_field; + struct ha_field_option_struct; struct st_cache_field; @@ -2410,6 +2414,10 @@ public: { return (flags & (BINCMP_FLAG | BINARY_FLAG)) != 0; } + uint virtual_col_expr_maxlen() + { + return 255 - FRM_VCOL_HEADER_SIZE(interval != NULL); + } private: const String empty_set_string; }; |