Bug #36437 | problem with STDERR and STDOUT redirection | ||
---|---|---|---|
Submitted: | 30 Apr 2008 17:59 | ||
Reporter: | Matthew Lord | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.0.56sp1 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | mysqlc, stderr |
[30 Apr 2008 17:59]
Matthew Lord
[30 Apr 2008 18:01]
Matthew Lord
Test file
Attachment: compileTESTING.sql (application/octet-stream, text), 177 bytes.
[30 Apr 2008 18:47]
Matthew Lord
repeated with 4.1.23, 5.1.24, 6.0.4 and 5.0.20a.
[22 Jul 2010 8:01]
Glen McAllister
Hi, We have a slight but more serious variant of this on 5.0.45 in that stderr will interrupt stdout if both are being directed to a file. Shown below is a segment of such a file (with table name changed): ... -------------- INSERT INTO <table> VALUES (6329, '3941', 'PH2281') -------------- Query OK, 1 row affected -------------- INSERT INTO <table> VALUES (6329, '395', 'AP2789ERROR 1062 (23000) at line 1783: Duplicate entry 'CP860075' for key 1 ERROR 1062 (23000) at line 1787: Duplicate entry 'GS602' for key 1 ERROR 1062 (23000) at line 1788: Duplicate entry 'GS602' for key 1 ERROR 1062 (23000) at line 1796: Duplicate entry 'BE45' for key 1 ERROR 1062 (23000) at line 1798: Duplicate entry 'BE45' for key 1 ') -------------- Query OK, 1 row affected The first line of the second query begins with stdout, but is then interrupted by stderr. Stdout then resumes on the last line. This throws our error-reporting out big-time as not only is the first line interrupted by this block of stderr, the block of stderr is not in the right sequence either as each error message should follow a statement if the interleaving of stderr with stdout was in chronological order. Isn't this a bit more serious than just a minor bug if stdout & stderror aren't interleaving properly from the mysql command-line client? We're on Solaris 10 & the error is reproducible.