Procedure:
1234567891011
DELIMITER $CREATE procedure `eval`(IN sqlParam longtext)BEGIN SET @sql = sqlParam; PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;END$DELIMITER ;
Example use:
1
CALL eval('SELECT 1 FROM dual');