mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
initial import of Windows port of IM.
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "mysql_manager_error.h"
|
||||
#include "protocol.h"
|
||||
#include "buffer.h"
|
||||
#include "options.h"
|
||||
|
||||
#include <m_string.h>
|
||||
#include <mysql.h>
|
||||
@ -469,7 +470,7 @@ int Show_instance_log::execute(struct st_net *net, ulong connection_id)
|
||||
size_t buff_size;
|
||||
int read_len;
|
||||
/* calculate buffer size */
|
||||
struct stat file_stat;
|
||||
MY_STAT file_stat;
|
||||
|
||||
/* my_fstat doesn't use the flag parameter */
|
||||
if (my_fstat(fd, &file_stat, MYF(0)))
|
||||
@ -481,7 +482,7 @@ int Show_instance_log::execute(struct st_net *net, ulong connection_id)
|
||||
read_len= my_seek(fd, file_stat.st_size - size, MY_SEEK_SET, MYF(0));
|
||||
|
||||
char *bf= (char*) malloc(sizeof(char)*buff_size);
|
||||
if ((read_len= my_read(fd, bf, buff_size, MYF(0))) < 0)
|
||||
if ((read_len= my_read(fd, (byte*)bf, buff_size, MYF(0))) < 0)
|
||||
return ER_READ_FILE;
|
||||
store_to_protocol_packet(&send_buff, (char*) bf, &position, read_len);
|
||||
close(fd);
|
||||
@ -604,7 +605,7 @@ int Show_instance_log_files::execute(struct st_net *net, ulong connection_id)
|
||||
store_to_protocol_packet(&send_buff, "", &position);
|
||||
store_to_protocol_packet(&send_buff, (char*) "0", &position);
|
||||
}
|
||||
else if (S_ISREG(file_stat.st_mode))
|
||||
else if (MY_S_ISREG(file_stat.st_mode))
|
||||
{
|
||||
store_to_protocol_packet(&send_buff,
|
||||
(char*) log_files->value,
|
||||
@ -689,7 +690,7 @@ int Set_option::correct_file(int skip)
|
||||
{
|
||||
int error;
|
||||
|
||||
error= modify_defaults_file("/etc/my.cnf", option,
|
||||
error= modify_defaults_file(Options::config_file, option,
|
||||
option_value, instance_name, skip);
|
||||
if (error > 0)
|
||||
return ER_OUT_OF_RESOURCES;
|
||||
|
Reference in New Issue
Block a user