diff options
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r-- | mysql-test/t/sp.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 6eba2522089..99020eb951f 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -9556,5 +9556,36 @@ CALL sp1(); drop user 'foo'@'%'; drop procedure sp1; +--echo # +--echo # MDEV-10972: Insert from select / view / union -- +--echo # repeatable crash in 10.1, 10.2 Linux/Mac/Windows +--echo # + +create table t (id int auto_increment primary key); +insert into t values (9494),(9495),(9496),(9497),(9498),(9499),(9500),(9501),(9502),(9503); + +create VIEW v AS +select id from t +union +select id from t +; + +drop procedure if exists p; +create procedure p() +insert into tmp_t select t.id from ( + select id from v + union + select id from v +) sq +inner join t on (sq.id = t.id); + +--error ER_NO_SUCH_TABLE +CALL p(); +create table tmp_t (id int null); +CALL p(); + +drop procedure p; +drop view v; +drop table t, tmp_t; --echo #End of 10.1 tests |