Commit a5051cd3 authored by Monty's avatar Monty

Minor cleanups

- Remove impossible test in test_quick_select
- Ensure that is_fatal_error is set if we run out of stack space
parent b5110969
...@@ -3015,8 +3015,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, ...@@ -3015,8 +3015,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
scan_time= read_time= DBL_MAX; scan_time= read_time= DBL_MAX;
if (limit < records) if (limit < records)
read_time= (double) records + scan_time + 1; // Force to use index 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(); possible_keys.clear_all();
...@@ -3285,7 +3283,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, ...@@ -3285,7 +3283,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
thd->no_errors=0; thd->no_errors=0;
} }
DBUG_EXECUTE("info", print_quick(quick, &needed_reg);); DBUG_EXECUTE("info", print_quick(quick, &needed_reg););
/* /*
......
...@@ -6181,6 +6181,7 @@ bool check_stack_overrun(THD *thd, long margin, ...@@ -6181,6 +6181,7 @@ bool check_stack_overrun(THD *thd, long margin,
if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >= if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
(long) (my_thread_stack_size - margin)) (long) (my_thread_stack_size - margin))
{ {
thd->is_fatal_error= 1;
/* /*
Do not use stack for the message buffer to ensure correct Do not use stack for the message buffer to ensure correct
behaviour in cases we have close to no stack left. behaviour in cases we have close to no stack left.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment