I've got Mysql 5.5 I created a storred procedure
CREATE DEFINER=`root`@`%` PROCEDURE `refresh_mobileTemp`()
BEGIN
DROP TABLE IF EXISTS mobileTemp;
CREATE TEMPORARY TABLE mobileTemp AS
(SELECT distinct
...
);
END
running
call refresh_mobileTemp();
The temp table is created.
Than I dropped the temp table and created an Event:
CREATE EVENT `schedulerMobileTemp`
ON SCHEDULE every 10 SECOND
ON COMPLETION PRESERVE ENABLE
DO
CALL refresh_mobileTemp();
every 10 seconds in process list appears a process that create the temp table
but than if I call
select * from mobileTemp
it returns: Error Code: 1146. Table 'mobileTemp' doesn't exist
What I'm missing?
Thanks in advance