~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_delete.cc

  • Committer: Brian Aker
  • Date: 2009-06-03 19:30:45 UTC
  • mfrom: (1046.1.6 merge)
  • Revision ID: brian@gaz-20090603193045-4xgeczyfixh07beg
MergeĀ forĀ Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
825
825
  if (!dont_send_ok)
826
826
    goto trunc_by_del;
827
827
 
828
 
  pthread_mutex_lock(&LOCK_open);
 
828
  pthread_mutex_lock(&LOCK_open); /* Recreate table for truncate */
829
829
  error= ha_create_table(session, path, table_list->db, table_list->table_name,
830
830
                         &create_info, 1);
831
831
  pthread_mutex_unlock(&LOCK_open);
842
842
      write_bin_log(session, true, session->query, session->query_length);
843
843
      session->my_ok();         // This should return record count
844
844
    }
845
 
    pthread_mutex_lock(&LOCK_open);
 
845
    pthread_mutex_lock(&LOCK_open); /* For truncate delete from hash when finished */
846
846
    unlock_table_name(table_list);
847
847
    pthread_mutex_unlock(&LOCK_open);
848
848
  }
849
849
  else if (error)
850
850
  {
851
 
    pthread_mutex_lock(&LOCK_open);
 
851
    pthread_mutex_lock(&LOCK_open); /* For truncate delete from hash when finished */
852
852
    unlock_table_name(table_list);
853
853
    pthread_mutex_unlock(&LOCK_open);
854
854
  }