List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 7 2005 6:48pm
Subject:Re: Stored function problems (Was: UDF failure)
View as plain text  
At 11:41 -0700 7/7/05, Nic Stevens wrote:
>  Hi,
>Still having difficulty with stored functions. I downloaded and installed
>MySQL 5.0.7 and
>I *still* cannot get stored functions to work.
>I used the example for hello from section 19.2.1 of the online documentation
>for MySQL and the example code doesnt work for me either.
>Below are the versions from, respectively, the MySQL cli, the MySQL server
>and my Linux and following that is a transcript from the mysql cli trying to
>create the hello function.
>mysql Ver 14.11 Distrib 5.0.7-beta, for pc-linux-gnu (i686) using readline
>mysqld Ver 5.0.7-beta-standard for pc-linux-gnu on i686 (MySQL Community
>Edition - Standard (GPL)
>Linux colinux 2.6.10-co-0.6.2 #5 Sat Feb 5 10:19:16 IST 2005 i686 i686 i386
>Welcome to the MySQL monitor. Commands end with ; or \g.
>Your MySQL connection id is 30 to server version: 5.0.7-beta-standard
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>mysql> DELIMITER //
>mysql> CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50)
>-> RETURN CONCAT('Hello, ',s,'!');
>-> //

The example in the manual has the "delimiter ;" line following the //
line, not preceding it.

>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
>that corresponds to your MySQL server version for the right syntax to use
>near 'RETURN CONCAT('Hello, ',s,'!');
>DELIMITER' at line 2
>Nic Stevens - nic.stevens@stripped

Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
Stored function problems (Was: UDF failure)Nic Stevens7 Jul
  • Re: Stored function problems (Was: UDF failure)Paul DuBois7 Jul
  • Re: Stored function problems (Was: UDF failure)Peter Brawley7 Jul