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

Merge 10.11 -> 11.4

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2024-12-05 11:01:42 +01:00
78 changed files with 1333 additions and 273 deletions

View File

@@ -13754,6 +13754,11 @@ int spider_mbase_handler::append_group_by_part(
DBUG_RETURN(error_num);
}
/*
Append the GROUP BY part.
Only used by the group by handler for query construction.
*/
int spider_mbase_handler::append_group_by(
ORDER *order,
spider_string *str,
@@ -13772,6 +13777,13 @@ int spider_mbase_handler::append_group_by(
str->q_append(SPIDER_SQL_GROUP_STR, SPIDER_SQL_GROUP_LEN);
for (; order; order = order->next)
{
/*
This is not expected to happen, as NULL check was performed
at the creation of the group by handler, and any NULL item_ptr
would have resulted in the gbh not being created.
*/
if (!order->item_ptr)
DBUG_RETURN(ER_INTERNAL_ERROR);
if ((error_num = spider_db_print_item_type(order->item_ptr, NULL, spider,
str, alias, alias_length, dbton_id, use_fields, fields)))
{
@@ -13811,6 +13823,11 @@ int spider_mbase_handler::append_order_by_part(
DBUG_RETURN(error_num);
}
/*
Append the ORDER BY part.
Only used by the group by handler for query construction.
*/
int spider_mbase_handler::append_order_by(
ORDER *order,
spider_string *str,
@@ -13829,6 +13846,13 @@ int spider_mbase_handler::append_order_by(
str->q_append(SPIDER_SQL_ORDER_STR, SPIDER_SQL_ORDER_LEN);
for (; order; order = order->next)
{
/*
This is not expected to happen, as NULL check was performed
at the creation of the group by handler, and any NULL item_ptr
would have resulted in the gbh not being created.
*/
if (!order->item_ptr)
DBUG_RETURN(ER_INTERNAL_ERROR);
if ((error_num = spider_db_print_item_type(order->item_ptr, NULL, spider,
str, alias, alias_length, dbton_id, use_fields, fields)))
{