Bug #20778 | strange characters in warning message 1366 when called in SP | ||
---|---|---|---|
Submitted: | 29 Jun 2006 14:56 | Modified: | 4 Oct 2006 2:10 |
Reporter: | Carsten Segieth | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S1 (Critical) |
Version: | 5.0.23-bk | OS: | Linux (Linux (Suse 9.3)) |
Assigned to: | Chad MILLER | CPU Architecture: | Any |
[29 Jun 2006 14:56]
Carsten Segieth
[29 Jun 2006 14:58]
Carsten Segieth
test file with table and procedure definition
Attachment: cs_095.inc (application/octet-stream, text), 1.72 KiB.
[27 Sep 2006 22:08]
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/12667 ChangeSet@1.2297, 2006-09-27 18:10:41-04:00, cmiller@zippy.cornsilk.net +3 -0 Bug #20778: strange characters in warning message 1366 when called in SP The function receives an exactly-sized buffer (not a C NUL-terminated string) and passes it into a printf function to be interpreted with "%s". Instead, create an intermediate String object, and copy the data into it, and pass in a pointer to the String's NUL-terminated buffer.
[27 Sep 2006 23:24]
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/12670 ChangeSet@1.2276, 2006-09-27 19:26:25-04:00, cmiller@zippy.cornsilk.net +3 -0 Bug #20778: strange characters in warning message 1366 when called in SP The function receives an exactly-sized buffer (not a C NUL-terminated string) and passes it into a printf function to be interpreted with "%s". Instead, create an intermediate String object, and copy the data into it, and pass in a pointer to the String's NUL-terminated buffer.
[3 Oct 2006 20:02]
Chad MILLER
Available in 5.0.26.
[3 Oct 2006 20:09]
Chad MILLER
Available in 5.1.12-beta.
[4 Oct 2006 2:10]
Paul DuBois
Noted in 5.0.26, 5.1.12 changelog. Within stored routines, some error messages were printed incorrectly. A non-null-terminated string was passed to a message-printing routine that expected a null-terminated string.