summaryrefslogtreecommitdiff
path: root/sql/discover.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/discover.h')
-rw-r--r--sql/discover.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/sql/discover.h b/sql/discover.h
index a663e44128d..e1508107235 100644
--- a/sql/discover.h
+++ b/sql/discover.h
@@ -18,7 +18,24 @@
#include "my_global.h" /* uchar */
-int readfrm(const char *name, uchar **data, size_t *length);
-int writefrm(const char* name, const uchar* data, size_t len);
+int extension_based_table_discovery(MY_DIR *dirp, const char *ext,
+ handlerton::discovered_list *tl);
+
+#ifdef MYSQL_SERVER
+int readfrm(const char *name, const uchar **data, size_t *length);
+int writefrm(const char *path, const char *db, const char *table,
+ bool tmp_table, const uchar *frmdata, size_t len);
+
+/* a helper to delete an frm file, given a path w/o .frm extension */
+inline void deletefrm(const char *path)
+{
+ char frm_name[FN_REFLEN];
+ strxmov(frm_name, path, reg_ext, NullS);
+ mysql_file_delete(key_file_frm, frm_name, MYF(0));
+}
+
+int ext_table_discovery_simple(MY_DIR *dirp,
+ handlerton::discovered_list *result);
+#endif
#endif /* DISCOVER_INCLUDED */