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:
Davi Arnaut 2010-07-09 09:00:17 -03:00
commit 11fae04527
19 changed files with 90 additions and 164 deletions

View file

@ -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);