~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Monty Taylor
  • Date: 2009-01-28 04:37:46 UTC
  • mto: (779.7.3 devel)
  • mto: This revision was merged to the branch mainline in revision 816.
  • Revision ID: mordred@inaugust.com-20090128043746-d2yukekishwn3ftm
TurnedĀ onĀ -Wshadow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3286
3286
compare_tables(Session *session,
3287
3287
               Table *table,
3288
3288
               Alter_info *alter_info,
3289
 
                           HA_CREATE_INFO *create_info,
 
3289
               HA_CREATE_INFO *create_info,
3290
3290
               uint32_t order_num,
3291
3291
               HA_ALTER_FLAGS *alter_flags,
3292
3292
               HA_ALTER_INFO *ha_alter_info,
3316
3316
      destroy the copy.
3317
3317
    */
3318
3318
    Alter_info tmp_alter_info(*alter_info, session->mem_root);
3319
 
    Session *session= table->in_use;
 
3319
    session= table->in_use;
3320
3320
    uint32_t db_options= 0; /* not used */
3321
3321
    /* Create the prepared information. */
3322
3322
    if (mysql_prepare_create_table(session, create_info,
4833
4833
  }
4834
4834
  else
4835
4835
  {
4836
 
    char path[FN_REFLEN];
 
4836
    char tmp_path[FN_REFLEN];
4837
4837
    /* table is a normal table: Create temporary table in same directory */
4838
 
    build_table_filename(path, sizeof(path), new_db, tmp_name, "",
 
4838
    build_table_filename(tmp_path, sizeof(tmp_path), new_db, tmp_name, "",
4839
4839
                         FN_IS_TMP);
4840
4840
    /* Open our intermediate table */
4841
 
    new_table=open_temporary_table(session, path, new_db, tmp_name, 0, OTM_OPEN);
 
4841
    new_table=open_temporary_table(session, tmp_path, new_db, tmp_name, 0, OTM_OPEN);
4842
4842
  }
4843
4843
  if (!new_table)
4844
4844
    goto err1;
5000
5000
      have to open the new table.  If not, we get a problem on server
5001
5001
      shutdown. But we do not need to attach MERGE children.
5002
5002
    */
5003
 
    char path[FN_REFLEN];
 
5003
    char table_path[FN_REFLEN];
5004
5004
    Table *t_table;
5005
 
    build_table_filename(path, sizeof(path), new_db, table_name, "", 0);
5006
 
    t_table= open_temporary_table(session, path, new_db, tmp_name, false, OTM_OPEN);
 
5005
    build_table_filename(table_path, sizeof(table_path), new_db, table_name, "", 0);
 
5006
    t_table= open_temporary_table(session, table_path, new_db, tmp_name, false, OTM_OPEN);
5007
5007
    if (t_table)
5008
5008
    {
5009
5009
      intern_close_table(t_table);
5010
5010
      free(t_table);
5011
5011
    }
5012
5012
    else
5013
 
      errmsg_printf(ERRMSG_LVL_WARN, _("Could not open table %s.%s after rename\n"),
5014
 
                        new_db,table_name);
 
5013
      errmsg_printf(ERRMSG_LVL_WARN,
 
5014
                    _("Could not open table %s.%s after rename\n"),
 
5015
                    new_db,table_name);
5015
5016
    ha_flush_logs(old_db_type);
5016
5017
  }
5017
5018
  table_list->table=0;                          // For query cache