mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Fixed that caused failure in --ps binlog_encryption.rpl_gtid_basic
Problem was that replace_dynstr_append_mem() assumed strings are null terminated which is not always the case.
This commit is contained in:
parent
a2d24def8c
commit
517f659e6d
2 changed files with 7 additions and 3 deletions
|
@ -11145,13 +11145,16 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, size_t len)
|
||||||
{
|
{
|
||||||
/* Convert to lower case, and do this first */
|
/* Convert to lower case, and do this first */
|
||||||
char *c= lower;
|
char *c= lower;
|
||||||
for (const char *v= val; *v; v++)
|
for (const char *v= val, *end_v= v + len; v < end_v; v++)
|
||||||
*c++= my_tolower(charset_info, *v);
|
*c++= my_tolower(charset_info, *v);
|
||||||
*c= '\0';
|
*c= '\0';
|
||||||
/* Copy from this buffer instead */
|
/* Copy from this buffer instead */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
memcpy(lower, val, len+1);
|
{
|
||||||
|
memcpy(lower, val, len);
|
||||||
|
lower[len]= 0;
|
||||||
|
}
|
||||||
fix_win_paths(lower, len);
|
fix_win_paths(lower, len);
|
||||||
val= lower;
|
val= lower;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3002,7 +3002,8 @@ int select_send::send_data(List<Item> &items)
|
||||||
|
|
||||||
thd->inc_sent_row_count(1);
|
thd->inc_sent_row_count(1);
|
||||||
|
|
||||||
if (thd->vio_ok())
|
/* Don't return error if disconnected, only if write fails */
|
||||||
|
if (likely(thd->vio_ok()))
|
||||||
DBUG_RETURN(protocol->write());
|
DBUG_RETURN(protocol->write());
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue