dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46867b7
)
Clear previously left-over PQresult before calling pg_get_result()
author
yoonghm
<yoonghm@gmail.com>
Sun, 27 Sep 2015 05:56:29 +0000
(13:56 +0800)
committer
Kunal Mehta
<legoktm@gmail.com>
Sat, 10 Oct 2015 16:03:59 +0000
(12:03 -0400)
Bug: T52091
Change-Id: Iaa1a479b5eefcae0fc8f82b1d20e9575d609c0e9
includes/db/DatabasePostgres.php
patch
|
blob
|
history
diff --git
a/includes/db/DatabasePostgres.php
b/includes/db/DatabasePostgres.php
index
c9d7b35
..
64ae1c6
100644
(file)
--- a/
includes/db/DatabasePostgres.php
+++ b/
includes/db/DatabasePostgres.php
@@
-395,6
+395,9
@@
class DatabasePostgres extends Database {
if ( function_exists( 'mb_convert_encoding' ) ) {
$sql = mb_convert_encoding( $sql, 'UTF-8' );
}
+ // Clear previously left over PQresult
+ while ( $res = pg_get_result( $this->mConn ) )
+ pg_free_result( $res );
if ( pg_send_query( $this->mConn, $sql ) === false ) {
throw new DBUnexpectedError( $this, "Unable to post new query to PostgreSQL\n" );
}