Index: /branches/eam_branches/ipp-20150625/Ohana/src/tools/src/fits_to_mysql.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/tools/src/fits_to_mysql.c	(revision 38975)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/tools/src/fits_to_mysql.c	(revision 38976)
@@ -230,4 +230,8 @@
     gfits_scan (header, field, "%s", 1, format);
 
+    // some special names must be protected:
+    if (!strcasecmp (tlabel, "index")) { strcpy (tlabel, "index_"); }
+    if (!strcasecmp (tlabel, "table")) { strcpy (tlabel, "table_"); }
+
     // check for duplicates
     int Ndup = 0;
@@ -299,4 +303,14 @@
   char *tablename = strcreate (extname);
   replace_dot_with_underscore (tablename);
+
+  // some special names must be protected:
+  if (!strcasecmp (tablename, "index")) {
+    free (tablename);
+    tablename = strcreate ("index_");
+  }
+  if (!strcasecmp (tablename, "table")) {
+    free (tablename);
+    tablename = strcreate ("table_");
+  }
 
   // drop the table if it exists
