![]() ![]() Mysql> select * from (select c1, := 1) as r from t1, (select := 0) as b) as q where q. Type '\c' to clear the current input statement.ĮRROR 1231 (42000): Variable 'optimizer_switch' can't be set to the value of 'derived_condition_pushdown=off' Other names may be trademarks of their respective Oracle is a registered trademark of Oracle Corporation and/or itsĪffiliates. Server version: 8.0.11 MySQL Community Server - GPLĬopyright (c) 2000, 2018, Oracle and/or its affiliates. MySQL Verification Team - Lowest version checked 8.0.11īin/mysql -uroot -S /tmp/mysql_ushastry.sock -local-infile Variable 'optimizer_switch' can't be set to the value of 'derived_condition_pushdown=off' 5.7/5.6 - Not repro and even can't set derived_condition_pushdown=off ', or 'SELECT expression(s) INTO variables(s)'. Consider alternatives: 'SET variable=expression. Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. ![]() Set optimizer_switch="derived_condition_pushdown=off" ![]() Select * from (select c1, := 1) as r from t1, (select := 0) as b) as q where q.c1 = 300 You can exclude the identity column of a table, or a default constraint is specified on any of the columns of the table. In `TABLE_LIST::can_push_condition_to_derived(THD *thd)`, we can check the whether `Query_block` has user variables, add a member variables `has_user_vars` to `Query_block`. 1 2 3 4 5 INSERT INTO (COLUMN1, COLUMN2.) VALUES (VALUE1,VALUE2.), (VALUE3,VALUE4.), (VALUE5,VALUE6.) Note: Here, make sure that the number of columns should match with the number of values.Mysql> set optimizer_switch="derived_condition_pushdown=off" When turns off the derived_condition_pushdown switch in optimzier_switch, it got the right result. Mysql> select * from (select c1, := 1) as r from t1, (select := 0) as b) as q where q.c1 = 300 Derived condition pushdown rewrite seems like it ignores the situation query block has user variables. ![]()
0 Comments
Leave a Reply. |