| Bug #25373 | rollup grand total not have NULL for group by field basd on stored function | ||
|---|---|---|---|
| Submitted: | 2 Jan 2007 19:48 | Modified: | 15 Mar 2007 15:32 | 
| Reporter: | Hongliang Qiang | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) | 
| Version: | 5.0.30, 5.1bk | OS: | Linux (linux) | 
| Assigned to: | Evgeny Potemkin | CPU Architecture: | Any | 
| Tags: | GROUP BY, null, stored function, with rollup | ||
   [2 Jan 2007 19:48]
   Hongliang Qiang        
  
 
   [2 Jan 2007 23:36]
   Hartmut Holzgraefe        
  mysqltest test case
Attachment: bug25373.tgz (application/x-gtar, text), 920 bytes.
   [7 Mar 2007 16:13]
   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/21380 ChangeSet@1.2432, 2007-03-07 19:10:16+03:00, evgen@moonbone.local +3 -0 Bug#25373: Stored functions wasn't compared correctly which leads to a wrong result. For built-in functions like sqrt() function names are hard-coded and can be compared by pointer. But this isn't the case for a used-defined stored functions - names there are dynamical and should be compared using the strcmp() function. Now the Item_func::eq() function employs strcmp() function to compare used-defined stored functions names.
   [7 Mar 2007 19:13]
   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/21417 ChangeSet@1.2432, 2007-03-07 22:11:57+03:00, evgen@moonbone.local +3 -0 Bug#25373: Stored functions wasn't compared correctly which leads to a wrong result. For built-in functions like sqrt() function names are hard-coded and can be compared by pointer. But this isn't the case for a used-defined stored functions - names there are dynamical and should be compared as strings. Now the Item_func::eq() function employs my_strcasecmp() function to compare used-defined stored functions names.
   [12 Mar 2007 5:09]
   Igor Babaev        
  Pushed to 5.0.38, 5.1.17
   [15 Mar 2007 15:32]
   Paul DuBois        
  Noted in 5.0.38, 5.1.17 changelogs. Use of a GROUP BY clause that referred to a stored function result together with WITH ROLLUP caused incorrect results.

