summaryrefslogtreecommitdiff
path: root/mysql-test/r/view.result
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-12-18 15:59:51 +0200
committerunknown <sanja@askmonty.org>2013-12-18 15:59:51 +0200
commit57400ee6819e7dbb601b19f0ac223c491ef7359f (patch)
tree6284a8c2ad2ca3bc00f897f2d5a96169d66ac55d /mysql-test/r/view.result
parent3ec4296ec413e866c3efabc8dfa94172ad5f7c04 (diff)
downloadmariadb-git-57400ee6819e7dbb601b19f0ac223c491ef7359f.tar.gz
MDEV-5414: RAND() in a subselect : different behavior in MariaDB and MySQL
Materialization forced in case if rand() used in view or derived table to avoud several calls of rand for gting value of a field. Fixed set variable uncachable flag from - it shouldbe a side effect not a random value.
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r--mysql-test/r/view.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index c98d8dfd8a4..436b81a20a2 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4740,6 +4740,16 @@ i1 c1 i1 c1
deallocate prepare stmt;
drop view v1;
drop table t1,t2;
+create table t1 (a int);
+insert into t1 values (1),(2);
+create view v1 (a,r) as select a,rand() from t1;
+create table t2 select a, r as r1, r as r2, r as r3 from v1;
+select a, r1 = r2, r2 = r3 from t2;
+a r1 = r2 r2 = r3
+1 1 1
+2 1 1
+drop view v1;
+drop table t1,t2;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------