~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2008-08-18 20:57:01 UTC
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818205701-rzeyd4qw4xj7wx7l
Refactoring of class Table

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
static char *make_unique_key_name(const char *field_name,KEY *start,KEY *end);
30
30
static int copy_data_between_tables(Table *from,Table *to,
31
31
                                    List<Create_field> &create, bool ignore,
32
 
                                    uint order_num, ORDER *order,
 
32
                                    uint order_num, order_st *order,
33
33
                                    ha_rows *copied,ha_rows *deleted,
34
34
                                    enum enum_enable_or_disable keys_onoff,
35
35
                                    bool error_if_not_empty);
3331
3331
    E.g. ALTER Table tbl_name ENGINE=MyISAM.
3332
3332
 
3333
3333
    For the following ones we also want to run regular alter table:
3334
 
    ALTER Table tbl_name ORDER BY ..
 
3334
    ALTER Table tbl_name order_st BY ..
3335
3335
    ALTER Table tbl_name CONVERT TO CHARACTER SET ..
3336
3336
 
3337
3337
    At the moment we can't handle altering temporary tables without a copy.
4331
4331
      table_list       The table to change.
4332
4332
      alter_info       Lists of fields, keys to be changed, added
4333
4333
                       or dropped.
4334
 
      order_num        How many ORDER BY fields has been specified.
4335
 
      order            List of fields to ORDER BY.
 
4334
      order_num        How many order_st BY fields has been specified.
 
4335
      order            List of fields to order_st BY.
4336
4336
      ignore           Whether we have ALTER IGNORE Table
4337
4337
 
4338
4338
  DESCRIPTION
4364
4364
                       HA_CREATE_INFO *create_info,
4365
4365
                       TABLE_LIST *table_list,
4366
4366
                       Alter_info *alter_info,
4367
 
                       uint order_num, ORDER *order, bool ignore)
 
4367
                       uint order_num, order_st *order, bool ignore)
4368
4368
{
4369
4369
  Table *table, *new_table=0, *name_lock= 0;;
4370
4370
  int error= 0;
5085
5085
copy_data_between_tables(Table *from,Table *to,
5086
5086
                         List<Create_field> &create,
5087
5087
                         bool ignore,
5088
 
                         uint order_num, ORDER *order,
 
5088
                         uint order_num, order_st *order,
5089
5089
                         ha_rows *copied,
5090
5090
                         ha_rows *deleted,
5091
5091
                         enum enum_enable_or_disable keys_onoff,
5166
5166
    {
5167
5167
      char warn_buff[DRIZZLE_ERRMSG_SIZE];
5168
5168
      snprintf(warn_buff, sizeof(warn_buff), 
5169
 
               _("ORDER BY ignored because there is a user-defined clustered "
 
5169
               _("order_st BY ignored because there is a user-defined clustered "
5170
5170
                 "index in the table '%-.192s'"),
5171
5171
               from->s->table_name.str);
5172
5172
      push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
5329
5329
  alter_info.flags= (ALTER_CHANGE_COLUMN | ALTER_RECREATE);
5330
5330
  return(mysql_alter_table(thd, NullS, NullS, &create_info,
5331
5331
                                table_list, &alter_info, 0,
5332
 
                                (ORDER *) 0, 0));
 
5332
                                (order_st *) 0, 0));
5333
5333
}
5334
5334
 
5335
5335