I just discovered that attachments can be sent through this newsgroup so I 
have attached a small database with which you should be able to reproduce 
the problem. The one table in it has a field collated RMNOCASE. The 
following query produces these results in three different versions of 
sqlite:

3.5.4 works perfectly
3.6.17 gracefully reports an error - missing RMNOCASE collation
3.6.21 crash

SELECT
  Name COLLATE NOCASE
FROM
  AddressTable
WHERE
  Name LIKE '%_';

3.5.4 carried the COLLATE NOCASE override at the beginning of the SELECT 
through to the comparison in the WHEN. The later ones do not, and they 
'progress' from reporting an error to a crash.

This regression renders queries, on databases having collations unavailable 
to the sqlite in use, that were developed on older versions of sqlite 
problematic when run from newer versions.

Regards,
Tom

"D. Richard Hipp" <d...@hwaci.com> wrote in 
message news:41371dfd-279f-429d-9186-476efb63e...@hwaci.com...
>I am unable to reproduce this problem.  Using the script below, with
> RMNOCASE changed to just NOCASE, everything works fine on the SQLite
> command-line shell on the website on Linux.  I also tried various
> other versions of SQLite with the same result.
>
>
> On Jan 21, 2010, at 8:00 AM, Hub Dog wrote:
>
>> I hava a table. The table schema is
>>
>> CREATE TABLE AddressTable
>> (
>>  AddressID INTEGER PRIMARY KEY ,
>>  AddressType INTEGER ,
>>  Name TEXT COLLATE RMNOCASE ,
>>  Street1 TEXT ,
>>  Street2 TEXT ,
>>  City TEXT ,
>>  State TEXT ,
>>  Zip TEXT ,
>>  Country TEXT ,
>>  Phone1 TEXT ,
>>  Phone2 TEXT ,
>>  Fax TEXT ,
>>  Email TEXT ,
>>  URL TEXT ,
>>  Latitude INTEGER ,
>>  Longitude INTEGER ,
>>  Note BLOB
>> ) ;.
>>
>> if I execute following sql to query data , the sqlite 3.6.22 command
>> line
>> downloaded from www.sqlite.org will crash.
>>
>> SELECT
>>  Adr.Name COLLATE NOCASE AS AddressName
>> FROM
>>  AddressTable AS Adr
>> WHERE
>>  Adr.Name LIKE '%_'.
>>
>> if I change the Adr.Name to AddressName  , the sql execute result is
>> ok.
>>
>> SELECT
>>  Adr.Name COLLATE NOCASE AS AddressName
>> FROM
>>  AddressTable AS Adr
>> WHERE
>>  AddressName LIKE '%_' ;
>>
>> it seems the crash was related with the collate RMNOCASE of
>> AddressTable
>> table's field Name.
>> in default sqlite command line, there is no rmnocase collation. so I
>> mapped
>> it to the default  nocase collation.
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 


