| Bug #28149 | overflow in some "SHOW STATUS"-variables | ||
|---|---|---|---|
| Submitted: | 28 Apr 2007 18:27 | Modified: | 18 Jun 2007 16:55 | 
| Reporter: | Patrick Lehmann | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Logging | Severity: | S3 (Non-critical) | 
| Version: | 5.0.42-BK, 5.0.30-Debian_1-log | OS: | Linux (Debian 3.1) | 
| Assigned to: | Sergei Glukhov | CPU Architecture: | Any | 
| Tags: | overflow, show status | ||
   [28 Apr 2007 18:27]
   Patrick Lehmann        
  
 
   [29 Apr 2007 11:38]
   Valeriy Kravchuk        
  Thank you for a bug report. In sql/sql_class.h these variables are declared as follows:
typedef struct system_status_var
{
  ulong bytes_received;
  ulong bytes_sent;
...
That is, they are unsigned long. On my platform unsigned long is 4 bytes long:
openxs@suse:~/work/mysql-5.0> cat ul.c
#include <stdio.h>
#include <stdlib.h>
main() {
  printf("\nSize of ulong is: %d\n", sizeof (unsigned long));
  return 0;
}
openxs@suse:~/work/mysql-5.0> gcc -o ul ul.c
openxs@suse:~/work/mysql-5.0> ./ul
Size of ulong is: 4
openxs@suse:~/work/mysql-5.0> uname -a
Linux suse 2.6.11.4-20a-default #1 Wed Mar 23 21:52:37 UTC 2005 i686 i686 i386 GNU/Linux
So, this really looks like a problem to be fixed (on 32-bit platforms, at least)
 
   [4 Jun 2007 12:49]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/28055 ChangeSet@1.2471, 2007-06-04 17:47:33+05:00, gluh@mysql.com +4 -0 Bug#28149 overflow in some "SHOW STATUS"-variables changed bytes_received, bytes_sent status variables to ulonglong
   [9 Jun 2007 12:50]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/28458 ChangeSet@1.2526, 2007-06-09 17:46:09+05:00, gluh@mysql.com +4 -0 Bug#28149 overflow in some "SHOW STATUS"-variables changed bytes_received, bytes_sent status variables to longlong
   [14 Jun 2007 19:00]
   Bugs System        
  Pushed into 5.0.44
   [14 Jun 2007 19:00]
   Bugs System        
  Pushed into 5.1.20-beta
   [18 Jun 2007 16:55]
   Paul DuBois        
  Noted in 5.0.44, 5.1.20 changelogs. The Bytes_received and Bytes_sent status variables could hold only 32-bit values (not 64-bit values) on some platforms.
   [21 Feb 2009 9:11]
   Sveta Smirnova        
  Bug seems to be not fixed properly: see bug #43040 for details.

