~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

MergedĀ fromĀ Mats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
493
493
                       &key_buff, old_share->table_cache_key.length,
494
494
                       NULL))
495
495
  {
496
 
    memset((char*) share, 0, sizeof(*share));
 
496
    memset(share, 0, sizeof(*share));
497
497
    share->set_table_cache_key(key_buff, old_share->table_cache_key.str,
498
498
                               old_share->table_cache_key.length);
499
499
    share->tmp_table= INTERNAL_TMP_TABLE;       // for intern_close_table()
536
536
  TABLE_LIST table_list;
537
537
 
538
538
  VOID(pthread_mutex_lock(&LOCK_open));
539
 
  memset((char*) &table_list, 0, sizeof(table_list));
 
539
  memset(&table_list, 0, sizeof(table_list));
540
540
  start_list= &open_list;
541
541
  open_list=0;
542
542
 
2472
2472
    uint length=(uint) strlen(alias)+1;
2473
2473
    table->alias= (char*) my_realloc((char*) table->alias, length,
2474
2474
                                     MYF(MY_WME));
2475
 
    memcpy((char*) table->alias, alias, length);
 
2475
    memcpy((void*) table->alias, alias, length);
2476
2476
  }
2477
2477
  /* These variables are also set in reopen_table() */
2478
2478
  table->tablenr=thd->current_tablenr++;
6365
6365
                                   (file->name[1] == '.' &&  !file->name[2])))
6366
6366
        continue;
6367
6367
 
6368
 
      if (!memcmp((uchar*) file->name, (uchar*) tmp_file_prefix,
6369
 
                  tmp_file_prefix_length))
 
6368
      if (!memcmp(file->name, tmp_file_prefix, tmp_file_prefix_length))
6370
6369
      {
6371
6370
        char *ext= fn_ext(file->name);
6372
6371
        uint ext_len= strlen(ext);
6373
6372
        uint filePath_len= snprintf(filePath, sizeof(filePath),
6374
6373
                                    "%s%c%s", tmpdir, FN_LIBCHAR,
6375
6374
                                    file->name);
6376
 
        if (!memcmp((uchar*) reg_ext, (uchar*) ext, ext_len))
 
6375
        if (!memcmp(reg_ext, ext, ext_len))
6377
6376
        {
6378
6377
          handler *handler_file= 0;
6379
6378
          /* We should cut file extention before deleting of table */