List:General Discussion« Previous MessageNext Message »
From:Remo Tex Date:June 1 2006 10:31am
Subject:Re: name 'Szczech' returns more rows then 'Szczec%'
View as plain text  
Lukasz Budnik wrote:
> Hi All,
> 
> I'm using 5.0.21 on Gentoo.
> 
> I've got very strange problem.
> 
> I have clients table with id_c and name columns.
> 
> I'm running simple selects:
> 
> mysql> select id_c, name, concat('#',name, '@'), length(name) from clients
> where name like 'Szczec%';
> +-------+----------+---------------------------+------------------+
> | id_c  | name     | concat('#',name, '@')     | length(name)     |
> +-------+----------+---------------------------+------------------+
> | 30181 | Szczech  | #Szczech@                 |                7 |
> +-------+----------+---------------------------+------------------+
> 1 row in set (0.00 sec)
> 
> mysql> select id_c, name, concat('#',name, '@'), length(name) from clients
> where name like 'Szczech';
> +-------+----------+---------------------------+------------------+
> | id_c  | name     | concat('#',name, '@')     | length(name)     |
> +-------+----------+---------------------------+------------------+
> | 30181 | Szczech  | #Szczech@                 |                7 |
> | 30693 | Szczech  | #Szczech@                 |                7 |
> +-------+----------+---------------------------+------------------+
> 2 rows in set (0.00 sec)
> 
> ups... what's going on?
> 
> % stands for (m)any character(s) but returned 1 row,
> when % replaced with 'h' the same query returned 2 rows.
> 
> I'm using latin2 charsets but 'h' is standard latin1 character.
> 
> Any ideas?
> 
> thanks in advance for any help
> best regards
> Lukasz Budnik
> 
just a thought...
Can you try OPTIMIZE TABLE... or REPAIR TABLE ... [EXTENDED] first
then try those queries again
HTH
Thread
name 'Szczech' returns more rows then 'Szczec%'Lukasz Budnik31 May
  • Need help querying a database of polynomialsLew E. Lefton31 May
    • Re: Need help querying a database of polynomialsPeter Brawley31 May
      • Re: Need help querying a database of polynomialsPooly31 May
      • Re: Need help querying a database of polynomialsMichael Stassen1 Jun
  • Re: name 'Szczech' returns more rows then 'Szczec%'sheeri kritzer31 May
    • Re: name 'Szczech' returns more rows then 'Szczec%'Lukasz Budnik31 May
      • Re: name 'Szczech' returns more rows then 'Szczec%'Jake Peavy1 Jun
        • Re: name 'Szczech' returns more rows then 'Szczec%'Brendan Bouffler1 Jun
          • Re: name 'Szczech' returns more rows then 'Szczec%'Lukasz Budnik1 Jun
            • Re: name 'Szczech' returns more rows then 'Szczec%'Jake Peavy1 Jun
  • Re: name 'Szczech' returns more rows then 'Szczec%'Remo Tex1 Jun
    • Re: name 'Szczech' returns more rows then 'Szczec%'Lukasz Budnik1 Jun
      • Re: name 'Szczech' returns more rows then 'Szczec%'Remo Tex1 Jun
        • Re: name 'Szczech' returns more rows then 'Szczec%'Lukasz Budnik1 Jun
        • myisamchk (was: name 'Szczech' returns more rows then 'Szczec%')Chris Sansom4 Jun
          • Re: myisamchk (was: name 'Szczech' returns more rows then'Szczec%')Chris Sansom5 Jun
          • Re: myisamchk (was: name 'Szczech' returns more rows then 'Szczec%')gclark5 Jun
            • Re: myisamchk (was: name 'Szczech' returns more rows then 'Szczec%')Chris Sansom8 Jun