2011-11-02 10:48:41 +01:00
|
|
|
set @subselect_extra_no_sj_tmp=@@optimizer_switch;
|
2011-11-15 22:03:00 +01:00
|
|
|
|
|
|
|
set @optimizer_switch_for_subselect_extra_test='semijoin=off,firstmatch=off,loosescan=off,semijoin_with_cache=off';
|
2011-11-02 10:48:41 +01:00
|
|
|
|
2018-03-09 13:05:35 +01:00
|
|
|
--source subselect_extra.test
|
2011-11-02 10:48:41 +01:00
|
|
|
|
|
|
|
set optimizer_switch= @subselect_extra_no_sj_tmp;
|
|
|
|
|
2018-08-15 14:21:37 +02:00
|
|
|
set @optimizer_switch_for_subselect_extra_test=null;
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset
|
|
|
|
--echo #
|
|
|
|
|
2022-06-09 05:32:51 +02:00
|
|
|
--disable_service_connection
|
|
|
|
|
2018-08-15 14:21:37 +02:00
|
|
|
## Using a separate client connection is easier than restoring state
|
|
|
|
connect(con1,localhost,root,,);
|
|
|
|
|
|
|
|
SET NAMES tis620;
|
|
|
|
set @tmp= @@global.slow_query_log;
|
|
|
|
SET GLOBAL slow_query_log = 1;
|
|
|
|
SET long_query_time = 0.000001;
|
|
|
|
SET log_slow_verbosity = 'explain';
|
|
|
|
|
|
|
|
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=MyISAM;
|
|
|
|
SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo');
|
|
|
|
--error ER_CANT_AGGREGATE_2COLLATIONS
|
|
|
|
SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' UNION SELECT 'bar' );
|
|
|
|
|
|
|
|
create table t2 (b int);
|
|
|
|
insert into t2 values (1),(2),(3);
|
|
|
|
|
|
|
|
--error ER_CANT_AGGREGATE_2COLLATIONS
|
|
|
|
SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' FROM t2);
|
|
|
|
|
|
|
|
drop table t1,t2;
|
|
|
|
SET GLOBAL slow_query_log=@tmp;
|
|
|
|
disconnect con1;
|
|
|
|
connection default;
|
2022-06-09 05:32:51 +02:00
|
|
|
|
|
|
|
--enable_service_connection
|