1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.
This commit is contained in:
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
2007-10-19 14:54:05 +05:00
parent 3d203e55e6
commit b4f558419f
3 changed files with 20 additions and 1 deletions

View File

@ -185,4 +185,10 @@ ERROR 21000: Operand should contain 1 column(s)
drop table table_26093;
drop function func_26093_a;
drop function func_26093_b;
create table t1 (a int not null);
insert into t1 values (-1), (-2);
select min(a) from t1 group by inet_ntoa(a);
min(a)
-2
drop table t1;
End of 5.0 tests