Changeset 18609 for tmp/version-2_5-test/data/module/DB/ibase.php
- Timestamp:
- 2010/03/11 10:35:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tmp/version-2_5-test/data/module/DB/ibase.php
r15532 r18609 22 22 * @author Sterling Hughes <sterling@php.net> 23 23 * @author Daniel Convissor <danielc@php.net> 24 * @copyright 1997-200 5The PHP Group24 * @copyright 1997-2007 The PHP Group 25 25 * @license http://www.php.net/license/3_0.txt PHP License 3.0 26 26 * @version CVS: $Id$ … … 48 48 * @author Sterling Hughes <sterling@php.net> 49 49 * @author Daniel Convissor <danielc@php.net> 50 * @copyright 1997-200 5The PHP Group50 * @copyright 1997-2007 The PHP Group 51 51 * @license http://www.php.net/license/3_0.txt PHP License 3.0 52 * @version Release: @package_version@52 * @version Release: 1.7.14RC1 53 53 * @link http://pear.php.net/package/DB 54 54 * @since Class became stable in Release 1.7.0 … … 124 124 -803 => DB_ERROR_CONSTRAINT, 125 125 -804 => DB_ERROR_VALUE_COUNT_ON_ROW, 126 // -902 => // Covers too many errors, need to use regex on msg 126 127 -904 => DB_ERROR_CONNECT_FAILED, 127 128 -922 => DB_ERROR_NOSUCHDB, … … 276 277 function simpleQuery($query) 277 278 { 278 $ismanip = DB::isManip($query);279 $ismanip = $this->_checkManip($query); 279 280 $this->last_query = $query; 280 281 $query = $this->modifyQuery($query); … … 413 414 function freeResult($result) 414 415 { 415 return @ibase_free_result($result);416 return is_resource($result) ? ibase_free_result($result) : false; 416 417 } 417 418 … … 421 422 function freeQuery($query) 422 423 { 423 @ibase_free_query($query); 424 return true; 424 return is_resource($query) ? ibase_free_query($query) : false; 425 425 } 426 426 … … 522 522 $newquery = $this->modifyQuery($newquery); 523 523 $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 526 532 return $stmt; 527 533 } … … 548 554 $this->last_parameters = $data; 549 555 550 $types = &$this->prepare_types[(int)$stmt];556 $types = $this->prepare_types[(int)$stmt]; 551 557 if (count($types) != count($data)) { 552 $tmp = &$this->raiseError(DB_ERROR_MISMATCH);558 $tmp = $this->raiseError(DB_ERROR_MISMATCH); 553 559 return $tmp; 554 560 } … … 569 575 $fp = @fopen($data[$key], 'rb'); 570 576 if (!$fp) { 571 $tmp = &$this->raiseError(DB_ERROR_ACCESS_VIOLATION);577 $tmp = $this->raiseError(DB_ERROR_ACCESS_VIOLATION); 572 578 return $tmp; 573 579 } … … 582 588 $res = call_user_func_array('ibase_execute', $data); 583 589 if (!$res) { 584 $tmp = &$this->ibaseRaiseError();590 $tmp = $this->ibaseRaiseError(); 585 591 return $tmp; 586 592 } … … 590 596 }*/ 591 597 $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; 593 601 $tmp = DB_OK; 594 602 } else { 595 $tmp =& new DB_result($this, $res); 603 $this->_last_query_manip = false; 604 $tmp = new DB_result($this, $res); 596 605 } 597 606 return $tmp; … … 699 708 do { 700 709 $this->pushErrorHandling(PEAR_ERROR_RETURN); 701 $result = &$this->query("SELECT GEN_ID(${sqn}, 1) "710 $result = $this->query("SELECT GEN_ID(${sqn}, 1) " 702 711 . 'FROM RDB$GENERATORS ' 703 712 . "WHERE RDB\$GENERATOR_NAME='${sqn}'"); … … 857 866 $errno = $this->errorCode($this->errorNative()); 858 867 } 859 $tmp = &$this->raiseError($errno, null, null, null, @ibase_errmsg());868 $tmp = $this->raiseError($errno, null, null, null, @ibase_errmsg()); 860 869 return $tmp; 861 870 } … … 926 935 '/arithmetic exception, numeric overflow, or string truncation/i' 927 936 => DB_ERROR_INVALID, 937 '/feature is not supported/i' 938 => DB_ERROR_NOT_CAPABLE, 928 939 ); 929 940 }
Note: See TracChangeset
for help on using the changeset viewer.