MXS-2047 Rename BLFILE::binlogname to BLFILE::binlog_name

That's how the concept is named everywhere else.
This commit is contained in:
Johan Wikman
2018-09-24 14:51:25 +03:00
parent cc5e3eb0ac
commit 654d3f2bbe
2 changed files with 23 additions and 23 deletions

View File

@ -507,7 +507,7 @@ typedef struct
typedef struct blfile typedef struct blfile
{ {
char binlogname[BINLOG_FNAMELEN + 1]; char binlog_name[BINLOG_FNAMELEN + 1];
/*< Name of the binlog file */ /*< Name of the binlog file */
int fd; /*< Actual file descriptor */ int fd; /*< Actual file descriptor */
int refcnt; /*< Reference count for file */ int refcnt; /*< Reference count for file */

View File

@ -834,11 +834,11 @@ static bool inline blr_is_same_slave_file(const BLFILE* file,
{ {
return (file->gtid_elms.domain_id == info->gtid_elms.domain_id) return (file->gtid_elms.domain_id == info->gtid_elms.domain_id)
&& (file->gtid_elms.server_id == info->gtid_elms.server_id) && (file->gtid_elms.server_id == info->gtid_elms.server_id)
&& (strcmp(file->binlogname, binlog) == 0); && (strcmp(file->binlog_name, binlog) == 0);
} }
else else
{ {
return strcmp(file->binlogname, binlog) == 0; return strcmp(file->binlog_name, binlog) == 0;
} }
} }
@ -910,7 +910,7 @@ BLFILE* blr_open_binlog(ROUTER_INSTANCE* router,
spinlock_release(&router->fileslock); spinlock_release(&router->fileslock);
return NULL; return NULL;
} }
strcpy(file->binlogname, binlog); strcpy(file->binlog_name, binlog);
file->refcnt = 1; file->refcnt = 1;
file->cache = 0; file->cache = 0;
@ -1024,14 +1024,14 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
if (!blr_compare_binlogs(router, if (!blr_compare_binlogs(router,
&file->gtid_elms, &file->gtid_elms,
router->binlog_name, router->binlog_name,
file->binlogname)) file->binlog_name))
{ {
snprintf(errmsg, snprintf(errmsg,
BINLOG_ERROR_MSG_LEN, BINLOG_ERROR_MSG_LEN,
"Requested position %lu is beyond " "Requested position %lu is beyond "
"'closed' binlog file '%s', size %lu. Generating Error '1236'", "'closed' binlog file '%s', size %lu. Generating Error '1236'",
pos, pos,
file->binlogname, file->binlog_name,
filelen); filelen);
} }
else else
@ -1041,7 +1041,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"Requested position %lu is beyond " "Requested position %lu is beyond "
"end of the latest binlog file '%s', size %lu. Disconnecting", "end of the latest binlog file '%s', size %lu. Disconnecting",
pos, pos,
file->binlogname, file->binlog_name,
filelen); filelen);
/* Slave will be disconnected by the calling routine */ /* Slave will be disconnected by the calling routine */
@ -1061,7 +1061,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
if (blr_compare_binlogs(router, if (blr_compare_binlogs(router,
&file->gtid_elms, &file->gtid_elms,
router->binlog_name, router->binlog_name,
file->binlogname) file->binlog_name)
&& pos >= router->binlog_position) && pos >= router->binlog_position)
{ {
if (pos > router->binlog_position) if (pos > router->binlog_position)
@ -1109,7 +1109,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
snprintf(errmsg, snprintf(errmsg,
BINLOG_ERROR_MSG_LEN, BINLOG_ERROR_MSG_LEN,
"Failed to read binlog file '%s'; (%s), event at %lu", "Failed to read binlog file '%s'; (%s), event at %lu",
file->binlogname, file->binlog_name,
mxs_strerror(errno), mxs_strerror(errno),
pos); pos);
@ -1119,7 +1119,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
BINLOG_ERROR_MSG_LEN, BINLOG_ERROR_MSG_LEN,
"Bad file descriptor for binlog file '%s', " "Bad file descriptor for binlog file '%s', "
"refcount %d, descriptor %d, event at %lu", "refcount %d, descriptor %d, event at %lu",
file->binlogname, file->binlog_name,
file->refcnt, file->refcnt,
file->fd, file->fd,
pos); pos);
@ -1135,7 +1135,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
BINLOG_EVENT_HDR_LEN, BINLOG_EVENT_HDR_LEN,
n, n,
pos, pos,
file->binlogname); file->binlog_name);
break; break;
} }
return NULL; return NULL;
@ -1158,7 +1158,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
if (!blr_binlog_event_check(router, if (!blr_binlog_event_check(router,
pos, pos,
hdr, hdr,
file->binlogname, file->binlog_name,
errmsg)) errmsg))
{ {
return NULL; return NULL;
@ -1171,7 +1171,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"rereading event header at pos %lu in file %s, " "rereading event header at pos %lu in file %s, "
"file size is %lu. Master will write %lu in %s next.", "file size is %lu. Master will write %lu in %s next.",
pos, pos,
file->binlogname, file->binlog_name,
filelen, filelen,
router->binlog_position, router->binlog_position,
router->binlog_name); router->binlog_name);
@ -1196,7 +1196,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
snprintf(errmsg, snprintf(errmsg,
BINLOG_ERROR_MSG_LEN, BINLOG_ERROR_MSG_LEN,
"Failed to reread header in binlog file '%s'; (%s), event at %lu", "Failed to reread header in binlog file '%s'; (%s), event at %lu",
file->binlogname, file->binlog_name,
mxs_strerror(errno), mxs_strerror(errno),
pos); pos);
@ -1206,7 +1206,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
BINLOG_ERROR_MSG_LEN, BINLOG_ERROR_MSG_LEN,
"Bad file descriptor rereading header for binlog file '%s', " "Bad file descriptor rereading header for binlog file '%s', "
"refcount %d, descriptor %d, event at %lu", "refcount %d, descriptor %d, event at %lu",
file->binlogname, file->binlog_name,
file->refcnt, file->refcnt,
file->fd, file->fd,
pos); pos);
@ -1222,7 +1222,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
BINLOG_EVENT_HDR_LEN, BINLOG_EVENT_HDR_LEN,
n, n,
pos, pos,
file->binlogname); file->binlog_name);
break; break;
} }
return NULL; return NULL;
@ -1243,7 +1243,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"Next event position still incorrect after rereading, " "Next event position still incorrect after rereading, "
"event at %lu in binlog file '%s'", "event at %lu in binlog file '%s'",
pos, pos,
file->binlogname); file->binlog_name);
return NULL; return NULL;
} }
else else
@ -1272,7 +1272,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"size %d, event at %lu in binlog file '%s'", "size %d, event at %lu in binlog file '%s'",
hdr->event_size, hdr->event_size,
pos, pos,
file->binlogname); file->binlog_name);
return NULL; return NULL;
} }
@ -1304,7 +1304,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"Error reading the binlog event at %lu in binlog file '%s'; " "Error reading the binlog event at %lu in binlog file '%s'; "
"(%s), expected %d bytes.", "(%s), expected %d bytes.",
pos, pos,
file->binlogname, file->binlog_name,
mxs_strerror(errno), mxs_strerror(errno),
hdr->event_size - BINLOG_EVENT_HDR_LEN); hdr->event_size - BINLOG_EVENT_HDR_LEN);
} }
@ -1317,7 +1317,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
hdr->event_size - BINLOG_EVENT_HDR_LEN, hdr->event_size - BINLOG_EVENT_HDR_LEN,
n, n,
pos, pos,
file->binlogname); file->binlog_name);
if (filelen != 0 && filelen - pos < hdr->event_size) if (filelen != 0 && filelen - pos < hdr->event_size)
{ {
@ -1327,7 +1327,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"current file size is %lu, event at %lu in binlog file '%s'", "current file size is %lu, event at %lu in binlog file '%s'",
filelen, filelen,
pos, pos,
file->binlogname); file->binlog_name);
} }
blr_log_header(LOG_ERR, blr_log_header(LOG_ERR,
"Possible malformed event header", "Possible malformed event header",
@ -1361,7 +1361,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
"file size is %lu, event at %lu in binlog file '%s'", "file size is %lu, event at %lu in binlog file '%s'",
filelen, filelen,
pos, pos,
file->binlogname); file->binlog_name);
gwbuf_free(result); gwbuf_free(result);
return NULL; return NULL;
} }
@ -1385,7 +1385,7 @@ GWBUF* blr_read_binlog(ROUTER_INSTANCE* router,
if (!blr_binlog_event_check(router, if (!blr_binlog_event_check(router,
pos, pos,
hdr, hdr,
file->binlogname, file->binlog_name,
errmsg)) errmsg))
{ {
gwbuf_free(decrypted_event); gwbuf_free(decrypted_event);