DELIMITER \\
DROP PROCEDURE IF EXISTS dataset_exists_by_key\\
CREATE PROCEDURE dataset_exists_by_key(in i_key char(32))
BEGIN

    select 
        if(count(*) > 0, 1, 0) key_found 
    from
        dataset
    where
        access_key = i_key;

END\\
DELIMITER ;