mariadb/mysql-test/suite/vcol/t/vcol_misc.test

23 lines
625 B
Text
Raw Normal View History

--disable_warnings
drop table if exists t1,t2;
--enable_warnings
#
# SELECT that uses a virtual column and executed with BKA
#
create table t1 (a int, b int);
insert into t1 values (3, 30), (4, 20), (1, 20);
create table t2 (c int, d int, v int as (d+1), index idx(c));
insert into t2(c,d) values
(20, 100), (20, 300), (30, 100), (30, 200), (40, 500),
(70, 100), (40, 300), (60, 100), (40, 100), (70, 100);
set join_cache_level=6;
explain
select * from t1,t2 where t1.b=t2.c and d <= 100;
select * from t1,t2 where t1.b=t2.c and d <= 100;
set join_cache_level=default;
drop table t1, t2;