Unbuffered queries in PDO
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1184 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
71524c585b
commit
4a56170707
|
@ -132,6 +132,11 @@ if (extension_loaded("mysqli")) {
|
||||||
$this->server_info = $this->result($this->query("SELECT VERSION()"));
|
$this->server_info = $this->result($this->query("SELECT VERSION()"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function query($query, $unbuffered = false) {
|
||||||
|
$this->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, !$unbuffered);
|
||||||
|
return parent::query($query, $unbuffered);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -19,7 +19,7 @@ if (extension_loaded('pdo')) {
|
||||||
return $this->query("USE " . idf_escape($database));
|
return $this->query("USE " . idf_escape($database));
|
||||||
}
|
}
|
||||||
|
|
||||||
function query($query) { // $unbuffered is not supported
|
function query($query, $unbuffered = false) {
|
||||||
$result = parent::query($query);
|
$result = parent::query($query);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$errorInfo = $this->errorInfo();
|
$errorInfo = $this->errorInfo();
|
||||||
|
|
Loading…
Reference in a new issue