mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-36324 MDEV-35452 Missing appending FROM ... in spider_mbase_handler::append_key_select
The missing append_from causes ill-formed query construction. This fixes spider/bugfix.mdev_35874 with --view-protocol.
This commit is contained in:
@@ -8889,12 +8889,13 @@ int spider_mbase_handler::append_key_select_part(
|
|||||||
default:
|
default:
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
error_num = append_key_select(str, idx);
|
error_num = append_key_select(str, sql_type, idx);
|
||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
int spider_mbase_handler::append_key_select(
|
int spider_mbase_handler::append_key_select(
|
||||||
spider_string *str,
|
spider_string *str,
|
||||||
|
ulong sql_type,
|
||||||
uint idx
|
uint idx
|
||||||
) {
|
) {
|
||||||
st_select_lex *select_lex = NULL;
|
st_select_lex *select_lex = NULL;
|
||||||
@@ -8943,6 +8944,7 @@ int spider_mbase_handler::append_key_select(
|
|||||||
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
|
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
|
||||||
}
|
}
|
||||||
str->length(str->length() - SPIDER_SQL_COMMA_LEN);
|
str->length(str->length() - SPIDER_SQL_COMMA_LEN);
|
||||||
|
DBUG_RETURN(append_from(str, sql_type, first_link_idx));
|
||||||
} else {
|
} else {
|
||||||
table_name_pos = str->length() + mysql_share->key_select_pos[idx];
|
table_name_pos = str->length() + mysql_share->key_select_pos[idx];
|
||||||
if (str->append(mysql_share->key_select[idx]))
|
if (str->append(mysql_share->key_select[idx]))
|
||||||
|
@@ -887,6 +887,7 @@ public:
|
|||||||
) override;
|
) override;
|
||||||
int append_key_select(
|
int append_key_select(
|
||||||
spider_string *str,
|
spider_string *str,
|
||||||
|
ulong sql_type,
|
||||||
uint idx
|
uint idx
|
||||||
);
|
);
|
||||||
int append_minimum_select_part(
|
int append_minimum_select_part(
|
||||||
|
Reference in New Issue
Block a user