diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-16 12:12:06 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-18 10:19:13 +0100 |
commit | bc166844e37a6e1531a18dc0916fbe508152fc6c (patch) | |
tree | c7f9d77387bba95a1ef7feee421da07c4c104448 /ext/pdo_mysql/mysql_statement.c | |
parent | 315f3f8dc9b3ba3639c9284301933286fc99a825 (diff) | |
download | php-git-bc166844e37a6e1531a18dc0916fbe508152fc6c.tar.gz |
MySQLnd: Support cursors in store/get result
This fixes two related issues:
1. When a PS with cursor is used in store_result/get_result,
perform a COM_FETCH with maximum number of rows rather than
silently switching to an unbuffered result set (in the case of
store_result) or erroring (in the case of get_result).
In the future, we might want to make get_result unbuffered for
PS with cursors, as using cursors with buffered result sets
doesn't really make sense. Unlike store_result, get_result
isn't very explicit about what kind of result set is desired.
2. If the client did not request a cursor, but the server reports
that a cursor exists, ignore this and treat the PS as if it
has no cursor (i.e. to not use COM_FETCH). It appears to be a
server side bug that a cursor used inside an SP will be reported
to the client, even though the client cannot use the cursor.
Fixes bug #64638, bug #72862, bug #77935.
Closes GH-6518.
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
0 files changed, 0 insertions, 0 deletions