summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2016-06-24 23:42:35 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-30 11:43:02 +0200
commitfb67cde2370f7427b3279309daac712c369f1cf8 (patch)
tree94eecb3c669fdf00957f49741b75ee6eec057826 /sql/item_cmpfunc.h
parent8f226121e52cbaa332964b24bd27e8babf9f2b06 (diff)
downloadmariadb-git-fb67cde2370f7427b3279309daac712c369f1cf8.tar.gz
Use default character set for expressions
- Force usage of () around complex DEFAULT expressions - Give error if DEFAULT expression contains invalid characters - Don't use const_charset_conversion for stored Item_func_sysconf expressions as the result is not constaint over different executions - Fixed Item_func_user() to not store calculated value in str_value
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 5789186dbe8..33e061072da 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -197,6 +197,7 @@ public:
virtual CHARSET_INFO *compare_collation() const { return NULL; }
void fix_length_and_dec() { decimals=0; max_length=1; }
uint decimal_precision() const { return 1; }
+ bool need_parentheses_in_default() { return true; }
};
@@ -1488,6 +1489,7 @@ public:
CHARSET_INFO *compare_collation() const { return cmp_collation.collation; }
void cleanup();
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond);
+ bool need_parentheses_in_default() { return true; }
};
/*