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:
a3f1a58
)
Fixing synchronisation bug: can't open a transaction before calling MASTER_POS_WAIT...
author
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 22 Dec 2004 03:58:25 +0000
(
03:58
+0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 22 Dec 2004 03:58:25 +0000
(
03:58
+0000)
includes/Database.php
patch
|
blob
|
history
diff --git
a/includes/Database.php
b/includes/Database.php
index
6cd4727
..
68dad73
100644
(file)
--- a/
includes/Database.php
+++ b/
includes/Database.php
@@
-1236,9
+1236,17
@@
class Database {
* @param integer $timeout the maximum number of seconds to wait for synchronisation
*/
function masterPosWait( $file, $pos, $timeout ) {
* @param integer $timeout the maximum number of seconds to wait for synchronisation
*/
function masterPosWait( $file, $pos, $timeout ) {
+ $fname = 'Database::masterPosWait';
+ wfProfileIn( $fname );
+
+
+ # Commit any open transactions
+ $this->immediateCommit();
+
+ # Call doQuery() directly, to avoid opening a transaction if DBO_TRX is set
$encFile = $this->strencode( $file );
$sql = "SELECT MASTER_POS_WAIT('$encFile', $pos, $timeout)";
$encFile = $this->strencode( $file );
$sql = "SELECT MASTER_POS_WAIT('$encFile', $pos, $timeout)";
- $res = $this->
query( $sql, 'Database::masterPosWait'
);
+ $res = $this->
doQuery( $sql
);
if ( $res && $row = $this->fetchRow( $res ) ) {
$this->freeResult( $res );
return $row[0];
if ( $res && $row = $this->fetchRow( $res ) ) {
$this->freeResult( $res );
return $row[0];