Commit
This is a workaround for issue #267, where we unprepare a statement in a batch when the parameter types change but we expect to still know the field types in the statement we just unprepared. It's much more complicated than that, see #267 for the gory details.
- Loading branch information
There are no files selected for viewing
7 comments
on commit a6bd36f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the history on this, although I seem to recall that it was intentional, but we are going to have to investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For "intentional" usages I would expect int QUERY_FORCE_DESCRIBE_PORTAL = QUERY_DISALLOW_BATCHING
kind of declaration.
However, "disallow_batching" is a rather unexpected strategy of "batch API" support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree the assumption is logical, We can't rely on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The testcase for #267 is in the test set (https://gist.github.com/ringerc/25d36e9f0044077c664b), and it passes with QUERY_FORCE_DESCRIBE_PORTAL
having its own value (see #380)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, lets see if @ringerc responds to this? He may remember better than I
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confident this was an error on my part in the original patch. Thanks @vlsi for identifying it.
The only thing that surprises me is that, given this oversight, it's been working happily for so long. I validated the original batching in wireshark and with debug message tracing, and I know at least one site that's been using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
QUERY_FORCE_DESCRIBE_PORTAL = 128;
happens to collide withstatic int QUERY_DISALLOW_BATCHING = 128;
Was that intentional?
I'm facing degradation of executeBatch, and it looks like this 128 forces batch to be executed one-by-one