=== modified file 'mysql-test/r/func_regexp.result' --- mysql-test/r/func_regexp.result 2014-02-22 21:51:20 +0000 +++ mysql-test/r/func_regexp.result 2014-03-11 09:04:57 +0000 @@ -145,3 +145,15 @@ EXECUTE stmt1; DEALLOCATE PREPARE stmt1; DROP TABLE t1; End of 5.1 tests +SELECT ' ' REGEXP '[[:blank:]]'; +' ' REGEXP '[[:blank:]]' +1 +SELECT '\t' REGEXP '[[:blank:]]'; +'\t' REGEXP '[[:blank:]]' +0 +SELECT ' ' REGEXP '[[:space:]]'; +' ' REGEXP '[[:space:]]' +1 +SELECT '\t' REGEXP '[[:space:]]'; +'\t' REGEXP '[[:space:]]' +1 === modified file 'mysql-test/t/func_regexp.test' --- mysql-test/t/func_regexp.test 2008-09-05 08:36:02 +0000 +++ mysql-test/t/func_regexp.test 2014-03-11 09:04:57 +0000 @@ -92,3 +92,17 @@ DROP TABLE t1; --echo End of 5.1 tests + +# +# Bug #54805 definitions in regex/my_regex.h conflict with /usr/include/regex.h +# +# This test verifies that '\t' is recognized as space, but not as blank. +# This is *not* according to the POSIX standard, but seems to have been MySQL +# behaviour ever since regular expressions were introduced. +# See: Bug #55427 REGEXP does not recognize '\t' as [:blank:] +# +SELECT ' ' REGEXP '[[:blank:]]'; +SELECT '\t' REGEXP '[[:blank:]]'; + +SELECT ' ' REGEXP '[[:space:]]'; +SELECT '\t' REGEXP '[[:space:]]';