mysql> call productpricing(); ERROR 1436 (HY000): Thread stack overrun: 10368 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.
解決辦法:
vim /etc/my.cnf thread_stack = 128K ##原來爲128,根據報錯提示,我改大一點 /etc/init.d/mysqld restart
效果:
mysql> call productpricing(); +--------------+ | priveaverage | +--------------+ | 16.133571 | +--------------+ 1 row in set (0.01 sec) Query OK, 0 rows affected (0.01 sec) mysql>