Simon Fromme filename-safe conversion of database-/tablenames
Aug 09, 2016; 18:13
filename-safe conversion of database-/tablenames
In order to do MySQL-dumps to a file on a Linux system under
I need to convert both the names of databases and tables in a filename-safe way (escaping "/" and other characters as in ). The mapping of MySQL database/table name to the according filenames should preferably be the same that MySQL (or the particular DB engine) uses. If that's not possible the mapping should at least be injective and preferably be human readable.
I found out that MySQL is using the C-function tablename_to_filename(...)  internally but didn't find a way in which it exposes this conversion function to the outside.
Did I overlook some way this could be done? If not, would this be a feature that a future version of MySQL should provide?