Sample Header Ad - 728x90

Why does INSERTing to a federatedx table fail silently?

2 votes
0 answers
45 views
For testing, I've set up a XAMPP portable 8.1.12 with 10.4.27-MariaDB and enabled the FederatedX engine using this trick . When I now set up a SERVER that is not existing and a federated table that is "using" that server, running a SELECT against that table fails as it should, but INSERT behaves as if it has worked. Why is that? Example: CREATE SERVER nonexistentserver FOREIGN DATA WRAPPER nonexistentserverwrapper OPTIONS ( HOST '127.0.0.1', DATABASE 'thereIsNoServerSoThereIsNoDatabase', USER 'andNoUser', PASSWORD 'AndNoPassword!', PORT 12345 ); CREATE TABLE mytable ( theLine INT NOT NULL AUTO_INCREMENT PRIMARY KEY, theContent VARCHAR(255) NOT NULL ) ENGINE=FEDERATED CONNECTION='nonexistentserver/mytable'; SELECT behaves as I would expect: MariaDB [testdb]> SELECT * FROM mytable; ERROR 1296 (HY000): Got error 10000 'Error on remote system: 0: ' from FEDERATED But INSERT does not: MariaDB [testdb]> INSERT INTO mytable VALUES (NULL, "Hey!"); Query OK, 1 row affected (0.005 sec) Is that a bug or is it supposed to do that? ---------- **Additum 1:** When I do not use install plugin federated soname 'ha_federatedx'; but remove the x first (inspiration from this answer plus comment ), thus use *the old federated* but federatedX, the INSERT gives the expected error.
Asked by Bowi (121 rep)
Dec 13, 2022, 10:43 AM
Last activity: Dec 13, 2022, 11:16 AM