Commit f562d0c2 authored by unknown's avatar unknown

Removed compiler warning

Fixed not updated test from last changeset


mysql-test/r/auto_increment.result:
  Updated results
sql/mysqld.cc:
  Cleaned up pid file handling (to remove compiler warning)
parent 15484ba2
......@@ -118,7 +118,7 @@ a
1
2
drop table t1;
create table t1 (a int not null auto_increment primary key) /*!41002 type=heap */;
create table t1 (a int not null auto_increment primary key) /*!40102 type=heap */;
insert into t1 values (NULL);
insert into t1 values (-1);
select last_insert_id();
......
......@@ -5136,9 +5136,10 @@ static void create_pid_file()
if ((file = my_create(pidfile_name,0664,
O_WRONLY | O_TRUNC, MYF(MY_WME))) >= 0)
{
char buff[21];
sprintf(buff,"%lu\n",(ulong) getpid());
(void) my_write(file, buff,strlen(buff),MYF(MY_WME));
char buff[21], *end;
end= int2str((long) getpid(), buff, 10);
*end++= '\n';
(void) my_write(file, (byte*) buff, (uint) (end-buff),MYF(MY_WME));
(void) my_close(file, MYF(0));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment