From: Andre Date: Tue, 2 May 2006 00:26:07 +0000 (+0200) Subject: com_upd: ignore duplicates X-Git-Tag: v0.2.12~17 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=9c0fedbedd284d4c76d785b6243fc2027344242d com_upd: ignore duplicates Previously the update command aborted if files with duplicate basenames were found. Suggested by Gerd Becker. --- diff --git a/README b/README index 8297a970..5073ca55 100644 --- a/README +++ b/README @@ -210,12 +210,6 @@ LICENSE: ~~~~~~~~ Distribution of paraslash is covered by the GNU GPL. See file COPYING. -LIMITATIONS: -~~~~~~~~~~~~ -The mysql selector assumes that the basenames of your audio files are -unique. If this is not the case, don't use this selector, rename your -files, or create your own one. - THE AUTHOR: ~~~~~~~~~~~ Author: Andre Noll diff --git a/README.mysql b/README.mysql index cb657e06..e619a814 100644 --- a/README.mysql +++ b/README.mysql @@ -88,10 +88,12 @@ Fill your database with content para_client upd +Note that the mysql selector assumes that the basenames of your audio +files are unique. If this is not the case, duplicates are ignored. + If this command fails, it most likely means the audio file directory (given in the server configuration file) does not exist, is empty, -not readable, or contains different files with identical basenames. Fix -this problem before proceeding. +or not readable. Fix this problem before proceeding. The command diff --git a/mysql_selector.c b/mysql_selector.c index ff299cdf..8d043f5a 100644 --- a/mysql_selector.c +++ b/mysql_selector.c @@ -2366,7 +2366,7 @@ static int com_upd(int fd, int argc, __a_unused char *argv[]) goto out; if ((ret = real_query("delete from dir")) < 0) goto out; - query = make_message("load data infile '%s' into table dir " + query = make_message("load data infile '%s' ignore into table dir " "fields terminated by '\t' lines terminated by '\n' " "(dir, name)", tempname); ret = real_query(query);