• Oleg Smirnov's avatar
    MDEV-29640 FederatedX does not properly handle pushdown in case of difference... · 5f296f3a
    Oleg Smirnov authored
    MDEV-29640  FederatedX does not properly handle pushdown in case of difference in local and remote table names
    
    FederatedX table may refer to a table with a different name on the
    remote server:
      test> CREATE TABLE t2 (...) ENGINE="FEDERATEDX"
      CONNECTION="mysql://user:pass@192.168.1.111:9308/federatedx/t1";
      test> select * from t2 where ...;
    This could cause an issue with federated_pushdown=1, because FederatedX
    pushes the query (or derived table's) text to the remote server. The remote
    server will try to read from table t2 (while it should read from t1).
    
    Solution: do not allow pushing down queries with tables that have different
    db_name.table name on the local and remote server.
    
    This patch also fixes:
    MDEV-29863 Server crashes in federatedx_txn::acquire after select from the
    FederatedX table with partitions
    
    Solution: disallow pushdown when partitioned FederatedX tables are used.
    5f296f3a
ha_federatedx.cc 111 KB