Bug #15588 String overrun during sp-vars.test
Submitted: 8 Dec 2005 14:02 Modified: 14 Feb 2006 3:03
Reporter: Ingo Strüwing Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S2 (Serious)
Version:5.0.18 OS:Linux (Linux)
Assigned to: Alexander Nozdrin CPU Architecture:Any

[8 Dec 2005 14:02] Ingo Strüwing
Description:
A string overrun warning happens when sp-vars.test is run from a -debug-max build.

Current bk source up to ChangeSet@1.1978.1.13, 2005-12-08 00:18:37+03:00, dlenev@mysql.com

How to repeat:
Make a -debug-max build.

cd mysql-test 
./mysql-test-run sp-vars

The test result will be:

TEST                            RESULT
-------------------------------------------------------
sp-vars                        [ pass ]   
-------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
Slave shutdown finished
All 1 tests were successful.
WARNING: Got errors/warnings while running tests. Please examine
/home/mydev/mysql-5.0-bug10932/mysql-test/var/log/warnings for details.

mysql-test/var/log/warnings contains:

Error: Memory allocated at sql_string.cc:75 was overrun, discovered at 'sql_string.cc:75'
Error: Memory allocated at sql_string.cc:75 was overrun, discovered at 'sql_string.cc:75'
Error: Memory allocated at sql_string.cc:75 was overrun, discovered at 'sql_string.cc:75'
[8 Dec 2005 15:47] MySQL Verification Team
TEST                            RESULT
-------------------------------------------------------
sp-vars                        [ pass ]   
-------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
Slave shutdown finished
All 1 tests were successful.
WARNING: Got errors/warnings while running tests. Please examine
/home/miguel/dbs/mysql-5.0/mysql-test/var/log/warnings for details.

miguel@hegel:~/dbs/mysql-5.0/mysql-test> 
miguel@hegel:~/dbs/mysql-5.0/mysql-test> cat var/log/warnings 
Error: Memory allocated at sql_string.cc:75 was overrun, discovered at 'sql_string.cc:75'
Error: Memory allocated at sql_string.cc:75 was overrun, discovered at 'sql_string.cc:75'
Error: Memory allocated at sql_string.cc:75 was overrun, discovered at 'sql_string.cc:75'
[19 Jan 2006 22:35] Konstantin Osipov
Approved by email with minor comments.
[20 Jan 2006 13:03] Alexander Nozdrin
Pushed into 5.0-tree, currently tagged 5.0.18.
[20 Jan 2006 17:20] Alexander Nozdrin
A mistake in the previous post: currently tagged 5.0.19.
[2 Feb 2006 4:59] Mike Hillyer
Has this been merged into 5.1 yet so that a changelog entry can be added for 5.1?
[3 Feb 2006 9:14] Alexander Nozdrin
The patch has been copied into 5.1-release so that it will get into 5.1.6.

The patch is still not merged into the main 5.1 tree. It will get there
after resolving 5.0 -> 5.1 merge logjam.
[6 Feb 2006 13:59] Alexander Nozdrin
Merged into 5.1 tree.
[7 Feb 2006 14:00] Alexander Nozdrin
BUG#16620 has been marked as a duplicate of this bug.
[14 Feb 2006 3:03] Paul DuBois
Noted in 5.0.19, 5.1.6 changelogs.

          Improper memory handling for stored routine variables could
          cause memory overruns and binary log corruption. (Bug #15588)