~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/ha/hash0hash.c

  • Committer: Lee Bieber
  • Date: 2010-12-02 18:56:33 UTC
  • mfrom: (1966.3.1 bug683842)
  • mto: This revision was merged to the branch mainline in revision 1969.
  • Revision ID: kalebral@gmail.com-20101202185633-e27o1zhpev18dlsn
Merge Monty - fix bug 683842: remove generic catch blocks       

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1997, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
109
109
 
110
110
        prime = ut_find_prime(n);
111
111
 
112
 
        table = static_cast<hash_table_t*>(mem_alloc(sizeof(hash_table_t)));
 
112
        table = mem_alloc(sizeof(hash_table_t));
113
113
 
114
 
        array = static_cast<hash_cell_t*>(ut_malloc(sizeof(hash_cell_t) * prime));
 
114
        array = ut_malloc(sizeof(hash_cell_t) * prime);
115
115
 
116
116
        table->array = array;
117
117
        table->n_cells = prime;
172
172
        ut_a(n_mutexes > 0);
173
173
        ut_a(ut_is_2pow(n_mutexes));
174
174
 
175
 
        table->mutexes = static_cast<mutex_struct *>(mem_alloc(n_mutexes * sizeof(mutex_t)));
 
175
        table->mutexes = mem_alloc(n_mutexes * sizeof(mutex_t));
176
176
 
177
177
        for (i = 0; i < n_mutexes; i++) {
178
178
                mutex_create(hash_table_mutex_key,