00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <config.h>
00022 #include <drizzled/show.h>
00023 #include <drizzled/session.h>
00024 #include <drizzled/statement/analyze.h>
00025 #include <drizzled/sql_table.h>
00026 #include <drizzled/sql_lex.h>
00027
00028 namespace drizzled
00029 {
00030
00031 bool statement::Analyze::execute()
00032 {
00033 TableList *first_table= (TableList *) lex().select_lex.table_list.first;
00034 TableList *all_tables= lex().query_tables;
00035 assert(first_table == all_tables && first_table != 0);
00036 Select_Lex *select_lex= &lex().select_lex;
00037 bool res= analyze_table(&session(), first_table, &check_opt);
00038 select_lex->table_list.first= (unsigned char*) first_table;
00039 lex().query_tables= all_tables;
00040
00041 return res;
00042 }
00043
00044 }
00045