| Bug #12849 | Stored Procedure: Crash on procedure call with CHAR type 'INOUT' parameter | ||
|---|---|---|---|
| Submitted: | 29 Aug 2005 17:07 | Modified: | 8 Sep 2005 19:54 | 
| Reporter: | Shuichi Tamagawa | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) | 
| Version: | 5.0.13-bk Aug 25 | OS: | Linux (SuSE linux 9.2) | 
| Assigned to: | Petr Chardin | CPU Architecture: | Any | 
   [29 Aug 2005 17:07]
   Shuichi Tamagawa        
  
 
   [29 Aug 2005 17:09]
   Shuichi Tamagawa        
  Error Log
Attachment: linux.err (application/octet-stream, text), 2.54 KiB.
   [29 Aug 2005 17:09]
   Shuichi Tamagawa        
  Stack trace output
Attachment: stacktrace.result (application/octet-stream, text), 61 bytes.
   [29 Aug 2005 17:09]
   Shuichi Tamagawa        
  mysqlbug
Attachment: mysqlbug (application/octet-stream, text), 10.98 KiB.
   [29 Aug 2005 17:10]
   Shuichi Tamagawa        
  Error log, output from stack trace, and mysqlbug file are attached.
   [29 Aug 2005 18:51]
   MySQL Verification Team        
  I was able to repeat with latest BK source: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1132559280 (LWP 17684)] 0x081cf61b in String::numchars (this=0x8e3b670) at sql_string.cc:547 547 return str_charset->cset->numchars(str_charset, Ptr, Ptr+str_length); (gdb)
   [2 Sep 2005 13:33]
   Matthias Leich        
  I have some other testcases which bring me to the 
following conclusions:
1. The INOUT parameter is not needed. I could be replaced by
    a variable declared within the procedure.
2. This variable must be of data type VARCHAR.
    Note: the data type INTEGER is harmless
3. Any statement, where this VARCHAR variable is source of data and 
   target of assignment seems to produce wrong variable content.
   Example: SET foo = foo;
                  or 
                  SELECT CONCAT(foo,'abc') INTO foo;
4. It looks like Bug#12939 suffers from the same problem.
Please have a look into the attached file ml004.test with testcases.
 
   [2 Sep 2005 13:35]
   Matthias Leich        
  testcases
Attachment: ml004.test (application/test, text), 3.33 KiB.
   [8 Sep 2005 16:25]
   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/internals/29511
   [8 Sep 2005 17:33]
   Petr Chardin        
  pushed into 5.0.13
   [8 Sep 2005 19:54]
   Paul DuBois        
  Noted in 5.0.13 changelog.

