diff options
author | Sergei Golubchik <serg@mysql.com> | 2008-08-08 13:11:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2008-08-08 13:11:27 +0200 |
commit | e2219ec965a80b2034d9debcbf12d3e73a684d89 (patch) | |
tree | b3536b97676a1a4775570820a6ff59a628ed4e99 /mysys/array.c | |
parent | f8c1059cbf62e95d2684fdf8b9badc398f845173 (diff) | |
download | mariadb-git-e2219ec965a80b2034d9debcbf12d3e73a684d89.tar.gz |
wt_thd_lazy_init(), per-thread deadlock search depths and timeouts
mysys/array.c:
lazy alloc in dynamic array
sql-common/client.c:
for dynamic array, specify init_alloc==alloc_increment explicitly
sql/mysqld.cc:
per-thread deadlock search depths and timeouts
sql/set_var.cc:
per-thread deadlock search depths and timeouts
sql/sql_class.h:
per-thread deadlock search depths and timeouts
Diffstat (limited to 'mysys/array.c')
-rw-r--r-- | mysys/array.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mysys/array.c b/mysys/array.c index 039d9b4a2c2..b31260344a9 100644 --- a/mysys/array.c +++ b/mysys/array.c @@ -51,19 +51,14 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, if (init_alloc > 8 && alloc_increment > init_alloc * 2) alloc_increment=init_alloc*2; } - - if (!init_alloc) - { - init_alloc=alloc_increment; - init_buffer= 0; - } array->elements=0; array->max_element=init_alloc; array->alloc_increment=alloc_increment; array->size_of_element=element_size; if ((array->buffer= init_buffer)) DBUG_RETURN(FALSE); - if (!(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc, + if (init_alloc && + !(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc, MYF(MY_WME)))) { array->max_element=0; |