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

Merge 10.8 into 10.9

This commit is contained in:
Marko Mäkelä
2022-07-28 10:47:33 +03:00
421 changed files with 20471 additions and 8799 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (C) 2012-2018 Kentoku Shiba
Copyright (c) 2020, MariaDB Corporation.
Copyright (c) 2020, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -6506,12 +6506,6 @@ int spider_db_mbase_util::open_item_func(
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
break;
case Item_func::XOR_FUNC:
if (str)
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
DBUG_RETURN(
spider_db_open_item_cond((Item_cond *) item_func, spider, str,
alias, alias_length, dbton_id, use_fields, fields));
case Item_func::TRIG_COND_FUNC:
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
case Item_func::GUSERVAR_FUNC:
@@ -6596,6 +6590,7 @@ int spider_db_mbase_util::open_item_func(
case Item_func::LE_FUNC:
case Item_func::GE_FUNC:
case Item_func::GT_FUNC:
case Item_func::XOR_FUNC:
if (str)
{
LEX_CSTRING org_func_name= item_func->func_name_cstring();
@@ -7057,25 +7052,13 @@ int spider_db_mbase_util::append_table(
} else if (*current_pos > 0 && !first)
{
DBUG_PRINT("info",("spider no condition"));
if (top_down)
if (str)
{
if (str)
if (str->reserve(SPIDER_SQL_JOIN_LEN))
{
if (str->reserve(SPIDER_SQL_JOIN_LEN))
{
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
str->q_append(SPIDER_SQL_JOIN_STR, SPIDER_SQL_JOIN_LEN);
}
} else {
if (str)
{
if (str->reserve(SPIDER_SQL_COMMA_LEN))
{
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
str->q_append(SPIDER_SQL_JOIN_STR, SPIDER_SQL_JOIN_LEN);
}
}