diff options
author | Satya B <satya.bn@sun.com> | 2009-12-02 19:30:50 +0530 |
---|---|---|
committer | Satya B <satya.bn@sun.com> | 2009-12-02 19:30:50 +0530 |
commit | c6c12db965ec17f5bf7db20eaf668eede32e4e43 (patch) | |
tree | 20b44164d11355963bfee1938eef05d8f545cfcf /storage/innobase/sync/sync0arr.c | |
parent | 37360afb219a6864eb28e4beaf538c0838b6d8fe (diff) | |
parent | 3606e59cfefbc3f0ed64c45e55bd1289abb9bf64 (diff) | |
download | mariadb-git-c6c12db965ec17f5bf7db20eaf668eede32e4e43.tar.gz |
Merge Innodb Plugin 1.0.6 from mysql-5.1-bugteam storage/innodb_plugin to mysql-trunk-merge.
Merging revisions 3221 to 3230 from mysql-5.1-bugteam
Diffstat (limited to 'storage/innobase/sync/sync0arr.c')
-rw-r--r-- | storage/innobase/sync/sync0arr.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/storage/innobase/sync/sync0arr.c b/storage/innobase/sync/sync0arr.c index d78ee8f3191..ed9e25bf2f2 100644 --- a/storage/innobase/sync/sync0arr.c +++ b/storage/innobase/sync/sync0arr.c @@ -227,24 +227,21 @@ sync_array_create( SYNC_ARRAY_MUTEX: determines the type of mutex protecting the data structure */ { + ulint sz; sync_array_t* arr; - sync_cell_t* cell_array; - sync_cell_t* cell; - ulint i; ut_a(n_cells > 0); /* Allocate memory for the data structures */ arr = ut_malloc(sizeof(sync_array_t)); + memset(arr, 0x0, sizeof(*arr)); - cell_array = ut_malloc(sizeof(sync_cell_t) * n_cells); + sz = sizeof(sync_cell_t) * n_cells; + arr->array = ut_malloc(sz); + memset(arr->array, 0x0, sz); arr->n_cells = n_cells; - arr->n_reserved = 0; - arr->array = cell_array; arr->protection = protection; - arr->sg_count = 0; - arr->res_count = 0; /* Then create the mutex to protect the wait array complex */ if (protection == SYNC_ARRAY_OS_MUTEX) { @@ -255,13 +252,6 @@ sync_array_create( ut_error; } - for (i = 0; i < n_cells; i++) { - cell = sync_array_get_nth_cell(arr, i); - cell->wait_object = NULL; - cell->waiting = FALSE; - cell->signal_count = 0; - } - return(arr); } |