begin 666 Address.db3
M4U%,:71E(&9O<FUA=" S``0``0$`0" @`````0````````````````````$`
M```!```````````````!````````````````````````````````````````
m``````````````t````...@``k@`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
m`````````````````````````...@d4!!q<E)0&$371A8FQE061D<F5S<U1A
M8FQE061D<F5S<U1A8FQE`D-214%412!404),12!!9&1R97-S5&%B;&4...@*$%d
M9')E<W-)1"!)3E1%1T52(%!224u!...@2t59+"!!9&1R97-S5'EP92!)3E1%
M1T52+"!.86UE(%1%...@0t],3$%412!234Y/0t%3...@4w1r965t,2!415A4
M+"!3=')E970R(%1%6%0L($-I='d...@5$585"p...@4w1a=&4...@5$585"p...@6fep(%1%
M6%0L($-O=6YT<g...@5$585"p...@4&AO;F4Q(%1%6%0L(%!H;VYE,B!415A4+"!&
M87@@5$585"p...@16ua:6...@5$585"p...@55),(%1%6%0L($QA=&ET=61E($E.5$5'
M15(L($QO;F=I='5D92!)3E1%1T52+"!.;W1E($),3T(@*04````"`_8`````
M!0/[`_8!! ``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
m`````````````````````````````...@2p%$p`!*2l`'1$A`"D``````0&!
m...@!2=71h($TN(%-T:71E<S<P,3,@5V]R<VAA;2!$<E=H:71T:65R0T$Y,#8P
M,BTQ.38R*#4V,b...@-cds+3$u-30``%)U=&@@3...@1w)O=F5S+"!*86UE<R F
M($5L;6$G<R R;f...@9&%U9VAT97(N(%!R;V)A8FQE(&%D9'(@9G)O;2 T,3$N
M8V]M(#,P($]C=" R,# Y#0H-"H$S!!,``3$E`!\1(0`i`````...@40`3f]r
M;6%N(% N($1I8VME<V]N-# T-R!!;'1O(%-T3V-E86YS:61E0T$Y,C U-BTT
M-C Q*#<V,"d...@-s4x+3$w-#0``$uo=&AE<B!.86YC>2!!+B H1W)O=F5S*2!S
M:&%R97,@<V%M92!A9&1R("8@<&AO;F4N(%!R;V)A8FQE(&%D9')E<W,@9G)O
M;2 T,3$N8V]M(#,P($]C=" R,# y...@3,#$P`!,24`'Q$A`"D``````0&!1 !.
M;W)m...@4"x...@1&EC:V5S;VXT,#0W($%L=&\...@4w1/8V5A;G-I9&5#03DR,#4V
M+30V,#$H-S8P*2 w...@m,3<T- ``36]T:&5R($YA;F-Y($$N("A'<F]V97,I
M('-H87)E<R!S86UE(&%D9'(@)B!P:&]n...@4')O8F%B;&4...@861d<F5S<R!F
M<F]M(#0Q,2YC;VT@,S @3V-T(#(P,#EU`A(``3$M`!D1(1,```````...@!!
M;F=E;&$...@2bx@1&EC:V5S;VXQ,#...@p.2!/9f9l...@079e1&]W;F5Y0T$Y,#(T
M,2TS,34R55-!``!0<F]B86)L92!A9&1R97-S(&9R;v...@-#$q+f-o;2 S,"!/
M8W0@,C p...@!$@`!*RD`'1$A`"D``#4``0$``$IA;65S($<N($=R;W9E<S(U
m...@0f]r:7,@079E0V]M;65R8V5#03DP,#0P+3(S,#0H,S(S*2 W,C$M-S(R
M,6IA;65S+6=R;W9E<P````0-`````P4-````!0$$``.6`Q\":0&S`00`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````($L!1,``2DK`!T1(0`i`````...@3h`4g5t:"!-+B!3
M=&ET97,W,#$S(%=O<g-h...@1')7:&ET=&EE<D-!.3 V,#(M,3DV,b...@u-c(I
M(#8Y,RTQ-34T``!2=71H($TN($=R;W9E<r...@2f%m97,@)B!%;&UA)W,@,FYD
M(&1A=6=H=&5R+B!0<F]B86)L92!A9&1R(&9R;v...@-#$q+f-o;2 S,"!/8W0@
M,C P.0T*#0J!,P03``$Q)0`?$2$`*0`````!`8%$`$YO<FUA;B!0+B!$:6-K
M97-O;C0P-#<@06QT;R!3=$]C96%N<VED94-!.3(P-38M-#8P,2...@w-c I(#<U
M."TQ-S0T``!-;W1H97(@3f%n...@02x@*$=R;W9E<RD@<VAA<F5S('-A;64@
M861D<B F('!H;VYE+B!0<F]B86)L92!A9&1R97-S(&9R;v...@-#$q+f-o;2 S
M,"!/8W0@,C P.8$S`Q,``3$E`!\1(0`i`````...@40`3f]r;6%N(% N($1I
M8VME<V]N-# T-R!!;'1O(%-T3V-E86YS:61E0T$Y,C U-BTT-C Q*#<V,"D@
M-S4X+3$W-#0``$UO=&AE<B!.86YC>2!!+B H1W)O=F5S*2!S:&%R97,@<V%M
M92!A9&1R("8@<&AO;F4N(%!R;V)A8FQE(&%D9')E<W,@9G)O;2 T,3$N8V]M
M(#,P($]C=" R,# Y=0(2``$Q+0`9$2$3```````!`5X`06YG96QA($HN($1I
M8VME<V]N,3 X,#...@3v9f;&5Y($%V941O=VYE>4-!.3 R-#$M,S$U,E5300``
M4')O8F%B;&4...@861d<F5S<R!F<F]M(#0Q,2YC;VT@,S @3V-T(#(P,#EH`1(`
M`2LI`!T1(0`I```U``$!``!*86UE<R!'+B!'<F]V97,R-38Y($)O<FES($%V
M94-O;6UE<F-E0T$Y,# T,"TR,S T*#,R,r...@-s(Q+3<R,C%J86UE<RUG<F]V
M97- 871T+FYE= ``#0`...@`2 `"\0*?`CL!XP%(`/<`...@!(````````````
M````````````````````````````````````````````````````5 T2``$W
M/0`=$1<3```````!`0``4w5s...@36%r>2!.3U)-24Y'5$]...@r($UU9&1Y
M($-R965K($9O<FMS(%)D06ER=FEL;&5003$W,S R55-!``!7#!(``3LG`!\3
M`!DE``````$!``!-87)G87)E='1A($AU='1O;B!787-O;C$P,s...@4&%P:6YE
M875,;VYG=65U:6Q1=65#86YA9&$T-3 M-C<W+3,s-sd``$...@`!+1tq&1,;
M`````````0$``$QI<v...@06yn92!(3TQ$14Y!<'0N(#<Q-C8P-2!0<F]U9&9O
M;w...@3&%N94QO;F1O;D]N=$XV2" T4S(``($8"A(``2LM`!D1&P`I```W``$!
M< !*86UE<R!"+B!(;VQD96XQ,#4P(%-I;6-O92!3="!.3W-H87=A3TY,,4<@
M-%<u*#dp...@-3<Y+38R,35J86UE<V)H0'!O<F-H;&EG:'0N8V$``$]F9FEC
M92!A9&1R97-S+B!(;VUE(&%D9')E<W,@<V%M92!A<R!H:7,@;6]T:&5R)W,N
m...@d2``$w*p`9$1l`*0`````!`0``37)S+B!$;VYA;&0...@5rx@2&]L9&5N.#4S
M(%=E<W1D86QE(%-T3W-H87=A3TY,,4...@-4,r*#dp...@-s(S+3,S-S8``&((
m...@`!(R4`&Q$;`"4``$$``0$``%0n...@2&]L9&5n...@2&5N<g...@4w0n0v]b
M;W5R9T].2SE!(#-8.#DP-2TS-S(M,#(P-FAO;&1E;E]F86UI;'E <WEM<&%T
M:6-O+F-A``!0!Q(``2DM`!D1&P`I``````$!``!*;VAN($PN($AO;&1E;C4T
M,2!/86MW;V]D($%V92Y/<VAA=V%/3DPQ1R R4C$H.3 U*2 W,c...@m,3(W. ``
M@@P&$P`!*RL`)1$;`"4``%]1`0&!9 !)<v%b...@2&5N;FEG97(T.#<@2'5N
M=&5R(%-T(%=0971E<F)O<F]U9VA/3DLY2" R33DW,#4M-S0U+3,P,#%)<V%B
m...@2&5N;FEG97(@/&DN:&5N;FEG97) <WEM<&%T:6-O+F-A/FAT=' Z+R]W
M=W<N:&5N;FEN9V5R9V5N96%L;V=Y+F-O;2\``%-E8V]N9"!C;W5S:6XL(&1E
M<V-E;F1E9"!F<F]M($IA;65S($AO;&1E;B F($]R:6QL82!&:71C:&5T="X@
M161I=&EN9R!H97(@;6]T:&5R)W,@*$YO<F%H($AO;&1E;b...@8feo9w)A<&AY
m...@t````%`lp``zx#ap,Z`Q8"S ``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````2!(2
M``%)&Q49```5```````!`0`!26YS=&ET=71I;VX@;v...@0vev:6...@16yg:6YE
M97)S3&]N9&]N+%4N2RY,;VYD;VY5+DLN```B$1(``2<```````````````$!
M``%4:&]M87,@2&]L9&5N``!+$!(``3TK*P````````````$!``%.;W)T:"!"
m...@4'5B;&EC($QI8G)A<GE7;W)T:&EN9W1O;B!3="Y.;W)T:"!"87DL($]N
M="X``"4/$...@`!+0```````````````0$``41i86aa;f...@36-#;VYK97D``% .
m...@`!-qdk&Q$7$P```````0$``$1O;FYA($ie...@0dq5345.1d5,1$%P="X@
C,C4R-2!7+B!7:6QL971T85!H;V5N:7a...@u,# S55-!````
`
end


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to