DELIMITER \\
DROP PROCEDURE IF EXISTS dataset_create\\
CREATE PROCEDURE dataset_create(in i_data_format int, in i_name varchar(50), in i_description text, in i_append_replace int)
BEGIN

    DECLARE l_dataset_access_key char(32);

    call dataset_get_new_key(l_dataset_access_key);

    insert into
        dataset
    values
        (l_dataset_access_key, i_name, i_description, i_data_format, i_append_replace);

    select l_dataset_access_key as dataset_access_key;

END\\
DELIMITER ;
