Merge "Break long lines and generalize some comments in /rdbms"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / Database.php
index f81c8dc..d58ffdf 100644 (file)
@@ -1971,18 +1971,7 @@ abstract class Database implements IDatabase, LoggerAwareInterface {
         * @return string
         */
        protected function indexName( $index ) {
-               // Backwards-compatibility hack
-               $renamed = [
-                       'ar_usertext_timestamp' => 'usertext_timestamp',
-                       'un_user_id' => 'user_id',
-                       'un_user_ip' => 'user_ip',
-               ];
-
-               if ( isset( $renamed[$index] ) ) {
-                       return $renamed[$index];
-               } else {
-                       return $index;
-               }
+               return $index;
        }
 
        public function addQuotes( $s ) {
@@ -3532,7 +3521,8 @@ abstract class Database implements IDatabase, LoggerAwareInterface {
                        // Open a new connection resource without messing with the old one
                        $this->mOpened = false;
                        $this->mConn = false;
-                       $this->mTrxLevel = 0; // no trx anymore
+                       $this->mTrxEndCallbacks = []; // don't copy
+                       $this->handleSessionLoss(); // no trx or locks anymore
                        $this->open( $this->mServer, $this->mUser, $this->mPassword, $this->mDBname );
                        $this->lastPing = microtime( true );
                }