mirror of https://github.com/MariaDB/server
Browse Source
With view protocol, a SELECT statement is transformed into two statements: 1. CREATE OR REPLACE VIEW mysqltest_tmp_v AS SELECT ... 2. SELECT * FROM mysqltest_tmp_v The first statement reconstructed the query, which is executed in the second statement. The reconstruction often replaces aliases in ORDER BY by the original item. For example, in the test spider/bugfix.mdev_29008 the query SELECT MIN(t2.a) AS f1, t1.b AS f2 FROM tbl_a AS t1 JOIN tbl_a AS t2 GROUP BY f2 ORDER BY f1, f2; is transformed to "select min(`t2`.`a`) AS `f1`,`t1`.`b` AS `f2` from (`auto_test_local`.`tbl_a` `t1` join `auto_test_local`.`tbl_a` `t2`) group by `t1`.`b` order by min(`t2`.`a`),`t1`.`b`" In such cases, spider constructs different queries to execute at the data node. So we disable view protocol for such queries.bb-10.5-MDEV-31477
3 changed files with 6 additions and 0 deletions
Loading…
Reference in new issue