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/mysqli.php

    r15532 r18609  
    1818 * @package    DB 
    1919 * @author     Daniel Convissor <danielc@php.net> 
    20  * @copyright  1997-2005 The PHP Group 
     20 * @copyright  1997-2007 The PHP Group 
    2121 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 
    2222 * @version    CVS: $Id$ 
     
    4242 * @package    DB 
    4343 * @author     Daniel Convissor <danielc@php.net> 
    44  * @copyright  1997-2005 The PHP Group 
     44 * @copyright  1997-2007 The PHP Group 
    4545 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 
    46  * @version    Release: @package_version@ 
     46 * @version    Release: 1.7.14RC1 
    4747 * @link       http://pear.php.net/package/DB 
    4848 * @since      Class functional since Release 1.6.3 
     
    115115        1216 => DB_ERROR_CONSTRAINT, 
    116116        1217 => DB_ERROR_CONSTRAINT, 
     117        1356 => DB_ERROR_DIVZERO, 
     118        1451 => DB_ERROR_CONSTRAINT, 
     119        1452 => DB_ERROR_CONSTRAINT, 
    117120    ); 
    118121 
     
    211214        MYSQLI_TYPE_STRING      => 'char', 
    212215        MYSQLI_TYPE_GEOMETRY    => 'geometry', 
     216        /* These constants are conditionally compiled in ext/mysqli, so we'll 
     217         * define them by number rather than constant. */ 
     218        16                      => 'bit', 
     219        246                     => 'decimal', 
    213220    ); 
    214221 
     
    265272     * ); 
    266273     *  
    267      * $db =& DB::connect($dsn, $options); 
     274     * $db = DB::connect($dsn, $options); 
    268275     * if (PEAR::isError($db)) { 
    269276     *     die($db->getMessage()); 
     
    288295 
    289296        $ini = ini_get('track_errors'); 
    290         ini_set('track_errors', 1); 
     297        @ini_set('track_errors', 1); 
    291298        $php_errormsg = ''; 
    292299 
    293         if ($this->getOption('ssl') === true) { 
     300        if (((int) $this->getOption('ssl')) === 1) { 
    294301            $init = mysqli_init(); 
    295302            mysqli_ssl_set( 
     
    323330        } 
    324331 
    325         ini_set('track_errors', $ini); 
     332        @ini_set('track_errors', $ini); 
    326333 
    327334        if (!$this->connection) { 
     
    373380    function simpleQuery($query) 
    374381    { 
    375         $ismanip = DB::isManip($query); 
     382        $ismanip = $this->_checkManip($query); 
    376383        $this->last_query = $query; 
    377384        $query = $this->modifyQuery($query); 
     
    491498    function freeResult($result) 
    492499    { 
    493         return @mysqli_free_result($result); 
     500        return is_resource($result) ? mysqli_free_result($result) : false; 
    494501    } 
    495502 
     
    627634    function affectedRows() 
    628635    { 
    629         if (DB::isManip($this->last_query)) { 
     636        if ($this->_last_query_manip) { 
    630637            return @mysqli_affected_rows($this->connection); 
    631638        } else { 
     
    824831    /** 
    825832     * Quotes a string so it can be safely used as a table or column name 
    826      * 
    827      * MySQL can't handle the backtick character (<kbd>`</kbd>) in 
    828      * table or column names. 
     833     * (WARNING: using names that require this is a REALLY BAD IDEA) 
     834     * 
     835     * WARNING:  Older versions of MySQL can't handle the backtick 
     836     * character (<kbd>`</kbd>) in table or column names. 
    829837     * 
    830838     * @param string $str  identifier name to be quoted 
     
    837845    function quoteIdentifier($str) 
    838846    { 
    839         return '`' . $str . '`'; 
     847        return '`' . str_replace('`', '``', $str) . '`'; 
    840848    } 
    841849 
     
    879887    function modifyLimitQuery($query, $from, $count, $params = array()) 
    880888    { 
    881         if (DB::isManip($query)) { 
     889        if (DB::isManip($query) || $this->_next_query_manip) { 
    882890            return $query . " LIMIT $count"; 
    883891        } else { 
     
    955963    { 
    956964        if (is_string($result)) { 
     965            // Fix for bug #11580. 
     966            if ($this->_db) { 
     967                if (!@mysqli_select_db($this->connection, $this->_db)) { 
     968                    return $this->mysqliRaiseError(DB_ERROR_NODBSELECTED); 
     969                } 
     970            } 
     971 
    957972            /* 
    958973             * Probably received a table name. 
     
    10161031                                    ? $this->mysqli_types[$tmp->type] 
    10171032                                    : 'unknown', 
    1018                 'len'   => $tmp->max_length, 
     1033                // http://bugs.php.net/?id=36579 
     1034                'len'   => $tmp->length, 
    10191035                'flags' => $flags, 
    10201036            ); 
Note: See TracChangeset for help on using the changeset viewer.