mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed Bug#2479, "dependant subquery with limit crash".
The problem was that memory was free'd, but it was referenced later. This free was unneccessary anyway, because join_free() / JOIN::cleanup takes care of this later on. Added test case into t/subselect.test for it. Regards, Jani mysql-test/r/subselect.result: Added a test case for Bug#2479. mysql-test/t/subselect.test: Added a test case for Bug#2479. sql/sql_select.cc: Fixed Bug#2479, "dependant subquery with limit crash". The problem was that memory was free'd, but it was referenced later. This free was unneccessary anyway, because join_free() / JOIN::cleanup takes care of this later on.
This commit is contained in:
@ -7200,7 +7200,6 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
|
||||
table->sort.found_records=filesort(thd, table,sortorder, length,
|
||||
select, filesort_limit, &examined_rows);
|
||||
tab->records=table->sort.found_records; // For SQL_CALC_ROWS
|
||||
delete select; // filesort did select
|
||||
tab->select=0;
|
||||
tab->select_cond=0;
|
||||
tab->type=JT_ALL; // Read with normal read_record
|
||||
|
Reference in New Issue
Block a user