Bug #4130 mysql --html > file.txt : output with <TD! at line ends
Submitted: 14 Jun 2004 17:29 Modified: 17 Jun 2004 19:26
Reporter: Nicolas VÉRITÉ Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:3.23.56 OS:Linux (RedHat GNU/Linux 7.3)
Assigned to: CPU Architecture:Any

[14 Jun 2004 17:29] Nicolas VÉRITÉ
Description:
mysql --html -ppassword db < script.sql > report.txt

My report.txt has 4772. It is well understood and screen-viewed by links and Firefox, but not with IE and Excel.

With a CTRL+U in Firefox (show source), I see three lines ending with a <TD! and next lines beginning with >.

How to repeat:
mysql --html -ppassword db < script.sql > report.txt
[17 Jun 2004 19:26] Hartmut Holzgraefe
The <TD> and </TD> tags are written using

  tee_fputs("<TD>", PAGER);

and 

  tee_fputs("</TD>", PAGER)

where tee_fputs is just a wrapper and PAGER
defaults to stdout unless you have specified
a pager program for output display.

I can't reproduce the behavior you report with
3.23.56 or more even with more current releases.

The only way i can think of that the "!\n" 
sequence could have sneaked in is by an implicit
pager set up in your PAGER environment variable.

Adding the --no-pager option to the mysql call
should fix this.