summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-29 12:20:21 +0400
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-29 12:20:21 +0400
commit42894ed0b870f4adfc6023404877732a08b1ec22 (patch)
treee9112ce10721f2b915b8376caddb5001056b04b1 /sql/item_cmpfunc.h
parenta634d1bf474aab88c44d448035b6a9a35d6e795d (diff)
downloadmariadb-git-42894ed0b870f4adfc6023404877732a08b1ec22.tar.gz
Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY Problem: improper maximum length calculation of the CASE function leads to decimal value truncation (storing/retrieving decimal field values). Fix: accurately calculate maximum length/unsigned flag/decimals parameters of the CASE function. mysql-test/r/case.result: Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, JOIN, and ORDER BY - test result. mysql-test/t/case.test: Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, JOIN, and ORDER BY - test case. sql/item_cmpfunc.cc: Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, JOIN, and ORDER BY - accurately calculate Item_func_case::max_length/unsigned_flag/decimals. sql/item_cmpfunc.h: Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, JOIN, and ORDER BY - accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
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 8410c66b034..3e32b5d2c9c 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -753,6 +753,8 @@ public:
void print(String *str);
Item *find_item(String *str);
CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
+ void agg_str_lengths(Item *arg);
+ void agg_num_lengths(Item *arg);
};