Commit 5629af17 authored by unknown's avatar unknown
Browse files

Change error message when the amount of stack needed is not available

to include how much stack space we need. (Bug #11213)


sql/share/errmsg.txt:
  Add new error message
sql/sql_parse.cc:
  Use new ER_STACK_OVERRUN_NEED_MORE, which includes information on
  how much room we need on the stack.
parent 8fc03d97
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5358,3 +5358,5 @@ ER_STMT_HAS_NO_OPEN_CURSOR
	eng "The statement (%lu) has no open cursor."
ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
        eng "Explicit or implicit commit is not allowed in stored function or trigger."
ER_STACK_OVERRUN_NEED_MORE
	eng "Thread stack overrun:  %ld bytes used of a %ld byte stack, and %ld bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger stack."
+3 −2
Original line number Diff line number Diff line
@@ -5094,8 +5094,9 @@ bool check_stack_overrun(THD *thd, long margin,
  if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
      (long) (thread_stack - margin))
  {
    sprintf(errbuff[0],ER(ER_STACK_OVERRUN),stack_used,thread_stack);
    my_message(ER_STACK_OVERRUN,errbuff[0],MYF(0));
    sprintf(errbuff[0],ER(ER_STACK_OVERRUN_NEED_MORE),
            stack_used,thread_stack,margin);
    my_message(ER_STACK_OVERRUN_NEED_MORE,errbuff[0],MYF(0));
    thd->fatal_error();
    return 1;
  }