how to use "mysqld -O thread_stack=#" I keep getting this error whether I run my query from the terminal or from within Java. Anyone has some instructions how to resolve this?

Thread stack overrun:  5768 bytes used of a 131072 byte stack, and 128000 bytes needed.
Use 'mysqld -O thread_stack=#' to specify a bigger stack.


BTW: I am using mac osx lion
I don't think Rolando thought about what this variable does before answering. Don't set the thread_stack to 32M. It's is allocated per connection and 100 connections is going use 3.2GB.

thread_stack = 192K


Setting it to the fairly standard 192k should be fine.