#252 EXPLAIN could interpred user defined variables in statement

3.3.4
closed-wont-fix
MySQL (68)
5
2012-06-29
2012-06-15
Petr Burian
No

A SQL statement is not explainable if there is a user defined variable used in the statement. It should be easy to convert user defined variables to constants if explain is needed.

Discussion

  • Petr Burian

    Petr Burian - 2012-06-15

    Explain example to reproduce the issue

     
  • Jakub Vrána

    Jakub Vrána - 2012-06-29

    The reason for this is that EXPLAIN is executed in a separate connection to not affect queries like "SELECT 1; SELECT FOUND_ROWS();".

    I'm not sure about the right fix, replacing variables by constants may give wrong results.

     
  • Jakub Vrána

    Jakub Vrána - 2012-06-29
    • status: open --> closed-wont-fix
     

Log in to post a comment.