summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-08-12 15:44:34 +0200
committerGuilhem Bichot <guilhem@mysql.com>2009-08-12 15:44:34 +0200
commiteceba8912c9af415f9704bb671ddb4022eb8d9fc (patch)
tree5fdae14ec96fd61b574fe1c8b2d62d304114c53c /mysys
parente44bda225abd5a736999b9c73ac88e059d823c2d (diff)
parent6e7de781d73b8967f1ab9e6c076795dd83429a80 (diff)
downloadmariadb-git-eceba8912c9af415f9704bb671ddb4022eb8d9fc.tar.gz
merge of 5.1-main into mysql-trunk.
Changes to ha_innodb.cc are not propagated to plugin, they will come back via Oracle/Innobase if needed.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/Makefile.am2
-rw-r--r--mysys/array.c14
-rw-r--r--mysys/my_handler_errors.h3
3 files changed, 10 insertions, 9 deletions
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index da840f123d9..4b07cf89676 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -63,7 +63,7 @@ libmysys_a_LIBADD = @THREAD_LOBJECTS@
# test_charset_DEPENDENCIES= $(LIBRARIES)
# charset2html_DEPENDENCIES= $(LIBRARIES)
DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DDEFAULT_HOME_ENV=MYSQL_HOME \
diff --git a/mysys/array.c b/mysys/array.c
index 92940717c90..b65bd28616d 100644
--- a/mysys/array.c
+++ b/mysys/array.c
@@ -32,11 +32,11 @@
DESCRIPTION
init_dynamic_array() initiates array and allocate space for
init_alloc eilements.
- Array is usable even if space allocation failed.
+ Array is usable even if space allocation failed, hence, the
+ function never returns TRUE.
Static buffers must begin immediately after the array structure.
RETURN VALUE
- TRUE my_malloc_ci() failed
FALSE Ok
*/
@@ -63,12 +63,12 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
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,
- MYF(MY_WME))))
- {
+ /*
+ Since the dynamic array is usable even if allocation fails here malloc
+ should not throw an error
+ */
+ if (!(array->buffer= (char*) my_malloc_ci(element_size*init_alloc, MYF(0))))
array->max_element=0;
- DBUG_RETURN(TRUE);
- }
DBUG_RETURN(FALSE);
}
diff --git a/mysys/my_handler_errors.h b/mysys/my_handler_errors.h
index e360af8c57e..c239cabb168 100644
--- a/mysys/my_handler_errors.h
+++ b/mysys/my_handler_errors.h
@@ -62,6 +62,7 @@ static const char *handler_error_messages[]=
"The event could not be processed no other hanlder error happened",
"Got a fatal error during initialzaction of handler",
"File to short; Expected more data in file",
- "Read page with wrong checksum"
+ "Read page with wrong checksum",
+ "Too many active concurrent transactions"
};