Mysql Empty set error


I can run an update query from command line and it updates records but if I’m running same query from a procedure it returns empty set. Any idea why? The update query is below.

  1. Create function Age

  2. Update table set column1 = Age(column2)

  3. CREATE DEFINER = ‘root’@‘localhost’ PROCEDURE Age_new()
    COMMENT ‘’
    Update Related Set Age = Age(column2);

  4. call Age_new

Hi, Since I am learning to write procs in MySQL, I checked your code and with just modifications to columns in my test databases the code ran fine [MySQL 5.1.46 - under Vista]. If I ran as another user than root@localhost with minimal rights, i.e. only Execute it also ran fine.

The last weeks learning procs in MySQL, I have been known to forget to drop a procedure and thus been running the old version of procs…with similar - that is - no changes in records, but you’re probably past that…

And I have also forgotten to set back autocommit=1 and had no COMMIT in the procs - many grey hair these last weeks.

Its MYSQL database and its a stored procedure in mysql.

This is not exactly an error. It doesnt update records when calling update command from a procedure.

What language is the procedure, ie php, asp, etc?

What database server are you using, ie MySQL, MsSQL, etc?

What errors if any is the database server returning?

It seems that empty set is just an information message. I didn’t check the data so far. The proc does updates records.