MXS-2990 Add test that reveals problem

Had to fix qc_mysqlembedded as well to work with 10.2.
This commit is contained in:
Johan Wikman 2020-05-13 10:30:39 +03:00
parent 73eba01ce9
commit 9999650bbe
3 changed files with 4 additions and 1 deletions

View File

@ -2180,7 +2180,8 @@ int32_t qc_mysql_get_preparable_stmt(GWBUF* stmt, GWBUF** preparable_stmt)
{
const char* preparable_stmt;
size_t preparable_stmt_len;
#if MYSQL_VERSION_MINOR >= 3
// MYSQL_VERSION_PATCH might be smaller, but this was detected with 10.2.32.
#if MYSQL_VERSION_MINOR >= 3 || (MYSQL_VERSION_MINOR == 2 && MYSQL_VERSION_PATCH >= 32)
preparable_stmt = lex->prepared_stmt_code->str_value.ptr();
preparable_stmt_len = lex->prepared_stmt_code->str_value.length();
#else

View File

@ -34,3 +34,4 @@ QUERY_TYPE_SESSION_WRITE|QUERY_TYPE_USERVAR_WRITE
QUERY_TYPE_READ|QUERY_TYPE_MASTER_READ
QUERY_TYPE_WRITE
QUERY_TYPE_READ
QUERY_TYPE_WRITE

View File

@ -34,3 +34,4 @@ SET @saved_cs_client= @@character_set_client;
SELECT 1 AS c1 FROM t1 ORDER BY ( SELECT 1 AS c2 FROM t1 GROUP BY GREATEST(LAST_INSERT_ID(), t1.a) ORDER BY GREATEST(LAST_INSERT_ID(), t1.a) LIMIT 1);
SET PASSWORD FOR 'user'@'10.0.0.1'='*C50EB75D7CB4C76B5264218B92BC69E6815B057A';
SELECT UTC_TIMESTAMP();
SELECT COUNT(IF(!c.ispackage, 1, NULL)) as cnt FROM test FOR UPDATE;