~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-23 10:02:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2348.
  • Revision ID: olafvdspek@gmail.com-20110623100230-w8vx1so32tkxsh6f
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
1704
1704
          (admin operation or network communication failed)
1705
1705
*/
1706
1706
static bool admin_table(Session* session, TableList* tables,
1707
 
                              HA_CHECK_OPT* check_opt,
1708
1707
                              const char *operator_name,
1709
1708
                              thr_lock_type lock_type,
1710
1709
                              bool open_for_modify,
1711
 
                              int (Cursor::*operator_func)(Session *,
1712
 
                                                            HA_CHECK_OPT *))
 
1710
                              int (Cursor::*operator_func)(Session*))
1713
1711
{
1714
1712
  TableList *table;
1715
1713
  Select_Lex *select= &session->lex().select_lex;
1816
1814
      open_for_modify= 0;
1817
1815
    }
1818
1816
 
1819
 
    result_code = (table->table->cursor->*operator_func)(session, check_opt);
 
1817
    result_code = (table->table->cursor->*operator_func)(session);
1820
1818
 
1821
1819
send_result:
1822
1820
 
2144
2142
}
2145
2143
 
2146
2144
 
2147
 
bool analyze_table(Session* session, TableList* tables, HA_CHECK_OPT* check_opt)
 
2145
bool analyze_table(Session* session, TableList* tables)
2148
2146
{
2149
2147
  thr_lock_type lock_type = TL_READ_NO_INSERT;
2150
2148
 
2151
 
  return(admin_table(session, tables, check_opt,
2152
 
                                "analyze", lock_type, true,
2153
 
                                &Cursor::ha_analyze));
 
2149
  return(admin_table(session, tables, "analyze", lock_type, true, &Cursor::ha_analyze));
2154
2150
}
2155
2151
 
2156
2152
 
2157
 
bool check_table(Session* session, TableList* tables,HA_CHECK_OPT* check_opt)
 
2153
bool check_table(Session* session, TableList* tables)
2158
2154
{
2159
2155
  thr_lock_type lock_type = TL_READ_NO_INSERT;
2160
 
 
2161
 
  return(admin_table(session, tables, check_opt,
2162
 
                                "check", lock_type,
2163
 
                                false,
2164
 
                                &Cursor::ha_check));
 
2156
  return admin_table(session, tables, "check", lock_type, false, &Cursor::ha_check);
2165
2157
}
2166
2158
 
2167
2159
} /* namespace drizzled */