Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash with COPY FROM and/or foreign partition routing operations.
COPY FROM and/or foreign partition routing code path in core assumes that FDW has BeginForeignInsert() APIs present and thus later executes ExecForeignInsert(). However, mongo_fdw does not support routable foreign-table partitions and/or executing COPY FROM on foreign tables and thus do not have BeginForeignInsert() API implemented. But as it has ExecForeignInsert() API, it gets called for these operations and results in the server crash. To fix this, add the BeginForeignInsert() API that throws an error. Also, add EndForeignInsert() similar to the Begin API. The issue was originally reported on MySQL's GitHub through #208. FDW-226, Suraj Kharage, reviewed by Jeevan Chalke.
- Loading branch information