Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
- Remove impossible test in test_quick_select
- Ensure that is_fatal_error is set if we run out of stack space
  • Loading branch information
montywi committed Aug 22, 2016
1 parent b511096 commit a5051cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions sql/opt_range.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3015,8 +3015,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
scan_time= read_time= DBL_MAX;
if (limit < records)
read_time= (double) records + scan_time + 1; // Force to use index
else if (read_time <= 2.0 && !force_quick_range)
DBUG_RETURN(0); /* No need for quick select */

possible_keys.clear_all();

Expand Down Expand Up @@ -3285,7 +3283,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
thd->no_errors=0;
}


DBUG_EXECUTE("info", print_quick(quick, &needed_reg););

/*
Expand Down
1 change: 1 addition & 0 deletions sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6181,6 +6181,7 @@ bool check_stack_overrun(THD *thd, long margin,
if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
(long) (my_thread_stack_size - margin))
{
thd->is_fatal_error= 1;
/*
Do not use stack for the message buffer to ensure correct
behaviour in cases we have close to no stack left.
Expand Down

0 comments on commit a5051cd

Please sign in to comment.