Commit d035e5c8 authored by ramil/ram@ramil.myoffice.izhnet.ru's avatar ramil/ram@ramil.myoffice.izhnet.ru
Browse files

Merge mysql.com:/home/ram/work/mysql-5.0-maint

into  mysql.com:/home/ram/work/b31349/b31349.5.0
parents c54e1855 b4f55841
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
+8 −0
Original line number Diff line number Diff line
@@ -189,4 +189,12 @@ drop table table_26093;
drop function func_26093_a;
drop function func_26093_b;

#
# Bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
#
create table t1 (a int not null);
insert into t1 values (-1), (-2);
select min(a) from t1 group by inet_ntoa(a);
drop table t1;

--echo End of 5.0 tests
+6 −1
Original line number Diff line number Diff line
@@ -683,7 +683,12 @@ class Item_func_inet_ntoa : public Item_str_func
    }
  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