On Wed, 2007-11-28 at 21:28 +0800, Halton Huo wrote:
> Hi Jamie,
>
> As title, when I have such file, the result for t-s-t and t-s (with
> option -d) will be shorten.
>
> Test case
> ===========
> Suppose my watch dir is set to $HOME/Documents/test/symbols, and have
> bunch of test case in that.
>
> $cd /export/home/halton/Documents/test/symbols
> $ls
> 1`2.txt 1=2.txt 1,2.txt 1?2.txt 1)2.txt 1}2.txt 1\2.txt 1+2.txt
> 1^2.txt 1>2.txt 1;2.txt 1'2.txt 1[2.txt [EMAIL PROTECTED] 1&2.txt
> 1~2.txt 1_2.txt 1:2.txt 1"2.txt 1]2.txt 1$2.txt 1#2.txt
> 1<2.txt 1-2.txt 1!2.txt 1(2.txt 1{2.txt 1*2.txt 1%2.txt
> $tracker-search -s Text -d 1
> /export/home/halton/Documents/test/symbols/1+2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1%2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1#2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1&2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1\2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1*2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1$2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/[EMAIL PROTECTED] : Text,
> text/plain,
> /export/home/halton/Documents/test/symbols/1}2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1{2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1]2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1[2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1)2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1(2.txt : Text, text/plain,
> /export/home/halton/Documents/test/symbols/1"2.txt : Text, text/plain,
>
> My analysing
> ============
> After debugging, found file 1'2.txt is save as in file-meta.db
> 3384|8|/export/home/halton/Documents/test/symbols|1''2.txt|1|text/plain|
> 0|5||||||||||||||1|1|0|0|0|-1|1196235455|0|0|
>
> The saving will cause line 3246 in tracker-db-sqlite.c fail
>
> g_file_test (res[0][0], G_FILE_TEST_EXISTS)
>
> So problem is sqlite saving one sigle quote as two sigle quote in the
> database.
>
> Is it a know sqlite issue? Or a bug for tracker?
I believe Laurent added a call to escape params passed to sqlite in line
4463 in tracker-db-sqlite.c - this no doubts escapes the single quote.
Im not sure we need that call (Laurent?) as the params are passed to a
prepared query so should not need escaping?
jamie
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list