diff options
-rw-r--r-- | it_dbi.class | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/it_dbi.class b/it_dbi.class index 786fb90..c9cef54 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -42,7 +42,6 @@ class it_dbi implements Iterator 'getfieldinfo' => true, # do not read schema. only select() allowed 'localized_defaultlanguage' => "de", # Localize fields with this suffix, e.g. copy title_de to title on read 'throttle_writes' => 0, # sleep for 'throttle_writes' multiplied by the execution time after every write - 'unbuffered' => false, # use MYSQLI_USE_RESULT (WARNING this is not at all equivalent to normal it_dbi WARNING) 'ignored_warnings' => "", # regex of additional mysql warnings numbers to ignore 'interruptible_queries' => false, # make queries interruptible by php signal handlers 'timeout' => null, # timeout for queries @@ -680,7 +679,7 @@ function select(...$args) $this->clear(); if ($this->_result = $this->query($sql = "SELECT $what " . $this->_from($query) . " " . $this->_where($query))) { - $result = $this->_p['unbuffered'] ? true : $this->_num_rows($this->_result); + $result = $this->_num_rows($this->_result); if ($calc_found_rows) { @@ -754,8 +753,6 @@ function iterate() else { $this->clear(); - if ($this->_p['unbuffered']) - $this->_result->close(); } } else @@ -1133,7 +1130,7 @@ function __query($query, $p) if ($p['timeout'] || $this->_p['interruptible_queries']) { $starttime = microtime(true); - mysqli_query($this->_link, $query, ($p['unbuffered'] ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT) | MYSQLI_ASYNC); + mysqli_query($this->_link, $query, MYSQLI_STORE_RESULT | MYSQLI_ASYNC); do { $read = $error = $reject = [$this->_link]; if ($p['timeout'] && (microtime(true) - $starttime) > $p['timeout']) @@ -1143,7 +1140,7 @@ function __query($query, $p) } else { - return mysqli_query($this->_link, $query, $p['unbuffered'] ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT); + return mysqli_query($this->_link, $query, MYSQLI_STORE_RESULT); } } |