1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

fix for MariaDB 10.0.9

This commit is contained in:
Kentoku SHIBA
2014-03-25 05:38:08 +09:00
parent 487a064783
commit 89441877e7
9 changed files with 90 additions and 27 deletions

View File

@@ -3649,10 +3649,15 @@ int spider_db_mysql_util::open_item_func(
func_name_length = strlen(func_name);
DBUG_PRINT("info",("spider func_name = %s", func_name));
DBUG_PRINT("info",("spider func_name_length = %d", func_name_length));
if (str->reserve(SPIDER_SQL_MBR_LEN + func_name_length +
SPIDER_SQL_OPEN_PAREN_LEN))
if (str->reserve(
#ifndef SPIDER_ITEM_GEOFUNC_NAME_HAS_MBR
SPIDER_SQL_MBR_LEN +
#endif
func_name_length + SPIDER_SQL_OPEN_PAREN_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
#ifndef SPIDER_ITEM_GEOFUNC_NAME_HAS_MBR
str->q_append(SPIDER_SQL_MBR_STR, SPIDER_SQL_MBR_LEN);
#endif
str->q_append(func_name, func_name_length);
str->q_append(SPIDER_SQL_OPEN_PAREN_STR, SPIDER_SQL_OPEN_PAREN_LEN);
}