← Back to team overview

maria-developers team mailing list archive

Re: c0b1148: MDEV-9659 : AWS KMS encryption plugin

 

Hi, Wlad!

Just a couple of comments:

On Mar 11, wlad@xxxxxxxxxxx wrote:

> +  # Relax AWS C++ SDK unreasonably high requirements for CMake version. Use replace utility (from MariaDB build)
> +  # to patch their CMakeLists.txt

Nice solution. But you might need to add a dependency, to ensure that
this external project target is built after replace. Unless cmake can,
somehow, derive it automatically (you can test it by building just this
specific target in a clean tree).

> +  MY_DIR *dirp = my_dir(".", MYF(0));
> +  if (!dirp)
> +  {
> +    sql_print_error("Can't scan current directory");
> +    DBUG_RETURN(-1);
> +  }
> +  for (unsigned int i=0; i < dirp->number_of_files; i++)
> +  {
> +
> +    KEY_INFO info;
> +    if (extract_id_and_version(dirp->dir_entry[i].name, &info.key_id, &info.key_version) == 0)
> +    {
> +      key_info_cache[KEY_ID_AND_VERSION(info.key_id, info.key_version)]= info;
> +      latest_version_cache[info.key_id]= max(info.key_version, latest_version_cache[info.key_id]);
> +    }
> +  }
> +  DBUG_RETURN(0);

my_dir() uses malloc(), don't forget my_dirend() to free the memory.

Regards,
Sergei


Follow ups