# # Tests with the utf8mb4 character set # --disable_warnings drop table if exists t1,t2; --enable_warnings --echo # --echo # Start of 5.5 tests --echo # set names utf8mb4; select left(_utf8mb4 0xD0B0D0B1D0B2,1); select right(_utf8mb4 0xD0B0D0B2D0B2,1); select locate('he','hello'); select locate('he','hello',2); select locate('lo','hello',2); select locate('HE','hello'); select locate('HE','hello',2); select locate('LO','hello',2); select locate('HE','hello' collate utf8mb4_bin); select locate('HE','hello' collate utf8mb4_bin,2); select locate('LO','hello' collate utf8mb4_bin,2); select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2); select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2); select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2); select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin); select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin); select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1); select 'a' like 'a'; select 'A' like 'a'; select 'A' like 'a' collate utf8mb4_bin; select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%'); # Bug #6040: can't retrieve records with umlaut # characters in case insensitive manner. # Case insensitive search LIKE comparison # was broken for multibyte characters: select convert(_latin1'Günter André' using utf8mb4) like CONVERT(_latin1'GÜNTER%' USING utf8mb4); select CONVERT(_koi8r'×