Failed to modify specific column in mysql table

It seems I have a problem updating records in a specific table.

For reference, here is an example query that causes an error:

UPDATE `dbname`.`tblname` SET `CustomerID` = '543' WHERE `tblname`.`Issue_ID` = 440

I can insert, delete and query rows, as well as update other columns, but whenever you try to update the CustomerID field (int, non-null), it gives an error message:

# 1054 - Unknown column "Revision" in the "list of fields"

I have all the rights for both the database and the table, but when I try to update the CustomerID column in any rows when Revision is not even in the query, I get the same error.

I considered the problem a lot, using a regular expression in my php code to remove all non-printable characters, however, even when starting a request from phpMyAdmin, the same error occurs.

If anyone has an understanding of this error, we will be very grateful.

Description of the table:

enter image description here

+4
source share
1 answer

You might run into this if you have an update trigger that references a column that does not exist. Maybe the abusive trigger doesn't even try to read / write to this table! Therefore, this column may not exist where it is trying to reference it. In addition, you can start a cascade of such triggers and catch it on more than one layer.

To show triggers:

http://dev.mysql.com/doc/refman/5.7/en/show-triggers.html

:

http://dev.mysql.com/doc/refman/5.7/en/trigger-syntax.html

+3

Source: https://habr.com/ru/post/1620780/


All Articles