Skip to content

Conversation

@ptgr
Copy link

@ptgr ptgr commented Nov 28, 2025

  • bug fix
  • BC break? no

When oci8 driver is used and there is an subquery error then an exception is not thrown.

Let see the example:

  • php.ini has option oci8.default_prefetch=100
  • SELECT (SELECT col FROM table WHERE ...) AS subcol FROM dual => subquery error ORA-01427: single-row subquery returns more than one row
  • The ORA error occurs during fetching of rows > 100 (due to prefetch)
  1. fetch function returns first 100 rows -> ok
  2. Then it try to returns next 100 rows but there is a subquery error so it returns false
  3. The function does not check oci_error so it does not thrown an exception
  4. Result is that we have only 100 rows

It is primary query error but I think that function should be able to handle it.
The fix I tested on Oracle version 19.0.0.0.0

@dg dg force-pushed the master branch 3 times, most recently from 013da5d to c097256 Compare December 29, 2025 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants