Maybe the question was not clear: What makes the difference, based on a character-by-character matching, between the two mail strings provided, as long as both were only [a-z] characters and in the same table (meaning same collation) to explain that some strings fail and some not? Anyone has a clue?
I've found several debates explaining the LIKE and = use in mySql, but not find a fulfilling answer for this issue:
I've found out that searching by whole mailboxes (not truncated, but only complete mailboxes so using no wildcards) using LIKE will not return few of them in my script, but they will match if using = sign instead. (Of course currently function is updated and working properly with equal sign, but I would appreciate if someone could help me bring some light into this).
I can't reproduce the mailboxes per obvious security reasons but, can reproduce the structure of the last one I noticed that fails (each "x" represents a smallcap latin non-special character [a-z]):
select id from table_name where email = "xxx.xxxxxxxxx.xxxxxx@gmail.com"
Returns the id
select id from table_name where email like "xxx.xxxxxxxxx.xxxxxx@gmail.com"
Returns NULL
And this is giving me nuts, because normally it is working fine and, for example, with a structure like this:
select id from table_name where email = "xxxxx.xxxxxxxxx@gmail.com"
Returns the id
select id from table_name where email like "xxxxx.xxxxxxxxx@gmail.com"
Returns the id too
@_@
Maybe there's something wrong with the LIKE matching when there is more than one dot in the mailbox structure? Any other idea?
Thanks in advance for your time fellows.