| Bug #16211 | Stored function return type for strings is ignored | ||
|---|---|---|---|
| Submitted: | 5 Jan 2006 6:25 | Modified: | 15 Aug 2006 12:46 |
| Reporter: | R T | ||
| Status: | Closed | ||
| Category: | Server: SP | Severity: | S2 (Serious) |
| Version: | 5.0.20 | OS: | Microsoft Windows (Windows XP SP2/Linux) |
| Assigned to: | Alexander Nozdrin | Target Version: | |
[5 Jan 2006 6:25]
R T
[5 Jan 2006 16:53]
Miguel Solorzano
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.19-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> delimiter //
mysql> create function GetCustomerName (customer_id INT) returns varchar(100) charset
-> latin1
-> begin
-> return 'John Smith';
-> end
-> //
Query OK, 0 rows affected (0.02 sec)
mysql> delimiter ;
mysql> select charset(GetCustomerName(1));
+-----------------------------+
| charset(GetCustomerName(1)) |
+-----------------------------+
| binary |
+-----------------------------+
1 row in set (0.01 sec)
[12 Apr 2006 18:00]
Shane Bester
In a recent bk version on windows 2000:
Your MySQL connection id is 1 to server version: 5.0.21
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> delimiter //
mysql> create function GetCustomerName (customer_id INT) returns varchar(100) charset
-> latin1
-> begin
-> return 'John Smith';
-> end//
Query OK, 0 rows affected (0.11 sec)
mysql> delimiter ;
mysql> select charset(GetCustomerName(1));
+-----------------------------+
| charset(GetCustomerName(1)) |
+-----------------------------+
| latin1 |
+-----------------------------+
1 row in set (0.00 sec)
mysql>
[13 Apr 2006 10:39]
Valeriy Kravchuk
In 5.0.20 return type is not always binary - it is the default charset for server. So, in stored functions clauses like: ... returns varchar(100) character set utf8 are still ignored! I had changed the synopsis accordingly.
[22 Jun 2006 17:09]
Alexander Nozdrin
BUG#16330 has been marked as a duplicate of this bug.
[28 Jun 2006 14:43]
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/8408
[30 Jun 2006 15:02]
Konstantin Osipov
Approved with several important notes sent over email.
[18 Jul 2006 18:38]
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/9286
[24 Jul 2006 13:44]
Alexander Nozdrin
A new patch: http://lists.mysql.com/commits/9488
[26 Jul 2006 21:59]
Konstantin Osipov
Approved by email with a few minor comments.
[27 Jul 2006 16:01]
Alexander Nozdrin
The final patch: http://lists.mysql.com/commits/9665
[2 Aug 2006 17:50]
Konstantin Osipov
Pushed into 5.0.25
[14 Aug 2006 22:45]
Konstantin Osipov
Merged into 5.1.12
[15 Aug 2006 12:46]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.
If necessary, you can access the source repository and build the latest available
version, including the bug fix. More information about accessing the source trees is
available at
http://dev.mysql.com/doc/en/installing-source.html
Documented bugfix in 5.0.25 and 5.1.12 changelogs
