Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
36a0e656
Commit
36a0e656
authored
Feb 07, 2017
by
Steve Müller
Committed by
Marco Pivetta
Feb 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #2637: fix closing prepared statement cursor with LOB column on Oracle
parent
c13ee0cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
OCI8Statement.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
+1
-5
StatementTest.php
tests/Doctrine/Tests/DBAL/Functional/StatementTest.php
+14
-0
No files found.
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
View file @
36a0e656
...
...
@@ -188,11 +188,7 @@ class OCI8Statement implements \IteratorAggregate, Statement
return
true
;
}
// emulate it by fetching and discarding rows, similarly to what PDO does in this case
// @link http://php.net/manual/en/pdostatement.closecursor.php
// @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075
// deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them
while
(
oci_fetch
(
$this
->
_sth
));
oci_cancel
(
$this
->
_sth
);
$this
->
result
=
false
;
...
...
tests/Doctrine/Tests/DBAL/Functional/StatementTest.php
View file @
36a0e656
...
...
@@ -15,6 +15,7 @@ class StatementTest extends \Doctrine\Tests\DbalFunctionalTestCase
$table
=
new
Table
(
'stmt_test'
);
$table
->
addColumn
(
'id'
,
'integer'
);
$table
->
addColumn
(
'name'
,
'text'
,
array
(
'notnull'
=>
false
));
$this
->
_conn
->
getSchemaManager
()
->
dropAndCreateTable
(
$table
);
}
...
...
@@ -225,6 +226,19 @@ EOF
$this
->
assertTrue
(
$stmt
->
closeCursor
());
}
/**
* @group DBAL-2637
*/
public
function
testCloseCursorAfterCursorEnd
()
{
$stmt
=
$this
->
_conn
->
prepare
(
'SELECT name FROM stmt_test'
);
$stmt
->
execute
();
$stmt
->
fetch
();
$this
->
assertTrue
(
$stmt
->
closeCursor
());
}
/**
* @dataProvider emptyFetchProvider
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment