Bug #66674
closedexec_SELECTgetRows does not return any rows
100%
Description
Using ADOdb with MSSQL native driver.
exec_SELECTgetRows() checks for sql_errors() and this method is overridden in DBAL:
public function sql_error() { $output = ''; switch ($this->handlerCfg[$this->lastHandlerKey]['type']) { case 'native': $output = $this->handlerInstance[$this->lastHandlerKey]['link']->error; break; case 'adodb': $output = $this->handlerInstance[$this->lastHandlerKey]->ErrorMsg(); break; case 'userdefined': $output = $this->handlerInstance[$this->lastHandlerKey]->sql_error(); break; } return $output; }
Problem is that ->ErrorMsg in ADOdb for mssql_native is defined as
function ErrorMsg() { $retErrors = sqlsrv_errors(SQLSRV_ERR_ALL); if($retErrors != null) { foreach($retErrors as $arrError) { $this->_errorMsg .= "SQLState: ".$arrError[ 'SQLSTATE']."\n"; $this->_errorMsg .= "Error Code: ".$arrError[ 'code']."\n"; $this->_errorMsg .= "Message: ".$arrError[ 'message']."\n"; } } else { $this->_errorMsg = "No errors found"; } return $this->_errorMsg; }
It should return an empty string instead of "No errors found".
Updated by Gerrit Code Review over 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39069
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39069
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39071
Updated by Xavier Perseguers over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a906744554c4720d2acd23ffbcaccf57566a3da3.