Bug #6057 Data Type Problem in manager.c
Submitted: 13 Oct 2004 3:08 Modified: 18 Oct 2004 9:12
Reporter: James Barwick Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.1.5-gamma OS:Linux (Linux amd64 (SUSE9.1))
Assigned to: Ramil Kalimullin CPU Architecture:Any

[13 Oct 2004 3:08] James Barwick
Line 271 of libmysql/manager.c has the definition

uint num_bytes;

The compare statement:

  if ((num_bytes=my_net_read(&con->net)) == packet_error)
    strmov(con->last_error,"socket read failed");
    return 1;

is never executed becuase packet_error is ulong and the compiler complains that this will always return false.

I have changed num_bytes to ulong.  This eliminated the warning.

Advise please on any problems that may result due to this change.

How to repeat:
compile manager.c on Linux a64 system

Suggested fix:

uint num_bytes;


ulong num_bytes;

on line 271 of manager.c
[18 Oct 2004 7:29] Ramil Kalimullin

Thank you for the luminous bug report!

[18 Oct 2004 9:12] Ramil Kalimullin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at