From 1a4f499ca87634d4256d2531bab68b32f3e5fa49 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 May 2004 20:40:21 +0300 Subject: EXPLAIN UNION using same routing which used for execution which allow return correct bug messages (Bug #3639) EXPLAIN of hidden SELECT of UNION mysql-test/r/derived.result: explain of hidden select mysql-test/r/subselect.result: explain of hidden select mysql-test/r/union.result: explain of hidden select correct error messages on explain mysql-test/t/subselect.test: show eliminated costants in WHERE clause mysql-test/t/union.test: correct error messages on EXPLAIN with union sql/item.cc: fixed name constructing for global ORDER BY items sql/sql_class.h: select ID can be negative (for hidden SELECTs) removed unused field sql/sql_lex.cc: new flag of UNION EXPLAIN sql/sql_lex.h: new flag of UNION EXPLAIN select ID can be negative (for hidden SELECTs) sql/sql_select.cc: EXPLAIN UNION using same routing which used for execution explain for hidden SELECT of UNION sql/sql_union.cc: EXPLAIN UNION using same routing which used for execution --- sql/sql_lex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 50f13a0391c..fd6e9142275 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -336,6 +336,7 @@ public: st_select_lex *fake_select_lex; st_select_lex *union_distinct; /* pointer to the last UNION DISTINCT */ + bool describe; /* union exec() called for EXPLAIN */ void init_query(); bool create_total_list(THD *thd, st_lex *lex, TABLE_LIST **result); @@ -413,7 +414,7 @@ public: ulong table_join_options; uint in_sum_expr; - uint select_number; /* number of select (used for EXPLAIN) */ + int select_number; /* number of select (used for EXPLAIN) */ uint with_wild; /* item list contain '*' */ bool braces; /* SELECT ... UNION (SELECT ... ) <- this braces */ /* TRUE when having fix field called in processing of this SELECT */ -- cgit v1.2.1