MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //usr/share/mysql-test/t/ctype_sjis.test
-- source include/have_sjis.inc

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

set names sjis;

select 'a' like 'a';
select 'A' like 'a';
select 'A' like 'a' collate sjis_bin;

set @sjis1= _sjis   0xa1a2a3a4a5a6a7a8a9aaabacadaeaf;
set @sjis2= _sjis 0xb0b1b2b3b4b5b6b7b8b9babbbcbdbebf;
set @sjis3= _sjis 0xc0c1c2c3c4c5c6c7c8c9cacbcccdcecf;
set @sjis4= _sjis 0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf;

set @utf81= CONVERT(@sjis1 USING utf8);
set @utf82= CONVERT(@sjis2 USING utf8);
set @utf83= CONVERT(@sjis3 USING utf8);
set @utf84= CONVERT(@sjis4 USING utf8);

select hex(@utf81);
select hex(@utf82);
select hex(@utf83);
select hex(@utf84);

select hex(CONVERT(@utf81 USING sjis));
select hex(CONVERT(@utf82 USING sjis));
select hex(CONVERT(@utf83 USING sjis));
select hex(CONVERT(@utf84 USING sjis));

#
# Allow to insert extra CP932 characters
# into a SJIS column
#
create table t1 (a char(10) character set sjis);
insert into t1 values (0x878A);
select hex(a) from t1;
drop table t1;

#
# Bug #6206 ENUMs are not case sensitive even if declared BINARY
#
create table t1(c enum(0x9353,0x9373) character set sjis);
show create table t1;
insert into t1 values (0x9353);
insert into t1 values (0x9373);
select hex(c) from t1;
drop table t1;

#
# Bug #6223 Japanese half-width kana characters get truncated
#
SET NAMES sjis;
CREATE TABLE t1 (
 c char(16) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=sjis;
insert into t1 values(0xb1),(0xb2),(0xb3);
select hex(c) from t1;
drop table t1;


SET collation_connection='sjis_japanese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
SET collation_connection='sjis_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc

# Check parsing of string literals in SJIS with multibyte characters that
# have an embedded \ in them. (Bug #8303)

--character_set sjis
SET NAMES sjis;
SELECT HEX('@\') FROM DUAL;

# End of 4.1 tests

--echo # Start of 5.1 tests

--echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
CREATE TABLE t1 (a varchar(16)) character set sjis;
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
DROP TABLE t1;

--echo #
--echo # Bug#11766519 - Bug#59648: MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED.
--echo #
# In the below string backslash (0x5C) is a part of a multi-byte
# character, so it should not be quoted.
SELECT QUOTE('\');


--echo # End of 5.1 tests