summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJim Winstead <jimw@mysql.com>2009-11-23 14:38:08 -0800
committerJim Winstead <jimw@mysql.com>2009-11-23 14:38:08 -0800
commit84c5abbd33856ba730b1e9091146d986f1923bfa (patch)
treea8272ba94c1daf15a03b9e1aefeae654d8d7bddd /client
parent67801696130fb554217fb16f292336736e9ea607 (diff)
downloadmariadb-git-84c5abbd33856ba730b1e9091146d986f1923bfa.tar.gz
Backport fix for Bug #27884.
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 9474e4beccc..e4eabe8de33 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3387,9 +3387,12 @@ print_table_data_html(MYSQL_RES *result)
{
while((field = mysql_fetch_field(result)))
{
- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
- (field->name[0] ? field->name :
- " &nbsp; ") : "NULL"));
+ tee_fputs("<TH>", PAGER);
+ if (field->name && field->name[0])
+ xmlencode_print(field->name, field->name_length);
+ else
+ tee_fputs(field->name ? " &nbsp; " : "NULL", PAGER);
+ tee_fputs("</TH>", PAGER);
}
(void) tee_fputs("</TR>", PAGER);
}
@@ -3400,7 +3403,7 @@ print_table_data_html(MYSQL_RES *result)
for (uint i=0; i < mysql_num_fields(result); i++)
{
(void) tee_fputs("<TD>", PAGER);
- safe_put_field(cur[i],lengths[i]);
+ xmlencode_print(cur[i], lengths[i]);
(void) tee_fputs("</TD>", PAGER);
}
(void) tee_fputs("</TR>", PAGER);