1436 - Thread Stack Overrun: Proper Resolution
The query you provided, which updates a simple table and triggers a straightforward trigger, encounters an error: "Thread stack overrun." Let's explore the underlying reasons and identify the appropriate solution.
Why the Error Occurs
The MySQL server allocates a specific amount of stack memory for each thread. In this case, the thread stack size is set to 131072 bytes. However, the execution of the update query and the trigger requires more than this allocated memory, leading to the error.
Finding the Root Cause
To determine the source of the error, consider the following:
Resolving the Issue
The most straightforward solution is to increase the thread stack size. You can achieve this through the my.cnf configuration file by adding the following line:
[mysqld] thread_stack = [new_stack_size_in_bytes]
Recommended values for the new stack size are:
Additional Notes
以上是為什麼我的 MySQL 查詢會觸發「線程堆疊溢位」錯誤?的詳細內容。更多資訊請關注PHP中文網其他相關文章!