-- source include/have_ujis.inc

#
# Tests with the ujis character set
#
--disable_warnings
drop table if exists t1;
--enable_warnings

set names ujis;

#
# Test problem with LEFT()
#

create table t1 (c text character set ujis);
insert into t1 values (0xa4a2),(0xa4a3);
select hex(left(c,1)) from t1 group by c;
drop table t1;

#
#
#
select locate(0xa2a1,0xa1a2a1a3);
select locate(_ujis 0xa2a1,_ujis 0xa1a2a1a3);
select locate(_ujis 0xa2a1,_ujis 0xa1a2a1a3 collate ujis_bin);
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 ujis_bin);
select locate('HE','hello' collate ujis_bin,2);
select locate('LO','hello' collate ujis_bin,2);
select locate(_ujis 0xa1a3,_ujis 0xa1a2a1a3);

select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%');
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%');
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin;
select 'a' like 'a';
select 'A' like 'a';
select 'A' like 'a' collate ujis_bin;
