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 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`. Mysql> set optimizer_switch="derived_condition_pushdown=off" When turns off the derived_condition_pushdown switch in optimzier_switch, it got the right result. The INSERT statement is an example of a Data Manipulation Language (DML). It is important to note that the CREATE TABLE statement enables you to create columns while the INSERT statement enables you to insert rows or records into a table. Mysql> select * from (select c1, := + 1) as r from t1, (select := 0) as b) as q where q.c1 = 300 To put values in a table, MySQL provides you with the INSERT statement. Derived condition pushdown rewrite seems like it ignores the situation query block has user variables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |