mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 22:25:32 +02:00
Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
This commit is contained in:
parent
cd37b73fe5
commit
11fae04527
19 changed files with 90 additions and 164 deletions
|
|
@ -1653,12 +1653,10 @@ bool change_password(THD *thd, const char *host, const char *user,
|
|||
result= 0;
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
query_length=
|
||||
my_sprintf(buff,
|
||||
(buff,"SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
|
||||
acl_user->user ? acl_user->user : "",
|
||||
acl_user->host.hostname ? acl_user->host.hostname : "",
|
||||
new_password));
|
||||
query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
|
||||
acl_user->user ? acl_user->user : "",
|
||||
acl_user->host.hostname ? acl_user->host.hostname : "",
|
||||
new_password);
|
||||
thd->clear_error();
|
||||
result= thd->binlog_query(THD::MYSQL_QUERY_TYPE, buff, query_length,
|
||||
FALSE, FALSE, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue