This is basically how upstream packaging does it (with some additional restrictions: https://github.com/mysql/mysql-server/blob/5.7/packaging/deb-in/extra/mysql-helpers#L76); if the directory already exists it isn't touched.
There are some restrictions on what the permissions on the secure-file-priv location should be (the server will log a warning if it considers the directory insecure), but the proposed change will just make it more in line with the upstream packaging.
This is basically how upstream packaging does it (with some additional restrictions: https:/ /github. com/mysql/ mysql-server/ blob/5. 7/packaging/ deb-in/ extra/mysql- helpers# L76); if the directory already exists it isn't touched.
There are some restrictions on what the permissions on the secure-file-priv location should be (the server will log a warning if it considers the directory insecure), but the proposed change will just make it more in line with the upstream packaging.
The patch needs an indentation fix, though :)