~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/ha_myisam.cc

  • Committer: Brian Aker
  • Date: 2010-06-11 18:03:14 UTC
  • mfrom: (1608.2.4 rollup)
  • Revision ID: brian@gaz-20100611180314-1bafy27fvm3t7z1j
Merge in some recent changes to tableshare.

Show diffs side-by-side

added added

removed removed

Lines of Context:
589
589
  if (!(file=mi_open(name, mode, test_if_locked)))
590
590
    return (errno ? errno : -1);
591
591
 
592
 
  if (!table->getShare()->tmp_table) /* No need to perform a check for tmp table */
 
592
  if (!table->getShare()->getType()) /* No need to perform a check for tmp table */
593
593
  {
594
594
    if ((errno= table2myisam(table, &keyinfo, &recinfo, &recs)))
595
595
    {
706
706
  strcpy(fixed_name,file->filename);
707
707
 
708
708
  // Don't lock tables if we have used LOCK Table
709
 
  if (mi_lock_database(file, table->getShare()->tmp_table ? F_EXTRA_LCK : F_WRLCK))
 
709
  if (mi_lock_database(file, table->getShare()->getType() ? F_EXTRA_LCK : F_WRLCK))
710
710
  {
711
711
    mi_check_print_error(&param,ER(ER_CANT_LOCK),errno);
712
712
    return(HA_ADMIN_FAILED);
1225
1225
    stats.block_size= myisam_key_cache_block_size;        /* record block size */
1226
1226
 
1227
1227
    /* Update share */
1228
 
    if (share->tmp_table == message::Table::STANDARD)
 
1228
    if (share->getType() == message::Table::STANDARD)
1229
1229
      pthread_mutex_lock(&share->mutex);
1230
1230
    set_prefix(share->keys_in_use, share->sizeKeys());
1231
1231
    /*
1279
1279
      memcpy(table->key_info[0].rec_per_key,
1280
1280
             misam_info.rec_per_key,
1281
1281
             sizeof(table->key_info[0].rec_per_key)*share->key_parts);
1282
 
    if (share->tmp_table == message::Table::STANDARD)
 
1282
    if (share->getType() == message::Table::STANDARD)
1283
1283
      pthread_mutex_unlock(&share->mutex);
1284
1284
 
1285
1285
   /*
1344
1344
int ha_myisam::external_lock(Session *session, int lock_type)
1345
1345
{
1346
1346
  file->in_use= session;
1347
 
  return mi_lock_database(file, !table->getShare()->tmp_table ?
 
1347
  return mi_lock_database(file, !table->getShare()->getType() ?
1348
1348
                          lock_type : ((lock_type == F_UNLCK) ?
1349
1349
                                       F_UNLCK : F_EXTRA_LCK));
1350
1350
}