Couple days ago I got following error from MySQL database:
Thread stack overrun: 68744 bytes used of a 196608 byte stack, and 128000 bytes needed. Use
Just ran into a similar error today. The MySQL documentation about the variable provides a hint for default values which should be enough (192K for 32 bit systems and 256K for 64 bit systems), as well as to look at the MySQL Benchmark suite.