Just took me 2 hours to troubleshoot an issue on my backend.
Cause was that of empty string being equal to space:
SELECT ' ' = '';
-> 1
SELECT STRCMP(' ', '');
-> 0 /* means equal */
Interestingly enough,
SELECT '' REGEXP '[ ]';
-> 0
SELECT '' REGEXP ' ';
-> 0
SELECT ' ' REGEXP ' ';
-> 1
Can I prevent this? Is it a setting?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…