Re: MySQLdb compare lower

Discussion in 'Python' started by Chris Angelico, Dec 14, 2012.

  1. On Fri, Dec 14, 2012 at 2:35 PM, Cameron Simpson <> wrote:
    > On 13Dec2012 18:39, Dennis Lee Bieber <> wrote:
    > | On Thu, 13 Dec 2012 18:00:48 +1100, Cameron Simpson <>
    > | declaimed the following in gmane.comp.python.general:
    > | > On 12Dec2012 02:03, Dennis Lee Bieber <> wrote:
    > | > | According to the old "MySQL Language Reference"
    > | > | """
    > | > | By default, string comparisons are not case sensitive and will use the
    > | > | current character set (ISO-8859-1 Latin1 by default, which also works
    > | > | excellently for English).
    > | > | """
    > | >
    > | > I'm flabbergasted. [... consults the internets ...] It is still the case
    > | > today:-( Ouch.
    > | >
    > | I just checked... The book I referenced was the blue&white published
    > | by the late MySQL AB -- and the book claims to cover up to v5.0.1... I
    > | thought it was just the end of the 4.x branch (like the old brown
    > | O'Reilly/MySQL AB book was middle era of 4.x)
    >
    > My checking was for MySQL 5.5. Still case insensitive.


    Yeah, it's one of the things that tripped me up when I did a
    MySQL->PostgreSQL conversion earlier this year. The code was assuming
    case insensitivity, and began failing on PG. Fortunately the simple
    change of LIKE to ILIKE solved that.

    I'd MUCH rather be explicit about wanting case insensitivity. I wonder
    who would go insane first if I ran an app using Wine under Linux in a
    directory that's mounted via cifs from a Windows or OS/2 box... (And
    yes, I have that setup, ready to go. Only there's an extra level of
    indirection - I'd run it in an sshfs mount that points to my proxy
    box. Extra safety, keeps messy networking away from my real boxes.)

    ChrisA
    Chris Angelico, Dec 14, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anatoli Hristov

    MySQLdb compare lower

    Anatoli Hristov, Dec 11, 2012, in forum: Python
    Replies:
    2
    Views:
    119
    Anatoli Hristov
    Dec 11, 2012
  2. Cameron Simpson

    Re: MySQLdb compare lower

    Cameron Simpson, Dec 11, 2012, in forum: Python
    Replies:
    0
    Views:
    137
    Cameron Simpson
    Dec 11, 2012
  3. Dennis Lee Bieber

    Re: MySQLdb compare lower

    Dennis Lee Bieber, Dec 12, 2012, in forum: Python
    Replies:
    0
    Views:
    132
    Dennis Lee Bieber
    Dec 12, 2012
  4. Cameron Simpson

    Re: MySQLdb compare lower

    Cameron Simpson, Dec 13, 2012, in forum: Python
    Replies:
    0
    Views:
    136
    Cameron Simpson
    Dec 13, 2012
  5. Dennis Lee Bieber

    Re: MySQLdb compare lower

    Dennis Lee Bieber, Dec 13, 2012, in forum: Python
    Replies:
    0
    Views:
    131
    Dennis Lee Bieber
    Dec 13, 2012
Loading...

Share This Page