Bug #15091 | Sp Returns Unknown error in order clause....and there is no order by clause | ||
---|---|---|---|
Submitted: | 21 Nov 2005 7:38 | Modified: | 2 Feb 2006 18:20 |
Reporter: | Barak Mery | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | MySQL 5.0.13-rc-nt | OS: | Windows (Windows Xp) |
Assigned to: | Per-Erik Martin | CPU Architecture: | Any |
[21 Nov 2005 7:38]
Barak Mery
[21 Nov 2005 17:37]
Valeriy Kravchuk
Thank you for a problem report. Let me check your procedure... UNION cause implicit sorting, by the way.
[21 Nov 2005 18:14]
Barak Mery
whether i have a problem or not in my sp, there should be other error message.
[25 Nov 2005 14:23]
Valeriy Kravchuk
The problem in your procedure is in the following lines: SET SelectStr = CONCAT(SelectStr,' AND ', c.OperatorId, 'IN (', ConditionStr, ')'); You have to change them to: SET SelectStr = CONCAT(SelectStr,' AND c.OperatorId IN (', ConditionStr, ')'); and it will work. But you are right, the error message we get (verified on 5.0.15-nt and 5.0.17-BK, ChangeSet@1.1991, 2005-11-22 16:01:04+01:00, on Linux): mysql> CALL string_manipulation('1|2,3,4|11,22,13|10,20,30'); ERROR 1109 (42S02): Unknown table 'c' in order clause is incorrect and misleading, because there is no ORDER clause anywhere in the text.
[31 Jan 2006 15:53]
Per-Erik Martin
This has been fixed, the error message is now the less misleading: ERROR 1109 (42S02): Unknown table 'c' in field list
[31 Jan 2006 16:00]
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/1951
[1 Feb 2006 14:53]
Per-Erik Martin
Pushed to bk 5.0.19
[2 Feb 2006 18:20]
Mike Hillyer
Documented in 5.0.19 changelog: <listitem> <para> Message for error 1109 changed from <literal>Unknown table ... in order clause</literal> to <literal>Unknown table '... in field list</literal>. (Bug #15091) </para> </listitem>