~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_index.cc

  • Committer: Eric Day
  • Date: 2009-10-31 21:53:33 UTC
  • mfrom: (1200 staging)
  • mto: This revision was merged to the branch mainline in revision 1202.
  • Revision ID: eday@oddments.org-20091031215333-j94bjoanwmi68p6f
Merged trunk.

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 <drizzled/server_includes.h>
22
 
#include <drizzled/show.h>
23
 
#include <drizzled/session.h>
24
 
#include <drizzled/statement/create_index.h>
 
21
#include "drizzled/server_includes.h"
 
22
#include "drizzled/show.h"
 
23
#include "drizzled/session.h"
 
24
#include "drizzled/statement/create_index.h"
 
25
#include "drizzled/statement/alter_table.h"
25
26
 
26
 
using namespace drizzled;
 
27
namespace drizzled
 
28
{
27
29
 
28
30
bool statement::CreateIndex::execute()
29
31
{
47
49
  create_info.row_type= ROW_TYPE_NOT_USED;
48
50
  create_info.default_table_charset= get_default_db_collation(session->db);
49
51
 
50
 
  bool res= mysql_alter_table(session, 
51
 
                              first_table->db, 
52
 
                              first_table->table_name,
53
 
                              &create_info, 
54
 
                              &create_table_proto, 
55
 
                              first_table,
56
 
                              &alter_info,
57
 
                              0, (order_st*) 0, 0);
 
52
  bool res= alter_table(session, 
 
53
                        first_table->db, 
 
54
                        first_table->table_name,
 
55
                        &create_info, 
 
56
                        &create_table_proto, 
 
57
                        first_table,
 
58
                        &alter_info,
 
59
                        0, (order_st*) 0, 0);
58
60
  return res;
59
61
}
 
62
 
 
63
} /* namespace drizzled */