private function tryToRecoverFromFailedQuery($sql, $arguments, $load_mode, $return_mode)
    {
        switch ($this->link->errno) {

            // Non-transactional tables not rolled back!
            case 1196:
                return null;

            // Server gone away
            case 2006:
            case 2013:
                return $this->handleMySqlGoneAway($sql, $arguments, $load_mode, $return_mode);

            // Deadlock detection and retry
            case 1213:
                return $this->handleDeadlock();

            // Other error
            default:
                throw new QueryException($this->link->error, $this->link->errno);
        }
    }
private function tryToRecoverFromFailedQuery($sql, $arguments, $load_mode, $return_mode)
    {
        switch ($this->link->errno) {

            // Non-transactional tables not rolled back!
            case 1196:
                return null;

            // Server gone away
            case 2006:
            case 2013:
                return $this->handleMySqlGoneAway($sql, $arguments, $load_mode, $return_mode);

            // Deadlock detection and retry
            case 1213:
                return $this->handleDeadlock();

            // Other error
            default:
                throw new QueryException($this->link->error, $this->link->errno);
        }
    }
private function tryToRecoverFromFailedQuery ( $ sql , $ arguments , $ load_mode , $ return_mode ) { switch ( $ this -> link -> errno ) { // Non-transactional tables not rolled back! case 1196 : return null ; // Server gone away case 2006 : case 2013 : return $ this -> handleMySqlGoneAway ( $ sql , $ arguments , $ load_mode , $ return_mode ) ; // Deadlock detection and retry case 1213 : return $ this -> handleDeadlock ( ) ; // Other error default : throw new QueryException ( $ this -> link -> error , $ this -> link -> errno ) ; } }
Try to recover from failed query.

@param string     $sql
@param array|null $arguments
@param $load_mode
@param $return_mode
@return array|bool|DateTime|float|int|mixed|null|string|void
@throws QueryException
Try to recover from failed query .