I'm updating a a large number of rows (~168k) with an UPDATE query that contains various JOINS.
(i changed the field and table names, but the logic of the query stays the same)
UPDATE
table_a
JOIN table_b on table_a.field1 = table_b=field1
JOIN table_c on table_b.field2 = table_c.field2
JOIN table_d on table_c.field3 = table_d.field3
JOIN table_e on table_d.field4 = table_e.field4
SET
table_a.date_field = DATE_ADD(table_a.date_field, INTERVAL 12 MONTH)
WHERE
table_a.checkfield IS NOT NULL
AND table_a.date_field >= "2017-07-05"
AND table_e.statefield != "DEU"
AND
(
table_c.statusfield1 IN (2,3,9) OR (table_c.statusfield1 = 1 AND table_c.statusfield2 = 1 AND table_c.statusfield3 IS NULL)
)
I'm a 100% sure this update query affected about 167k rows and checked it already in the database, but the mysql query log in HeidiSQL 9.5.0.5196 said:
"/* Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 1 query: 52,984 sec. */"
I already ran this query limited to only 4 or 5 items and there the affected row count was correct, but if i run the whole update query the row count is alway zero.
Is this a known bug in HeidiSQL or my Percona/MySQL Version?
The system: Server version: 5.6.40-84.0 - Percona Server (GPL), Release 84.0, Revision 47234b3, Server OS: debian-linux-gnu, HeidiSQL Version:9.5.0.5196