Bug #21025 misleading error message when creating functions named 'x', or 'y'
Submitted: 13 Jul 2006 7:30 Modified: 14 Dec 2006 5:34
Reporter: Eric MaLossi
Status: Closed
Category:Server: SP Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux (Fedora core 5)
Assigned to: Marc Alff Target Version:

[13 Jul 2006 7:30] Eric MaLossi
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 11: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 18: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 21:25] Marc Alff
Pushed to mysql-5.1-runtime
[30 Nov 2006 2:36] Konstantin Osipov
Pushed into 5.1.13
[14 Dec 2006 5: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.