Fix incorrect order for parameters in DESCRIBE INPUT#14914
Fix incorrect order for parameters in DESCRIBE INPUT#14914martint merged 5 commits intotrinodb:masterfrom
Conversation
There was a problem hiding this comment.
Can we be a bit more specific here like bindParametersToExpression the method name might mislead us ParameterRewriter - where we bind the parameter to expression
There was a problem hiding this comment.
I don't think the "toExpression" suffix adds much value. Although, it'd be clearer if the second argument were named "values" instead of parameters -- the parameters are in the query itself.
There was a problem hiding this comment.
But if it is some sort of a uniqueId (which I totally agree) then comparing getId but parameters size would make less sense.
There was a problem hiding this comment.
That's sort of true, unless we define the ids as being from 0 to the number of parameters in the query. I hesitated removing these checks, but I do agree they look wonky. Let me see if there's a better way to represent them, or I'll just remove them.
The position does not actually match the order in which they are supposed to be processed. It's needed just to assign a unique identity to each parameter node.
They were being listed in depth-first-search order instead of in the order in which they appear in the query text.
82c3b05 to
a2e9d47
Compare
The parameters were being listed in depth-first-search order instead of in the order in which they appear in the query text.
Fixes #14738
Release notes
(x) Release notes are required, please propose a release note for me.