Ignore:
Timestamp:
2010/03/11 10:35:11 (14 years ago)
Author:
kajiwara
Message:

正式版にナイトリービルド版をマージしてみるテスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tmp/version-2_5-test/data/module/DB/ibase.php

    r15532 r18609  
    2222 * @author     Sterling Hughes <sterling@php.net> 
    2323 * @author     Daniel Convissor <danielc@php.net> 
    24  * @copyright  1997-2005 The PHP Group 
     24 * @copyright  1997-2007 The PHP Group 
    2525 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 
    2626 * @version    CVS: $Id$ 
     
    4848 * @author     Sterling Hughes <sterling@php.net> 
    4949 * @author     Daniel Convissor <danielc@php.net> 
    50  * @copyright  1997-2005 The PHP Group 
     50 * @copyright  1997-2007 The PHP Group 
    5151 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 
    52  * @version    Release: @package_version@ 
     52 * @version    Release: 1.7.14RC1 
    5353 * @link       http://pear.php.net/package/DB 
    5454 * @since      Class became stable in Release 1.7.0 
     
    124124        -803 => DB_ERROR_CONSTRAINT, 
    125125        -804 => DB_ERROR_VALUE_COUNT_ON_ROW, 
     126        // -902 =>  // Covers too many errors, need to use regex on msg 
    126127        -904 => DB_ERROR_CONNECT_FAILED, 
    127128        -922 => DB_ERROR_NOSUCHDB, 
     
    276277    function simpleQuery($query) 
    277278    { 
    278         $ismanip = DB::isManip($query); 
     279        $ismanip = $this->_checkManip($query); 
    279280        $this->last_query = $query; 
    280281        $query = $this->modifyQuery($query); 
     
    413414    function freeResult($result) 
    414415    { 
    415         return @ibase_free_result($result); 
     416        return is_resource($result) ? ibase_free_result($result) : false; 
    416417    } 
    417418 
     
    421422    function freeQuery($query) 
    422423    { 
    423         @ibase_free_query($query); 
    424         return true; 
     424        return is_resource($query) ? ibase_free_query($query) : false; 
    425425    } 
    426426 
     
    522522        $newquery = $this->modifyQuery($newquery); 
    523523        $stmt = @ibase_prepare($this->connection, $newquery); 
    524         $this->prepare_types[(int)$stmt] = $types; 
    525         $this->manip_query[(int)$stmt]   = DB::isManip($query); 
     524 
     525        if ($stmt === false) { 
     526            $stmt = $this->ibaseRaiseError(); 
     527        } else { 
     528            $this->prepare_types[(int)$stmt] = $types; 
     529            $this->manip_query[(int)$stmt]   = DB::isManip($query); 
     530        } 
     531 
    526532        return $stmt; 
    527533    } 
     
    548554        $this->last_parameters = $data; 
    549555 
    550         $types =& $this->prepare_types[(int)$stmt]; 
     556        $types = $this->prepare_types[(int)$stmt]; 
    551557        if (count($types) != count($data)) { 
    552             $tmp =& $this->raiseError(DB_ERROR_MISMATCH); 
     558            $tmp = $this->raiseError(DB_ERROR_MISMATCH); 
    553559            return $tmp; 
    554560        } 
     
    569575                $fp = @fopen($data[$key], 'rb'); 
    570576                if (!$fp) { 
    571                     $tmp =& $this->raiseError(DB_ERROR_ACCESS_VIOLATION); 
     577                    $tmp = $this->raiseError(DB_ERROR_ACCESS_VIOLATION); 
    572578                    return $tmp; 
    573579                } 
     
    582588        $res = call_user_func_array('ibase_execute', $data); 
    583589        if (!$res) { 
    584             $tmp =& $this->ibaseRaiseError(); 
     590            $tmp = $this->ibaseRaiseError(); 
    585591            return $tmp; 
    586592        } 
     
    590596        }*/ 
    591597        $this->last_stmt = $stmt; 
    592         if ($this->manip_query[(int)$stmt]) { 
     598        if ($this->manip_query[(int)$stmt] || $this->_next_query_manip) { 
     599            $this->_last_query_manip = true; 
     600            $this->_next_query_manip = false; 
    593601            $tmp = DB_OK; 
    594602        } else { 
    595             $tmp =& new DB_result($this, $res); 
     603            $this->_last_query_manip = false; 
     604            $tmp = new DB_result($this, $res); 
    596605        } 
    597606        return $tmp; 
     
    699708        do { 
    700709            $this->pushErrorHandling(PEAR_ERROR_RETURN); 
    701             $result =& $this->query("SELECT GEN_ID(${sqn}, 1) " 
     710            $result = $this->query("SELECT GEN_ID(${sqn}, 1) " 
    702711                                   . 'FROM RDB$GENERATORS ' 
    703712                                   . "WHERE RDB\$GENERATOR_NAME='${sqn}'"); 
     
    857866            $errno = $this->errorCode($this->errorNative()); 
    858867        } 
    859         $tmp =& $this->raiseError($errno, null, null, null, @ibase_errmsg()); 
     868        $tmp = $this->raiseError($errno, null, null, null, @ibase_errmsg()); 
    860869        return $tmp; 
    861870    } 
     
    926935                '/arithmetic exception, numeric overflow, or string truncation/i' 
    927936                    => DB_ERROR_INVALID, 
     937                '/feature is not supported/i' 
     938                    => DB_ERROR_NOT_CAPABLE, 
    928939            ); 
    929940        } 
Note: See TracChangeset for help on using the changeset viewer.