Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
84c5abbd
Commit
84c5abbd
authored
Nov 23, 2009
by
Jim Winstead
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport fix for Bug #27884.
parent
67801696
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
client/mysql.cc
client/mysql.cc
+7
-4
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+1
-0
mysql-test/t/mysql.test
mysql-test/t/mysql.test
+6
-0
No files found.
client/mysql.cc
View file @
84c5abbd
...
@@ -3387,9 +3387,12 @@ print_table_data_html(MYSQL_RES *result)
...
@@ -3387,9 +3387,12 @@ print_table_data_html(MYSQL_RES *result)
{
{
while
((
field
=
mysql_fetch_field
(
result
)))
while
((
field
=
mysql_fetch_field
(
result
)))
{
{
tee_fprintf
(
PAGER
,
"<TH>%s</TH>"
,
(
field
->
name
?
tee_fputs
(
"<TH>"
,
PAGER
);
(
field
->
name
[
0
]
?
field
->
name
:
if
(
field
->
name
&&
field
->
name
[
0
])
" "
)
:
"NULL"
));
xmlencode_print
(
field
->
name
,
field
->
name_length
);
else
tee_fputs
(
field
->
name
?
" "
:
"NULL"
,
PAGER
);
tee_fputs
(
"</TH>"
,
PAGER
);
}
}
(
void
)
tee_fputs
(
"</TR>"
,
PAGER
);
(
void
)
tee_fputs
(
"</TR>"
,
PAGER
);
}
}
...
@@ -3400,7 +3403,7 @@ print_table_data_html(MYSQL_RES *result)
...
@@ -3400,7 +3403,7 @@ print_table_data_html(MYSQL_RES *result)
for
(
uint
i
=
0
;
i
<
mysql_num_fields
(
result
);
i
++
)
for
(
uint
i
=
0
;
i
<
mysql_num_fields
(
result
);
i
++
)
{
{
(
void
)
tee_fputs
(
"<TD>"
,
PAGER
);
(
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
(
"</TD>"
,
PAGER
);
}
}
(
void
)
tee_fputs
(
"</TR>"
,
PAGER
);
(
void
)
tee_fputs
(
"</TR>"
,
PAGER
);
...
...
mysql-test/r/mysql.result
View file @
84c5abbd
...
@@ -199,4 +199,5 @@ COUNT (*)
...
@@ -199,4 +199,5 @@ COUNT (*)
COUNT (*)
COUNT (*)
1
1
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>
End of 5.0 tests
End of 5.0 tests
mysql-test/t/mysql.test
View file @
84c5abbd
...
@@ -356,4 +356,10 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql;
...
@@ -356,4 +356,10 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql;
--
exec
$MYSQL
--
default
-
character
-
set
=
binary
test
-
e
"CONNECT test invalid_hostname"
2
>&
1
--
exec
$MYSQL
--
default
-
character
-
set
=
binary
test
-
e
"CONNECT test invalid_hostname"
2
>&
1
--
exec
$MYSQL
--
default
-
character
-
set
=
binary
test
-
e
"DELIMITER //"
2
>&
1
--
exec
$MYSQL
--
default
-
character
-
set
=
binary
test
-
e
"DELIMITER //"
2
>&
1
#
# Bug #27884: mysql --html does not quote HTML special characters in output
#
--
exec
$MYSQL
--
html
test
-
e
"select '< & >' as \`<\`"
--
echo
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment