Open goFrendiAsgard opened 10 years ago
Sqlite database locked when doing repeating request. This might be sqlite version issue (as pointed here: http://stackoverflow.com/questions/6101480/sqlite-3-locking-in-php) or codeigniter pdo issue (as always).
NOTE TO MYSELF:
I've change num_rows function in /system/database/drivers/pdo/pdo_result.php into this:
num_rows
/system/database/drivers/pdo/pdo_result.php
public function num_rows() { if (is_int($this->num_rows)) { return $this->num_rows; } elseif (count($this->result_array) > 0) { return $this->num_rows = count($this->result_array); } elseif (count($this->result_object) > 0) { return $this->num_rows = count($this->result_object); } /* if (is_int($this->num_rows)) { return $this->num_rows; } elseif (count($this->result_array) > 0) { return $this->num_rows = count($this->result_array); } elseif (count($this->result_object) > 0) { return $this->num_rows = count($this->result_object); } elseif (($num_rows = $this->result_id->rowCount()) > 0) { return $this->num_rows = $num_rows; } */ return $this->num_rows = count($this->result_array()); }
since ($num_rows = $this->result_id->rowCount()) > 0 show a strange result
($num_rows = $this->result_id->rowCount()) > 0
changes so far https://github.com/goFrendiAsgard/No-CMS/commit/1248e558c62ab3329acd68c58dda3f578fd72a96
Sqlite database locked when doing repeating request. This might be sqlite version issue (as pointed here: http://stackoverflow.com/questions/6101480/sqlite-3-locking-in-php) or codeigniter pdo issue (as always).
NOTE TO MYSELF:
I've change
num_rows
function in/system/database/drivers/pdo/pdo_result.php
into this:since
($num_rows = $this->result_id->rowCount()) > 0
show a strange result