List:General Discussion« Previous MessageNext Message »
From:Steve Staples Date:February 17 2010 2:07pm
Subject:Stored Procedure/Function Question
View as plain text  
Hi there,

I have a WEIRD question, that I can't find an answer too...

Here is my stored function:
DELIMITER $$

USE `mydatabase`$$

DROP FUNCTION IF EXISTS `SPLIT_STR`$$

CREATE DEFINER=`thisuser`@`%` FUNCTION `SPLIT_STR`(
  X VARCHAR(255),
  delim VARCHAR(12),
  pos INT
) RETURNS VARCHAR(255) CHARSET latin1
    DETERMINISTIC
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(X, delim, pos),
       LENGTH(SUBSTRING_INDEX(X, delim, pos -1)) + 1),
       delim, '')$$

DELIMITER ;

Basically, as it sits, only the user 'thisuser' at any location can use this
function, but I want to be able to allow ALL the users of this database
access to it, as well, if I were to change this function, i have to go in,
and manage every user that would be attached to it, to allow to use it
again.

I've tried '%'@'%', and I get the error that this user does not exist.

Any help?  Is it possible?

Steve.

Thread
Stored Procedure/Function QuestionSteve Staples17 Feb