List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:April 18 2005 5:26am
Subject:bk commit into 4.1 tree (sergefp:1.2195) BUG#9298
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2195 05/04/18 07:26:23 sergefp@stripped +3 -0
  Fix for BUG#9298: Make int->string conversion sign-aware in
Protocol_simple::store_long 

  sql/protocol.cc
    1.99 05/04/18 07:26:20 sergefp@stripped +1 -1
    Fix for BUG#9298: Make int->string conversion sign-aware in
Protocol_simple::store_long 

  mysql-test/t/group_by.test
    1.35 05/04/18 07:26:20 sergefp@stripped +7 -0
    Testcase for BUG#9298

  mysql-test/r/group_by.result
    1.45 05/04/18 07:26:19 sergefp@stripped +9 -0
    Testcase for BUG#9298

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-4.1-bug9298

--- 1.98/sql/protocol.cc	2005-03-07 18:45:12 +03:00
+++ 1.99/sql/protocol.cc	2005-04-18 07:26:20 +04:00
@@ -810,7 +810,7 @@
 #endif
   char buff[20];
   return net_store_data((char*) buff,
-			(uint) (int10_to_str((int) from,buff, -10)-buff));
+			(uint) (int10_to_str((int)from,buff, (from <0)?-10:10)-buff));
 }
 
 

--- 1.44/mysql-test/r/group_by.result	2005-03-31 20:23:08 +04:00
+++ 1.45/mysql-test/r/group_by.result	2005-04-18 07:26:19 +04:00
@@ -702,3 +702,12 @@
 val-74
 val-98
 drop table t1,t2;
+create table t1 (b int4 unsigned not null);
+insert into t1 values(3000000000);
+select * from t1;
+b
+3000000000
+select min(b) from t1;
+min(b)
+3000000000
+drop table t1;

--- 1.34/mysql-test/t/group_by.test	2005-03-31 20:23:08 +04:00
+++ 1.35/mysql-test/t/group_by.test	2005-04-18 07:26:20 +04:00
@@ -515,3 +515,10 @@
 select c from t2 where a = 2 and b = 'val-2' group by c;
 drop table t1,t2;
 
+# Test for BUG#9298 "Wrong handling of int4 unsigned columns in GROUP functions"
+# (the actual problem was with protocol code, not GROUP BY)
+create table t1 (b int4 unsigned not null);
+insert into t1 values(3000000000);
+select * from t1;
+select min(b) from t1;
+drop table t1;
Thread
bk commit into 4.1 tree (sergefp:1.2195) BUG#9298Sergey Petrunia18 Apr