Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-09-16 Thread Paweł Hajdan , Jr .
If you have some time for that, I'd appreciate patching at least fts2. This will make it possible for Chromium to drop another custom patch for SQLite. On Wed, Aug 18, 2010 at 13:49, Richard Hipp wrote: > I'm thinking that you shouldn't be using FTS1 and FTS2 in the first

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-18 Thread Scott Hess
I'm not sure Chromium has any fts1 databases, I think the original patch was applied there for completeness. The change from fts2 to fts3 has been made in the history system, but it only applies to new data, and hasn't yet rolled out to stable. So we wouldn't be able to even start to cease using

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-18 Thread Richard Hipp
I'm thinking that you shouldn't be using FTS1 and FTS2 in the first place. They are untested and unsupported. We'll get around to patching them, if you insist, but right now we are busy trying to 3.7.1 out the door. On Wed, Aug 18, 2010 at 4:41 PM, Paweł Hajdan, Jr.

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-18 Thread Paweł Hajdan , Jr .
On Tue, Aug 10, 2010 at 13:16, Paweł Hajdan, Jr. wrote: > Now, how about fts1 and fts2? The original chromium patch is at > http://codereview.chromium.org/174387 . Could you take a look and suggest > a way to upstream those fixes to SQLite? > Ping about the above. Or

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-10 Thread Paweł Hajdan , Jr .
Thank you, I have backported it to chromium as http://src.chromium.org/viewvc/chrome?view=rev=55504 Now, how about fts1 and fts2? The original chromium patch is at http://codereview.chromium.org/174387 . Could you take a look and suggest a way to upstream those fixes to SQLite? On Fri, Aug 6,

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-06 Thread Scott Hess
Yes. Pawel is wondering if he could patch fts1 and fts2. I don't think Chromium cares about fts1 (our version was patched for completeness), but I believe there are still places where fts2 is present because older databases might be using it. -scott On Fri, Aug 6, 2010 at 12:10 PM, Richard

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-06 Thread Nicolas Williams
On Fri, Aug 06, 2010 at 02:11:33PM -0400, Richard Hipp wrote: > If "ch" is an unsigned char then how is the following unsafe: > > ch = (ch<0x80) ? tolower(ch) : ch > > And why does it need to be changed to > > ch = (ch>='A' && ch<='Z') ? ch - 'A' + 'a' : ch; > > There is only one such

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-06 Thread Richard Hipp
FTS3 updated here: http://www.sqlite.org/src/ci/b8b465ed2c On Fri, Aug 6, 2010 at 2:24 PM, Scott Hess wrote: > This bug comment describes the problem: > http://code.google.com/p/chromium/issues/detail?id=15261#c20 > > excerpt: > > Apparently the problem is caused by

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-06 Thread Scott Hess
This bug comment describes the problem: http://code.google.com/p/chromium/issues/detail?id=15261#c20 excerpt: > Apparently the problem is caused by tolower(), whose behavior is affected by > current > locale. Under locale tr_TR.UTF-8, tolower('I') returns 'I' rather than 'i', > because >

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-06 Thread Richard Hipp
If "ch" is an unsigned char then how is the following unsafe: ch = (ch<0x80) ? tolower(ch) : ch And why does it need to be changed to ch = (ch>='A' && ch<='Z') ? ch - 'A' + 'a' : ch; There is only one such instance of code remaining in FTS3 (at fts3_tokenizer1.c:196) but I want to

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-06 Thread Paweł Hajdan , Jr .
On Wed, Aug 4, 2010 at 15:23, Paweł Hajdan, Jr. wrote: > I'm attaching a suggested patch to fix locale-unsafe usage of tolower in > FTS code. The goal is to make Chromium closer to the upstream, so if you > have a better solution, that's great. Oh, I have just noticed

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-04 Thread Paweł Hajdan , Jr .
On Wed, Aug 4, 2010 at 16:30, Scott Hess wrote: > You should probably pull the current SQLite code and make sure the > patch even applies, and if not, check to make sure that the problem > hasn't already been fixed. ext/fts3 should no longer have the flaw in > question, as

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-04 Thread Scott Hess
Pawel, You should probably pull the current SQLite code and make sure the patch even applies, and if not, check to make sure that the problem hasn't already been fixed. ext/fts3 should no longer have the flaw in question, as that code was heavily rewritten. Chromium's SQLite was last synced

[sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-04 Thread Paweł Hajdan , Jr .
I'm attaching a suggested patch to fix locale-unsafe usage of tolower in FTS code. The goal is to make Chromium closer to the upstream, so if you have a better solution, that's great. This is upstreaming a Chromium patch