MXS-2674 Add test that reveals bug

This commit is contained in:
Johan Wikman
2019-09-13 15:06:42 +03:00
parent c079d1312e
commit 9969f21414
3 changed files with 14 additions and 2 deletions

View File

@ -76,6 +76,10 @@ char* get_types_as_string(uint32_t types)
{
s = append(s, "QUERY_TYPE_SESSION_WRITE", &len);
}
if (types & QUERY_TYPE_USERVAR_WRITE)
{
s = append(s, "QUERY_TYPE_USERVAR_WRITE", &len);
}
if (types & QUERY_TYPE_USERVAR_READ)
{
s = append(s, "QUERY_TYPE_USERVAR_READ", &len);

View File

@ -28,3 +28,7 @@ QUERY_TYPE_WRITE
QUERY_TYPE_WRITE
QUERY_TYPE_WRITE
QUERY_TYPE_GSYSVAR_WRITE
QUERY_TYPE_READ
QUERY_TYPE_READ
QUERY_TYPE_USERVAR_WRITE
QUERY_TYPE_READ|QUERY_TYPE_MASTER_READ

View File

@ -25,6 +25,10 @@ SELECT IS_USED_LOCK('lock1');
SELECT RELEASE_LOCK('lock1');
deallocate prepare select_stmt;
SELECT a FROM tbl FOR UPDATE;
SELECT a INTO OUTFILE 'out.txt'
SELECT a INTO DUMPFILE 'dump.txt'
SELECT a INTO OUTFILE 'out.txt';
SELECT a INTO DUMPFILE 'dump.txt';
SELECT a INTO @var;
select timediff(cast('2004-12-30 12:00:00' as time), '12:00:00');
(select 1 as a from t1) union all (select 1 from dual) limit 1;
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);