OK, so i have a weired issue with a simple update query.
We believe this happpened when we switched servers and thus a new MariaDB version.
We currently use MariaDB 10.11, php 8.3 and PDO to execute a query. On an AlmaLinux 9 server
Before we were on CentOs 7 with MariaDB 10.6, and same php 8.3
The query in question is quite simple and updates 2 datetime columns
First, last run date to the value of the scheduled next run date, and then next run date to when this job finished.
$query = $this->db->prepare("UPDATE `{$this->Config->sql_prefix}_jobs` SET `last_at` = `next_at`, `next_at` = :next_at WHERE `id` = :id");
Now, mysql should work of the columns in sequence as they are defined. But this not always works.
like 8 out of 10 days, first the next_at gets updated and then last_at, so the wrong order.
Making both columns the same value.
I can ( and i do ) work around this issue by simply passing a calculated value as named parameter for last_at column, but i have other queries where this also happens and its not possible there due sheer amount of data, which i first would need to query and process in php.
EDIT: I should also mention, that when i execute this query directly within mysql / phpmyadmin, the issue does not appear.
So i have a feeling this might be a php/pdo issue.
Does anyone have some kind of clue?