-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
before update trigger NEW modification to non updated field not reflected #193
Comments
I submitted a pull request #194 to fix this bug |
jeevanchalke
added a commit
that referenced
this issue
Oct 5, 2020
Earlier, only columns that are present in the UPDATE query got updated at the MySQL side. However, in any column value which is not present in the UPDATE query but modified in the BEFORE ROW trigger was not updated at MySQL side. Fix that by marking all columns as updatable in such cases. The fix for this was given by Francois Payette through pull request #194 on GitHub, which is further revised by Suraj Kharage. Also, updating a row-identifier column is not supported. However, this was broken when the BR update trigger is trying to update that. Fix that by comparing old and new value for the row-identifier column and throwing an error if they are not the same. Reported on GitHub through issues #193 by Francois Payette. FDW-193, Suraj Kharage, reviewed by Vaibhav Dalvi and me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi All,
nice work mysql_FDW! I was pleasantly surprised to see that triggers can be created on foreign tables. Obviously these triggers are not called when CRUD is done on the mysqld end; I've written a deamon that does that, but I'm running into a problem.
I create a trigger on an imported foreign table. In the procedure, I change the value of a column that is not in the triggering update statement. This change does not make it to the mysql side.
I can see that the value for pgrti is updated in the NOTICE in postgres. In mysql the value is not updated. If I add the target col to the statement it does go through
I'd like my mysql pg_trigger calling to be transparent to someone using this on postgres. I need this to work to be able to detect CRUD coming from PG. Any idea where I'd change MYSQL_FDW to do this (also add fields that are updated in the trigger before firing off to mysql)?
TIA,
Francois
The text was updated successfully, but these errors were encountered: