srv_parse_log_group_home_dirs函数说明

/*************************************************************************
Reads log group home directories from a character string given in
the .cnf file. */

ibool
srv_parse_log_group_home_dirs(
/*==========================*/
/* out: TRUE if ok, FALSE if parsing
error */
char* str, /* in: character string */
char*** log_group_home_dirs) /* out, own: log group home dirs */
{
char* input_str;
char* path;
ulint i = 0;

input_str = str;

/* First calculate the number of directories and check syntax:
path;path;... */

while (*str != '\0') {
path = str;

while (*str != ';' && *str != '\0') {
str++;
}

i++;

if (*str == ';') {
str++;
} else if (*str != '\0') {

return(FALSE);
}
}

if (i != 1) {
/* If innodb_log_group_home_dir was defined it must
contain exactly one path definition under current MySQL */

return(FALSE);
}

*log_group_home_dirs = (char**) ut_malloc(i * sizeof(void*));

/* Then store the actual values to our array */

str = input_str;
i = 0;

while (*str != '\0') {
path = str;

while (*str != ';' && *str != '\0') {
str++;
}

if (*str == ';') {
*str = '\0';
str++;
}

(*log_group_home_dirs)[i] = path;

i++;
}

return(TRUE);
}

你可能感兴趣的:(mysql)