~mordred/drizzle/codestyle

« back to all changes in this revision

Viewing changes to drizzled/sql_delete.cc

  • Committer: Monty
  • Date: 2008-10-02 05:41:33 UTC
  • mfrom: (398.1.10 codestyle)
  • Revision ID: mordred@scylla.inaugust.com-20081002054133-tyxv5bmqpazfaqqi
Merged up to 408 of stdint-includes-fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
891
891
  // crashes, replacement works.  *(path + path_length - reg_ext_length)=
892
892
  // '\0';
893
893
  path[path_length - reg_ext_length] = 0;
894
 
  VOID(pthread_mutex_lock(&LOCK_open));
 
894
  pthread_mutex_lock(&LOCK_open);
895
895
  error= ha_create_table(thd, path, table_list->db, table_list->table_name,
896
896
                         &create_info, 1);
897
 
  VOID(pthread_mutex_unlock(&LOCK_open));
 
897
  pthread_mutex_unlock(&LOCK_open);
898
898
 
899
899
end:
900
900
  if (!dont_send_ok)
908
908
      write_bin_log(thd, true, thd->query, thd->query_length);
909
909
      my_ok(thd);               // This should return record count
910
910
    }
911
 
    VOID(pthread_mutex_lock(&LOCK_open));
 
911
    pthread_mutex_lock(&LOCK_open);
912
912
    unlock_table_name(thd, table_list);
913
 
    VOID(pthread_mutex_unlock(&LOCK_open));
 
913
    pthread_mutex_unlock(&LOCK_open);
914
914
  }
915
915
  else if (error)
916
916
  {
917
 
    VOID(pthread_mutex_lock(&LOCK_open));
 
917
    pthread_mutex_lock(&LOCK_open);
918
918
    unlock_table_name(thd, table_list);
919
 
    VOID(pthread_mutex_unlock(&LOCK_open));
 
919
    pthread_mutex_unlock(&LOCK_open);
920
920
  }
921
921
  return(error);
922
922
 
930
930
  bool save_binlog_row_based= thd->current_stmt_binlog_row_based;
931
931
  thd->clear_current_stmt_binlog_row_based();
932
932
  error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
933
 
                      HA_POS_ERROR, 0LL, true);
 
933
                      HA_POS_ERROR, 0L, true);
934
934
  ha_enable_transaction(thd, true);
935
935
  /*
936
936
    Safety, in case the engine ignored ha_enable_transaction(false)