DELIMITER $$

USE `translamexremoto`$$

DROP PROCEDURE IF EXISTS `spSysExecuteSQL`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spSysExecuteSQL`(
        IN `_sql` VARCHAR(16384)
    )
    MODIFIES SQL DATA
BEGIN
 SET @sqlquery:= _sql;
 IF IFNULL(@EZGOB_SYS_VAR_DEBUG_STORED_PROC,0)=1 THEN
   SELECT _SQL;
 END IF; 
 PREPARE `sql_query` FROM @sqlquery;
 EXECUTE `sql_query`;
 DEALLOCATE PREPARE `sql_query`;
END$$

DELIMITER ;