Commit 74195f40 authored by Kentoku SHIBA's avatar Kentoku SHIBA

current date

parent 5b07977a
......@@ -9438,11 +9438,6 @@ int ha_spider::direct_update_rows_init(
}
result_list.direct_order_limit = TRUE;
}
if ((error_num = spider_check_trx_and_get_conn(thd, this, TRUE)))
{
DBUG_RETURN(error_num);
}
trx->direct_update_count++;
DBUG_PRINT("info",("spider OK"));
DBUG_RETURN(0);
......@@ -9481,6 +9476,10 @@ int ha_spider::direct_update_rows_init(
do_direct_update = FALSE;
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
if ((error_num = spider_check_trx_and_get_conn(thd, this, TRUE)))
{
DBUG_RETURN(error_num);
}
#endif
trx->direct_update_count++;
DBUG_PRINT("info",("spider OK"));
......@@ -9728,11 +9727,6 @@ int ha_spider::direct_delete_rows_init(
}
result_list.direct_order_limit = TRUE;
}
if ((error_num = spider_check_trx_and_get_conn(thd, this, TRUE)))
{
DBUG_RETURN(error_num);
}
trx->direct_delete_count++;
DBUG_PRINT("info",("spider OK"));
DBUG_RETURN(0);
......@@ -9750,6 +9744,12 @@ int ha_spider::direct_delete_rows_init(
#endif
do_direct_update
) {
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if ((error_num = spider_check_trx_and_get_conn(thd, this, TRUE)))
{
DBUG_RETURN(error_num);
}
#endif
trx->direct_delete_count++;
DBUG_PRINT("info",("spider OK"));
DBUG_RETURN(0);
......
......@@ -8026,10 +8026,27 @@ int spider_db_open_item_int(
{
char tmp_buf[MAX_FIELD_WIDTH];
spider_string tmp_str(tmp_buf, MAX_FIELD_WIDTH, str->charset());
String *tmp_str2;
tmp_str.init_calc_mem(127);
if (str->append(*item->val_str(tmp_str.get_str())))
if (!(tmp_str2 = item->val_str(tmp_str.get_str())))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
tmp_str.mem_calc();
#ifdef SPIDER_ITEM_HAS_CMP_TYPE
DBUG_PRINT("info",("spider cmp_type=%u", item->cmp_type()));
if (item->cmp_type() == TIME_RESULT)
{
if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN * 2 + tmp_str2->length()))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
str->append(*tmp_str2);
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
} else {
#endif
if (str->append(*tmp_str2))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
#ifdef SPIDER_ITEM_HAS_CMP_TYPE
}
#endif
}
DBUG_RETURN(0);
}
......
......@@ -28,6 +28,7 @@
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100007
#define SPIDER_HAS_DISCOVER_TABLE_STRUCTURE_COMMENT
#define SPIDER_ITEM_HAS_CMP_TYPE
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100004
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment