summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorramil/ram@mysql.com/ramil.myoffice.izhnet.ru <>2007-10-19 14:54:05 +0500
committerramil/ram@mysql.com/ramil.myoffice.izhnet.ru <>2007-10-19 14:54:05 +0500
commitb4f558419ff3b603fbd29adfa085f2d2c8f4b379 (patch)
tree69db6a293a097f50aa1295d09f80aad52edf2555 /sql/item_strfunc.h
parent3d203e55e67946e505f85a7d3a4321794ece51fe (diff)
downloadmariadb-git-b4f558419ff3b603fbd29adfa085f2d2c8f4b379.tar.gz
Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
Problem: lying to the optimizer that a function (Item_func_inet_ntoa) cannot return NULL values leads to unexpected results (in the case group keys creation/comparison is broken). Fix: Item_func_inet_ntoa::maybe_null should be set properly.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 6ca0b89a22b..4ffd8125422 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -683,7 +683,12 @@ public:
}
String* val_str(String* str);
const char *func_name() const { return "inet_ntoa"; }
- void fix_length_and_dec() { decimals = 0; max_length=3*8+7; }
+ void fix_length_and_dec()
+ {
+ decimals= 0;
+ max_length= 3 * 8 + 7;
+ maybe_null= 1;
+ }
};
class Item_func_quote :public Item_str_func