diff options
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r-- | mysql-test/r/derived.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 80f04ffd455..61f1db9989f 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -400,4 +400,15 @@ SELECT 0 FROM (SELECT 0) t61; 0 0 +# +# A nested materialized derived table is used before being populated. +# (addon for bug#19077) +# +CREATE TABLE t1 (i INT, j BIGINT); +INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2); +SELECT * FROM (SELECT MIN(i) FROM t1 +WHERE j = SUBSTRING('12', (SELECT * FROM (SELECT MIN(j) FROM t1) t2))) t3; +MIN(i) +1 +DROP TABLE t1; # End of 5.0 tests |