Merge branch 'develop' into Z2
This commit is contained in:
@ -14,10 +14,20 @@ Source: %{name}-%{version}-%{release}.tar.gz
|
|||||||
Prefix: /
|
Prefix: /
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
#Requires:
|
#Requires:
|
||||||
BuildRequires: gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc perl make libtool openssl-devel libaio libaio-devel MariaDB-devel MariaDB-server
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
BuildRequires: gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc_s1 perl make libtool libopenssl-devel libaio libaio-devel mariadb libedit-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc perl make libtool openssl-devel libaio libaio-devel
|
||||||
%if 0%{?rhel} == 6
|
%if 0%{?rhel} == 6
|
||||||
BuildRequires: libedit-devel
|
BuildRequires: libedit-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?rhel} == 7
|
||||||
|
BuildRequires: mariadb-devel mariadb-embedded-devel libedit-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: MariaDB-devel MariaDB-server
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
MaxScale
|
MaxScale
|
||||||
|
@ -68,7 +68,7 @@ unsigned char *ptr;
|
|||||||
int
|
int
|
||||||
modutil_extract_SQL(GWBUF *buf, char **sql, int *length)
|
modutil_extract_SQL(GWBUF *buf, char **sql, int *length)
|
||||||
{
|
{
|
||||||
char *ptr;
|
unsigned char *ptr;
|
||||||
|
|
||||||
if (!modutil_is_SQL(buf))
|
if (!modutil_is_SQL(buf))
|
||||||
return 0;
|
return 0;
|
||||||
@ -78,7 +78,7 @@ char *ptr;
|
|||||||
*length += (*ptr++ << 8);
|
*length += (*ptr++ << 8);
|
||||||
ptr += 2; // Skip sequence id and COM_QUERY byte
|
ptr += 2; // Skip sequence id and COM_QUERY byte
|
||||||
*length = *length - 1;
|
*length = *length - 1;
|
||||||
*sql = ptr;
|
*sql = (char *) ptr;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ char *ptr;
|
|||||||
int
|
int
|
||||||
modutil_MySQL_Query(GWBUF *buf, char **sql, int *length, int *residual)
|
modutil_MySQL_Query(GWBUF *buf, char **sql, int *length, int *residual)
|
||||||
{
|
{
|
||||||
char *ptr;
|
unsigned char *ptr;
|
||||||
|
|
||||||
if (!modutil_is_SQL(buf))
|
if (!modutil_is_SQL(buf))
|
||||||
return 0;
|
return 0;
|
||||||
@ -115,7 +115,7 @@ char *ptr;
|
|||||||
*residual = *residual - 1;
|
*residual = *residual - 1;
|
||||||
*length = GWBUF_LENGTH(buf) - 5;
|
*length = GWBUF_LENGTH(buf) - 5;
|
||||||
*residual -= *length;
|
*residual -= *length;
|
||||||
*sql = ptr;
|
*sql = (char *)ptr;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ char *ptr;
|
|||||||
GWBUF *
|
GWBUF *
|
||||||
modutil_replace_SQL(GWBUF *orig, char *sql)
|
modutil_replace_SQL(GWBUF *orig, char *sql)
|
||||||
{
|
{
|
||||||
char *ptr;
|
unsigned char *ptr;
|
||||||
int length, newlength;
|
int length, newlength;
|
||||||
GWBUF *addition;
|
GWBUF *addition;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user