Code:
Configuration:
CI v4.4.1
PHP v8.1.23
Ubuntu 22.04 LTS Jammy
mysql Ver 15.1 Distrib 10.6.12-MariaDB
The transaction fails, but there's no indication in $this->db->error(). All the mariaDB tables are INNODB tables.
Code:
$this->db->transStart();
$this->db->query('INSERT'....);
$id = $this->db->insertID();
$this->db->query('UPDATE'....);
...
$this->db->transComplete();
if ($this->db->transStatus() === FALSE) {
error_log('transaction error:' . print_r($this->db->error(), true));
return false;
}
And in the log, there are numerous examples from the logging code like this:
Code:
PHP message: transaction error:
code => 0
[message] =>
Added db->error() to report on each individual SQL statements, each report indicates code is 0.
Is db-error() the wrong means to detect a transaction error, or is there actually an error?