summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-04-18 07:26:23 +0400
committerunknown <sergefp@mysql.com>2005-04-18 07:26:23 +0400
commit11652c1f45f1c6be6c15abfe926da1cef1b8b4f9 (patch)
tree5fc1e3795dc327d3d082cc3a217cbe7058e6a34a /sql/protocol.cc
parentb51f70b81e6af314093dd28728a3dc68d1a28fff (diff)
downloadmariadb-git-11652c1f45f1c6be6c15abfe926da1cef1b8b4f9.tar.gz
Fix for BUG#9298: Make int->string conversion sign-aware in Protocol_simple::store_long
mysql-test/r/group_by.result: Testcase for BUG#9298 mysql-test/t/group_by.test: Testcase for BUG#9298
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 773bbe697a3..485605ce8cd 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -810,7 +810,7 @@ bool Protocol_simple::store_long(longlong from)
#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));
}