| Bug #29856 | Very long prepared statement in SP can cause crash with certain options | ||
|---|---|---|---|
| Submitted: | 17 Jul 2007 22:57 | Modified: | 3 Aug 2007 18:43 |
| Reporter: | Harrison Fisk | ||
| Status: | Closed | ||
| Category: | Server: SP | Severity: | S2 (Serious) |
| Version: | 5.0.44,5.0.48BK | OS: | Linux (Ubuntu 6.06) |
| Assigned to: | Evgeny Potemkin | Target Version: | |
| Tags: | prepared statement, query cache, binary log, crash | ||
[17 Jul 2007 22:57]
Harrison Fisk
[17 Jul 2007 22:58]
Harrison Fisk
File to make mysqld crash
Attachment: testcase_29856.txt (text/plain), 16.34 KiB.
[23 Jul 2007 21:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/31415 ChangeSet@1.2535, 2007-07-23 18:10:12+04:00, evgen@moonbone.local +3 -0 Bug#29856: Insufficient buffer space led to a server crash. The subst_spvars function is used to create query string with SP variables substituted with their values. This string is used later for the binary log and for the query cache. The problem is that the query_cache_send_result_to_client function requires some additional space after the query to store database name and query cache flags. This space wasn't reserved by the subst_spvars function which led to a memory corruption and crash. Now the subst_spvars function reserves additional space for the query cache.
[24 Jul 2007 21:58]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/31510 ChangeSet@1.2534, 2007-07-24 23:54:08+04:00, evgen@moonbone.local +3 -0 Bug#29856: Insufficient buffer space led to a server crash. The subst_spvars function is used to create query string with SP variables substituted with their values. This string is used later for the binary log and for the query cache. The problem is that the query_cache_send_result_to_client function requires some additional space after the query to store database name and query cache flags. This space wasn't reserved by the subst_spvars function which led to a memory corruption and crash. Now the subst_spvars function reserves additional space for the query cache.
[25 Jul 2007 10:12]
Sergey Petrunia
Review feedback provided on IRC
[28 Jul 2007 13:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/31762 ChangeSet@1.2534, 2007-07-28 15:01:29+04:00, evgen@moonbone.local +3 -0 Bug#29856: Insufficient buffer space led to a server crash. The subst_spvars function is used to create query string with SP variables substituted with their values. This string is used later for the binary log and for the query cache. The problem is that the query_cache_send_result_to_client function requires some additional space after the query to store database name and query cache flags. This space wasn't reserved by the subst_spvars function which led to a memory corruption and crash. Now the subst_spvars function reserves additional space for the query cache.
[2 Aug 2007 21:13]
Bugs System
Pushed into 5.1.21-beta
[2 Aug 2007 21:15]
Bugs System
Pushed into 5.0.48
[3 Aug 2007 18:43]
Paul DuBois
Noted in 5.0.48, 5.1.21 changelogs. Very long prepared statements in stored procedures could cause a server crash.
