Mmsg(tmp, "SELECT Job.JobId, JobTDate, File.FileIndex, File.FilenameId, "
"File.PathId, FileId "
"FROM Path JOIN File USING (PathId) JOIN Job USING (JobId) "
- "WHERE Path.Path LIKE '%s' AND File.JobId IN (%s) ",
- tmp2.c_str(), jobids);
+ "WHERE Path.Path LIKE '%s' ESCAPE '%s' AND File.JobId IN (%s) ",
+ tmp2.c_str(), escape_char_value[db->bdb_get_type_index()], jobids);
query.strcat(tmp.c_str());
init = true;
/* SQLite */
"DELETE FROM %s WHERE FileId IN (SELECT FileId FROM %s JOIN File USING (FileId) WHERE PathId IN (%s))"
};
+
+static const char *escape_char_value_default = "\\";
+
+const char *escape_char_value[] = {
+ /* MySQL */
+ "\\\\",
+ /* PostgreSQL */
+ escape_char_value_default,
+ /* SQLite */
+ escape_char_value_default
+};
\ No newline at end of file
extern const char CATS_IMP_EXP *expires_in[];
extern const char CATS_IMP_EXP *prune_cache[];
extern const char CATS_IMP_EXP *strip_restore[];
+extern const char CATS_IMP_EXP *escape_char_value[];