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
f28e6ac4
Commit
f28e6ac4
authored
May 05, 2008
by
davi@endora.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/Users/davi/mysql/bugs/36031-5.1
into mysql.com:/Users/davi/mysql/mysql-5.1-bugteam
parents
5b7d3789
cca174b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
client/mysqltest.c
client/mysqltest.c
+15
-6
No files found.
client/mysqltest.c
View file @
f28e6ac4
...
@@ -5595,7 +5595,7 @@ void fix_win_paths(const char *val, int len)
...
@@ -5595,7 +5595,7 @@ void fix_win_paths(const char *val, int len)
*/
*/
void
append_field
(
DYNAMIC_STRING
*
ds
,
uint
col_idx
,
MYSQL_FIELD
*
field
,
void
append_field
(
DYNAMIC_STRING
*
ds
,
uint
col_idx
,
MYSQL_FIELD
*
field
,
c
onst
c
har
*
val
,
ulonglong
len
,
my_bool
is_null
)
char
*
val
,
ulonglong
len
,
my_bool
is_null
)
{
{
if
(
col_idx
<
max_replace_column
&&
replace_column
[
col_idx
])
if
(
col_idx
<
max_replace_column
&&
replace_column
[
col_idx
])
{
{
...
@@ -5618,9 +5618,18 @@ void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD* field,
...
@@ -5618,9 +5618,18 @@ void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD* field,
(
start
[
1
]
==
'-'
||
start
[
1
]
==
'+'
)
&&
start
[
2
]
==
'0'
)
(
start
[
1
]
==
'-'
||
start
[
1
]
==
'+'
)
&&
start
[
2
]
==
'0'
)
{
{
start
+=
2
;
/* Now points at first '0' */
start
+=
2
;
/* Now points at first '0' */
/* Move all chars after the first '0' one step left */
if
(
field
->
flags
&
ZEROFILL_FLAG
)
memmove
(
start
,
start
+
1
,
strlen
(
start
));
{
len
--
;
/* Move all chars before the first '0' one step right */
memmove
(
val
+
1
,
val
,
start
-
val
);
*
val
=
'0'
;
}
else
{
/* Move all chars after the first '0' one step left */
memmove
(
start
,
start
+
1
,
strlen
(
start
));
len
--
;
}
}
}
}
}
#endif
#endif
...
@@ -5659,7 +5668,7 @@ void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
...
@@ -5659,7 +5668,7 @@ void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
lengths
=
mysql_fetch_lengths
(
res
);
lengths
=
mysql_fetch_lengths
(
res
);
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
append_field
(
ds
,
i
,
&
fields
[
i
],
append_field
(
ds
,
i
,
&
fields
[
i
],
(
const
char
*
)
row
[
i
],
lengths
[
i
],
!
row
[
i
]);
row
[
i
],
lengths
[
i
],
!
row
[
i
]);
if
(
!
display_result_vertically
)
if
(
!
display_result_vertically
)
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
}
}
...
@@ -5708,7 +5717,7 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
...
@@ -5708,7 +5717,7 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
while
(
mysql_stmt_fetch
(
stmt
)
==
0
)
while
(
mysql_stmt_fetch
(
stmt
)
==
0
)
{
{
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
append_field
(
ds
,
i
,
&
fields
[
i
],
(
const
char
*
)
my_bind
[
i
].
buffer
,
append_field
(
ds
,
i
,
&
fields
[
i
],
my_bind
[
i
].
buffer
,
*
my_bind
[
i
].
length
,
*
my_bind
[
i
].
is_null
);
*
my_bind
[
i
].
length
,
*
my_bind
[
i
].
is_null
);
if
(
!
display_result_vertically
)
if
(
!
display_result_vertically
)
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
dynstr_append_mem
(
ds
,
"
\n
"
,
1
);
...
...
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