mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
release cursors in return_zero_rows
This commit is contained in:
parent
3ba6fd97b4
commit
924de89305
2 changed files with 3 additions and 4 deletions
|
@ -629,7 +629,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
|||
if (!records)
|
||||
records++; /* purecov: inspected */
|
||||
scan_time=(double) records / TIME_FOR_COMPARE+1;
|
||||
read_time=(double) head->file->scan_time()+ scan_time + 1.0;
|
||||
read_time=(double) head->file->scan_time()+ scan_time + 1.01;
|
||||
if (head->force_index)
|
||||
scan_time= read_time= DBL_MAX;
|
||||
if (limit < records)
|
||||
|
@ -716,9 +716,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
|||
key++,idx++)
|
||||
{
|
||||
ha_rows found_records;
|
||||
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 95) && defined(__OPTIMIZE__)
|
||||
volatile // gcc 2.95.3 bug in -O3 mode
|
||||
#endif
|
||||
double found_read_time;
|
||||
if (*key)
|
||||
{
|
||||
|
|
|
@ -4128,6 +4128,8 @@ return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables,
|
|||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
join->join_free(0);
|
||||
|
||||
if (send_row)
|
||||
{
|
||||
for (TABLE_LIST *table=tables; table ; table=table->next)
|
||||
|
|
Loading…
Reference in a new issue