summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-06-02 14:14:57 -0700
committerunknown <igor@rurik.mysql.com>2006-06-02 14:14:57 -0700
commite3e0658779bffacd5323efb54ecb7f42ded19231 (patch)
tree73c42f8475188528c843bc2d2a7f64fa2f122d1e /sql/sql_select.h
parenta9824f263dcaedaabfbbc9e398eb55117f19a41f (diff)
downloadmariadb-git-e3e0658779bffacd5323efb54ecb7f42ded19231.tar.gz
Fixed bug #18206.
The bug report revealed two problems related to min/max optimization: 1. If the length of a constant key used in a SARGable condition for for the MIN/MAX fields is greater than the length of the field an unwanted warning on key truncation is issued; 2. If MIN/MAX optimization is applied to a partial index, like INDEX(b(4)) than can lead to returning a wrong result set. mysql-test/r/func_group.result: Added test cases for bug #18206. mysql-test/t/func_group.test: Added test cases for bug #18206. sql/opt_sum.cc: Fixed bug #18206. Suppressed the warning about data truncation when store_val_in_field was used to store keys for the field used in MIN/MAX optimization. Blocked MIN/MAX optimization for partial keys, such as in INDEX(b(4)). sql/sql_select.cc: Fixed bug #18206. Added a parameter for the function store_val_in_field allowing to control setting warnings about data truncation in the function. sql/sql_select.h: Fixed bug #18206. Added a parameter for the function store_val_in_field allowing to control setting warnings about data truncation in the function.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 94cc8839466..75cd0b4d797 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -335,7 +335,7 @@ extern const char *join_type_str[];
void TEST_join(JOIN *join);
/* Extern functions in sql_select.cc */
-bool store_val_in_field(Field *field,Item *val);
+bool store_val_in_field(Field *field, Item *val, enum_check_fields check_flag);
TABLE *create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
ORDER *group, bool distinct, bool save_sum_fields,
ulong select_options, ha_rows rows_limit,