mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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.
This commit is contained in:
@@ -80,19 +80,7 @@ public:
|
|||||||
Select_materialize(THD *thd_arg, select_result *result_arg):
|
Select_materialize(THD *thd_arg, select_result *result_arg):
|
||||||
select_unit(thd_arg), result(result_arg), materialized_cursor(0) {}
|
select_unit(thd_arg), result(result_arg), materialized_cursor(0) {}
|
||||||
virtual bool send_result_set_metadata(List<Item> &list, uint flags);
|
virtual bool send_result_set_metadata(List<Item> &list, uint flags);
|
||||||
bool send_eof()
|
bool send_eof() { return false; }
|
||||||
{
|
|
||||||
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 view_structure_only() const
|
bool view_structure_only() const
|
||||||
{
|
{
|
||||||
return result->view_structure_only();
|
return result->view_structure_only();
|
||||||
@@ -334,6 +322,8 @@ int Materialized_cursor::open(JOIN *join __attribute__((unused)))
|
|||||||
result->abort_result_set();
|
result->abort_result_set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
on_table_fill_finished();
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user