diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-04-08 10:37:17 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-04-13 15:11:59 +0200 |
commit | 5615a78a69a596099d5f515dd03424b402c7fd17 (patch) | |
tree | 6d7d2f3990536b44977979cb43c74a86558982f1 /sql/sql_cursor.cc | |
parent | cdc0bbdd87bbe139b543916f0ab32c90e3fb4917 (diff) | |
download | mariadb-git-5615a78a69a596099d5f515dd03424b402c7fd17.tar.gz |
MDEV-28266 Crash in Field_string::type_handler when calling procedures
on_table_fill_finished() should always be done at the end of open()
even if result is not Select_materialize but (for example)
Select_fetch_into_spvars.
Diffstat (limited to 'sql/sql_cursor.cc')
-rw-r--r-- | sql/sql_cursor.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 0add5845558..d45f2ac8777 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -80,19 +80,7 @@ public: Select_materialize(THD *thd_arg, select_result *result_arg): select_unit(thd_arg), result(result_arg), materialized_cursor(0) {} virtual bool send_result_set_metadata(List<Item> &list, uint flags); - bool send_eof() - { - if (materialized_cursor) - materialized_cursor->on_table_fill_finished(); - return false; - } - - void abort_result_set() - { - if (materialized_cursor) - materialized_cursor->on_table_fill_finished(); - } - + bool send_eof() { return false; } bool view_structure_only() const { return result->view_structure_only(); @@ -333,6 +321,8 @@ int Materialized_cursor::open(JOIN *join __attribute__((unused))) result->abort_result_set(); } + on_table_fill_finished(); + return rc; } |