Loading mysql-test/r/ps.result +22 −0 Original line number Diff line number Diff line Loading @@ -1114,6 +1114,28 @@ execute stmt; show create table t1; drop table t1; deallocate prepare stmt; CREATE TABLE t1(a int); INSERT INTO t1 VALUES (2), (3), (1); PREPARE st1 FROM '(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'; EXECUTE st1; a 1 2 3 11 12 13 EXECUTE st1; a 1 2 3 11 12 13 DEALLOCATE PREPARE st1; DROP TABLE t1; End of 4.1 tests. create table t1 (a varchar(20)); insert into t1 values ('foo'); Loading mysql-test/t/ps.test +18 −0 Original line number Diff line number Diff line Loading @@ -1194,6 +1194,24 @@ show create table t1; --enable_warnings drop table t1; deallocate prepare stmt; # # # Bug #27937: crash on the second execution for prepared statement # from UNION with ORDER BY an expression containing RAND() # CREATE TABLE t1(a int); INSERT INTO t1 VALUES (2), (3), (1); PREPARE st1 FROM '(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'; EXECUTE st1; EXECUTE st1; DEALLOCATE PREPARE st1; DROP TABLE t1; --echo End of 4.1 tests. Loading Loading
mysql-test/r/ps.result +22 −0 Original line number Diff line number Diff line Loading @@ -1114,6 +1114,28 @@ execute stmt; show create table t1; drop table t1; deallocate prepare stmt; CREATE TABLE t1(a int); INSERT INTO t1 VALUES (2), (3), (1); PREPARE st1 FROM '(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'; EXECUTE st1; a 1 2 3 11 12 13 EXECUTE st1; a 1 2 3 11 12 13 DEALLOCATE PREPARE st1; DROP TABLE t1; End of 4.1 tests. create table t1 (a varchar(20)); insert into t1 values ('foo'); Loading
mysql-test/t/ps.test +18 −0 Original line number Diff line number Diff line Loading @@ -1194,6 +1194,24 @@ show create table t1; --enable_warnings drop table t1; deallocate prepare stmt; # # # Bug #27937: crash on the second execution for prepared statement # from UNION with ORDER BY an expression containing RAND() # CREATE TABLE t1(a int); INSERT INTO t1 VALUES (2), (3), (1); PREPARE st1 FROM '(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'; EXECUTE st1; EXECUTE st1; DEALLOCATE PREPARE st1; DROP TABLE t1; --echo End of 4.1 tests. Loading