buffer.c:gwbuf_make_contiguous: when new buffer is created, copy original buffer's type to new buffer
modutil.c:modutil_replace_SQL: when new bugger is added to GWBUF, copy original buffer's type to new buffer
In all filters, merge all buffers of GWBUF to one before calling modutil:extract_SQL
This commit is contained in:
VilhoRaatikka
2014-10-21 21:13:21 +03:00
parent 761de0ac8a
commit 287bc90465
7 changed files with 57 additions and 36 deletions

View File

@ -1155,15 +1155,13 @@ static bool get_dcb(
rses->router->available_slaves = false;
LOGIF(LE, (skygw_log_write_flush(
LOGFILE_ERROR,
"Warning : No slaves available "
"for the service %s.",
rses->router->service->name)));
"Warning : No slaves available "
"for the service %s.",
rses->router->service->name)));
}
btype = BE_MASTER;
if (BREF_IS_IN_USE(master_bref))
{
*p_dcb = master_bref->bref_dcb;
@ -1199,7 +1197,7 @@ static bool get_dcb(
LOGFILE_ERROR,
"At least one slave has become available for "
"the service %s.",
rses->router->service->name)));
rses->router->service->name)));
}
ss_dassert(succp);
}
@ -1920,8 +1918,8 @@ static int routeQuery(
}
else if (hint->type == HINT_PARAMETER &&
(strncasecmp((char *)hint->data,
"max_slave_replication_lag",
strlen("max_slave_replication_lag")) == 0))
"max_slave_replication_lag",
strlen("max_slave_replication_lag")) == 0))
{
int val = (int) strtol((char *)hint->value,
(char **)NULL, 10);
@ -2047,8 +2045,7 @@ static int routeQuery(
}
succp = false;
ret = 0;
}
}
}
if (succp) /*< Have DCB of the target backend */