Skip to content

ext/pdo_pgsql: avoid getColumnMeta() interfering with ATTR_PREFETCH = 0 - #23918

Open
outtersg wants to merge 2 commits into
php:PHP-8.5from
outtersg:pdopg_unbuffered_columnmeta
Open

outtersg wants to merge 2 commits into
php:PHP-8.5from
outtersg:pdopg_unbuffered_columnmeta

Conversation

@outtersg

Copy link
Copy Markdown
Contributor

doing an (internal) query to fetch metadata from the server broke the currently-running (user) query

(this is part 2. of #23892 (comment))

doing an (internal) query to fetch metadata from the server broke the currently-running (user) query
backport the parts of php#23920 that we relied upon (this PR being a split of php#23892)
kept it synchronized with the source, to ease later merging
@devnexen

Copy link
Copy Markdown
Member

It seems right however, once #23919 is merged, I would like this PR being rebased upon it.

@outtersg

Copy link
Copy Markdown
Contributor Author

@devnexen wrote:

It seems right however, once #23919 is merged, I would like this PR being rebased upon it.

I'm totally OK for that, because, even if the second commit is intended to be dropped (containing the part common to both PRs), there will still be the conflict on the intermixed part, about the order to choose for the ifs coming from each PR.

The canonical order being in the original PR:
• let a chance for the cached_table_name to be returned
• then return NULL
• then empty cached_table_name (in order to immediately refill it)

Thus in case of a statement temporarily paused by an unbuffered query's results coming through, we have kept the cache, which can be of use again once the results have been consumed. Strange case but why not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants