[Commits] dc3f559: MDEV-17107 Assertion `table_list->table' failed in find_field_in_table_ref
revision-id: dc3f55947e1e849d73bede588d24839e58cb6547 (mariadb-10.2.18-34-gdc3f559) parent(s): 2308b9afec559cd8c5717007a7ad6821c374370d author: Igor Babaev committer: Igor Babaev timestamp: 2018-10-17 03:26:30 -0700 message: MDEV-17107 Assertion `table_list->table' failed in find_field_in_table_ref Added only test case because the bug was fixed by the patch for mdev-16992. --- mysql-test/r/cte_nonrecursive.result | 18 ++++++++++++++++++ mysql-test/t/cte_nonrecursive.test | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result index 2b9455d..fc65458 100644 --- a/mysql-test/r/cte_nonrecursive.result +++ b/mysql-test/r/cte_nonrecursive.result @@ -1641,3 +1641,21 @@ a b drop procedure p1; drop procedure p2; drop table t1; +# +# MDEV-17107: PS for CREATE OR REPLACE VIEW defined by SELECT with CTEs +# +create table t1(a int); +insert into t1 values (3), (1), (2); +create table t2 (b int); +insert into t2 values (2), (10); +prepare stmt from +"create or replace view v1 as + with t as (select s.a from (select t1.a from t1) s), + r as(select t.a from t2, t where t2.b=t.a) + select a from r;"; +execute stmt; +select * from v1; +a +2 +drop view v1; +drop table t1,t2; diff --git a/mysql-test/t/cte_nonrecursive.test b/mysql-test/t/cte_nonrecursive.test index 648fc89..920c27a 100644 --- a/mysql-test/t/cte_nonrecursive.test +++ b/mysql-test/t/cte_nonrecursive.test @@ -1147,3 +1147,24 @@ select * from t1; drop procedure p1; drop procedure p2; drop table t1; + +--echo # +--echo # MDEV-17107: PS for CREATE OR REPLACE VIEW defined by SELECT with CTEs +--echo # + +create table t1(a int); +insert into t1 values (3), (1), (2); +create table t2 (b int); +insert into t2 values (2), (10); + +prepare stmt from +"create or replace view v1 as + with t as (select s.a from (select t1.a from t1) s), + r as(select t.a from t2, t where t2.b=t.a) + select a from r;"; + +execute stmt; +select * from v1; + +drop view v1; +drop table t1,t2;
participants (1)
-
IgorBabaev