OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Problem creating sp

From: adburne (adburneasocmedrosario.com.ar)
Date: Mon Jan 12 2004 - 11:22:19 CST


I'll be trying to work with sp on win32/5.0.0-alpha-max-debug; I take the
mysql's page example to test but makes an error:

mysql> delimeter |
    -> create function hello (s char(20)) returns char(50)
    -> return concat('Hello, ',s,'!');
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
deli
meter |
create function hello (s char(20)) returns char(50)
return concat('H' at line 1

Additionally I create the proc table on mysql database:

CREATE TABLE IF NOT EXISTS proc (
  db char(64) binary DEFAULT '' NOT NULL,
  name char(64) binary DEFAULT '' NOT NULL,
  type enum('FUNCTION','PROCEDURE') NOT NULL,
  specific_name char(64) binary DEFAULT '' NOT NULL,
  language enum('SQL') DEFAULT 'SQL' NOT NULL,
  sql_data_access enum('CONTAINS_SQL') DEFAULT 'CONTAINS_SQL' NOT NULL,
  is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL,
  security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,
  param_list blob DEFAULT '' NOT NULL,
  returns char(64) DEFAULT '' NOT NULL,
  body blob DEFAULT '' NOT NULL,
  definer char(77) binary DEFAULT '' NOT NULL,
  created timestamp,
  modified timestamp,
  sql_mode set(
                        'REAL_AS_FLOAT',
                        'PIPES_AS_CONCAT',
                        'ANSI_QUOTES',
                        'IGNORE_SPACE',
                        'NOT_USED',
                        'ONLY_FULL_GROUP_BY',
                        'NO_UNSIGNED_SUBTRACTION',
                        'NO_DIR_IN_CREATE',
                        'POSTGRESQL',
                        'ORACLE',
                        'MSSQL',
                        'DB2',
                        'MAXDB',
                        'NO_KEY_OPTIONS',
                        'NO_TABLE_OPTIONS',
                        'NO_FIELD_OPTIONS',
                        'MYSQL323',
                        'MYSQL40',
                        'ANSI',
                        'NO_AUTO_VALUE_ON_ZERO'
                    ) DEFAULT 0 NOT NULL,
  comment char(64) binary DEFAULT '' NOT NULL,
  PRIMARY KEY (db,name,type)
) comment='Stored Procedures';

Any clue? Thanks, Alejandro

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql