Index: /trunk/Ohana/src/tools/src/fits_to_mysql.c
===================================================================
--- /trunk/Ohana/src/tools/src/fits_to_mysql.c	(revision 38996)
+++ /trunk/Ohana/src/tools/src/fits_to_mysql.c	(revision 38997)
@@ -52,4 +52,5 @@
 char        *DATABASE_NAME;
 char        *TABLENAME;
+char        *TABLEPREFIX;
 
 int args (int *argc, char **argv);
@@ -193,4 +194,5 @@
   FREE (DATABASE_NAME);
   FREE (TABLENAME);
+  FREE (TABLEPREFIX);
 
   ohana_memdump (TRUE);
@@ -308,5 +310,14 @@
   InitIOBuffer (&buffer, 1024);
 
-  char *tablename = TABLENAME ? strcreate (TABLENAME) : strcreate (extname);
+  char *tablename = NULL;
+  if (TABLEPREFIX) {
+    if (TABLENAME) {
+      strextend (&tablename, "%s%s", TABLEPREFIX, TABLENAME);
+    } else {
+      strextend (&tablename, "%s%s", TABLEPREFIX, extname);
+    }
+  } else {
+    tablename = TABLENAME ? strcreate (TABLENAME) : strcreate (extname);
+  }
   replace_dot_with_underscore (tablename);
 
@@ -702,4 +713,11 @@
   }
 
+  TABLEPREFIX = NULL;
+  if ((N = get_argument (*argc, argv, "-tableprefix"))) {
+    remove_argument (N, argc, argv);
+    TABLEPREFIX = strcreate (argv[N]);
+    remove_argument (N, argc, argv);
+  }
+
   return TRUE;
 }
