Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2378,7 +2378,7 @@ |
2379 | 2379 | } |
2380 | 2380 | |
2381 | 2381 | /* |
2382 | | - * Get a Database object |
| 2382 | + * Get a Database object. |
2383 | 2383 | * @param integer $db Index of the connection to get. May be DB_MASTER for the |
2384 | 2384 | * master (for write queries), DB_SLAVE for potentially lagged |
2385 | 2385 | * read queries, or an integer >= 0 for a particular server. |
— | — | @@ -2388,6 +2388,10 @@ |
2389 | 2389 | * in one group. |
2390 | 2390 | * |
2391 | 2391 | * @param string $wiki The wiki ID, or false for the current wiki |
| 2392 | + * |
| 2393 | + * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request |
| 2394 | + * will always return the same object, unless the underlying connection or load |
| 2395 | + * balancer is manually destroyed. |
2392 | 2396 | */ |
2393 | 2397 | function &wfGetDB( $db = DB_LAST, $groups = array(), $wiki = false ) { |
2394 | 2398 | return wfGetLB( $wiki )->getConnection( $db, $groups, $wiki ); |