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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
65b70328
Commit
65b70328
authored
Aug 25, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql.cc:
Bug#3453: MySQL output formatting in multibyte character sets
parent
f81edf4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
client/mysql.cc
client/mysql.cc
+10
-4
No files found.
client/mysql.cc
View file @
65b70328
...
...
@@ -2019,21 +2019,27 @@ print_table_data(MYSQL_RES *result)
while
((
cur
=
mysql_fetch_row
(
result
)))
{
ulong
*
lengths
=
mysql_fetch_lengths
(
result
);
(
void
)
tee_fputs
(
"|"
,
PAGER
);
mysql_field_seek
(
result
,
0
);
for
(
uint
off
=
0
;
off
<
mysql_num_fields
(
result
);
off
++
)
{
const
char
*
str
=
cur
[
off
]
?
cur
[
off
]
:
"NULL"
;
field
=
mysql_fetch_field
(
result
);
uint
length
=
field
->
max_length
;
if
(
length
>
MAX_COLUMN_LENGTH
)
uint
max
length
=
field
->
max_length
;
if
(
max
length
>
MAX_COLUMN_LENGTH
)
{
tee_fputs
(
str
,
PAGER
);
tee_fputs
(
" |"
,
PAGER
);
}
else
{
uint
currlength
=
(
uint
)
lengths
[
off
];
uint
numcells
=
charset_info
->
cset
->
numcells
(
charset_info
,
str
,
str
+
currlength
);
tee_fprintf
(
PAGER
,
num_flag
[
off
]
?
"%*s |"
:
" %-*s|"
,
length
,
str
);
maxlength
+
currlength
-
numcells
,
str
);
}
}
(
void
)
tee_fputs
(
"
\n
"
,
PAGER
);
}
...
...
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