Bug #1951 thread id is printed as "signed" instead of "unsigned" in 'mysql'
Submitted: 25 Nov 2003 13:08 Modified: 12 Dec 2003 7:46
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.0 OS:Linux (Linux)
Assigned to: Bugs System CPU Architecture:Any

[25 Nov 2003 13:08] Guilhem Bichot
When the thread id reaches values greater than 2G, 'mysql' prints unexpected values:
for example for a thread id equal to 4G-5, one gets:
[guilhem@gbichot2 guilhem]$ mysql1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is -5 to server version: 4.0.16-debug-log

How to repeat:
Edit mysqld.cc, and set the first value of thread_id to be 4G-5 instead of 1.
Open a mysql client.

Suggested fix:
The reason is a printf("%ld") which should probably be printf("%lu").
[12 Dec 2003 5:27] Victor Vagin
Guilhem, Thank you very much for the excellent bug report!
[12 Dec 2003 7:46] Victor Vagin
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

Additional info:

Fix will be in 4.0.17