~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/analyze.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <drizzled/server_includes.h>
22
22
#include <drizzled/show.h>
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/statement/analyze.h>
25
 
#include "drizzled/sql_table.h"
26
25
 
27
 
namespace drizzled
28
 
{
 
26
using namespace drizzled;
29
27
 
30
28
bool statement::Analyze::execute()
31
29
{
33
31
  TableList *all_tables= session->lex->query_tables;
34
32
  assert(first_table == all_tables && first_table != 0);
35
33
  Select_Lex *select_lex= &session->lex->select_lex;
36
 
  bool res= mysql_analyze_table(session, first_table, &check_opt);
 
34
  bool res= mysql_analyze_table(session, first_table, &session->lex->check_opt);
37
35
  /* ! we write after unlocking the table */
38
 
  write_bin_log(session, session->query.c_str());
 
36
  write_bin_log(session, true, session->query, session->query_length);
39
37
  select_lex->table_list.first= (unsigned char*) first_table;
40
38
  session->lex->query_tables= all_tables;
41
39
  return res;
42
40
}
43
 
 
44
 
} /* namespace drizzled */
45