Merge branch '2.3' into develop

This commit is contained in:
Johan Wikman 2019-01-21 14:07:47 +02:00
commit 0d1743c76b
5 changed files with 31 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# MariaDB MaxScale 2.3.3 Release Notes
# MariaDB MaxScale 2.3.3 Release Notes -- 2019-01-21
Release 2.3.3 is a GA release.

View File

@ -5,7 +5,7 @@
set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version")
set(MAXSCALE_VERSION_MINOR "3" CACHE STRING "Minor version")
set(MAXSCALE_VERSION_PATCH "3" CACHE STRING "Patch version")
set(MAXSCALE_VERSION_PATCH "4" CACHE STRING "Patch version")
# This should only be incremented if a package is rebuilt
set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number")

View File

@ -1465,7 +1465,11 @@ std::string get_canonical(GWBUF* querybuf)
else if (*it == '/' && is_next(it, buf.end(), "/*"))
{
auto comment_start = std::next(it, 2);
if (comment_start != buf.end() && *comment_start != '!' && *comment_start != 'M')
if (comment_start == buf.end())
{
break;
}
else if (*comment_start != '!' && *comment_start != 'M')
{
// Non-executable comment
while (it != buf.end())
@ -1478,6 +1482,11 @@ std::string get_canonical(GWBUF* querybuf)
}
++it;
}
if (it == buf.end())
{
break;
}
}
else
{
@ -1506,6 +1515,7 @@ std::string get_canonical(GWBUF* querybuf)
++it;
}
if (it == buf.end())
{
break;
@ -1529,13 +1539,19 @@ std::string get_canonical(GWBUF* querybuf)
else if (*it == '\'' || *it == '"')
{
char c = *it;
it = find_char(std::next(it), buf.end(), c);
if ((it = find_char(std::next(it), buf.end(), c)) == buf.end())
{
break;
}
rval[i++] = '?';
}
else if (*it == '`')
{
auto start = it;
it = find_char(std::next(it), buf.end(), '`');
if ((it = find_char(std::next(it), buf.end(), '`')) == buf.end())
{
break;
}
std::copy(start, it, &rval[i]);
i += std::distance(start, it);
rval[i++] = '`';
@ -1544,6 +1560,8 @@ std::string get_canonical(GWBUF* querybuf)
{
rval[i++] = *it;
}
mxb_assert(it != buf.end());
}
// Shrink the buffer so that the internal bookkeeping of std::string remains up to date

View File

@ -9,3 +9,7 @@ SELECT ? /*! +? */;
SELECT ? /*!? +? */;
SELECT ? /*M! +? */;
SELECT ? /*M!? +? */;
SELECT ?
SELECT ?
SELECT ?
SELECT ?

View File

@ -9,3 +9,7 @@ SELECT 1 /*! +1 */;
SELECT 1 /*!50101 +1 */;
SELECT 2 /*M! +1 */;
SELECT 2 /*M!50101 +1 */;
SELECT 2 /*
SELECT 2 /*
SELECT 2 /*/
SELECT 2 /**/