Bug #21025 misleading error message when creating functions named 'x', or 'y'

Submitted: 13 Jul 2006 5:30 Modified: 14 Dec 2006 4:34
Reporter: Erica Moss Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux (Fedora core 5)
Assigned to: Marc ALFF CPU Architecture:Any

[13 Jul 2006 5:30] Erica Moss
Description:
The code below results in the following error.  This problem occurs when you try and create routines named x() or y().

Symptoms include:
* The same problem occurs with stored procedures.
* No other single letter results in this problem.
* If you call the function x (), then the create will succeed, however you then are forced to call the function the same way.  This shouldn't occur because if you create a function a(), and then try to create the function a (), then the error received states that function a already exists, therefore they are synonymous.

Error:
mysqltest: At line 4: query 'create function x() returns int return 1' failed: 1064: You have an error in your SQL syntax;

How to repeat:
DROP DATABASE IF EXISTS fooDB;
CREATE DATABASE fooDB;
use fooDB;
create function x() returns int return 1;
select x();
drop function x;
DROP DATABASE fooDB;
[13 Jul 2006 9:19] Hartmut Holzgraefe
Functions X() and Y() are part of the GIS functions

  http://dev.mysql.com/doc/refman/5.0/en/point-property-functions.html

so it is not possible to redefine them unless you compile
the MySQL server with the "--without-geometry" configure
option.

The error message is absoutely misleading though so i'm
changing the but synopsis.
[6 Nov 2006 17:48] Marc ALFF
For practical reasons, the following bugs are all fixed by the same change set:
- Bug#18239
- Bug#21025
- Bug#22619

Changing to patch pending, the patch is attached in Bug#22619
[15 Nov 2006 20:25] Marc ALFF
Pushed to mysql-5.1-runtime
[30 Nov 2006 1:36] Konstantin Osipov
Pushed into 5.1.13
[14 Dec 2006 4:34] Jon Stephens
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/

Documented fix in 5.1.14 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.062 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.