[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.140.185.250: ~ $
--source include/have_ujis.inc
--source include/have_innodb.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
--enable_warnings

#
# Test Prepares Statement with Japanese character in ujis encoding
#

SET NAMES ujis;
SET character_set_database = ujis;

### Test InnoDB ###
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = InnoDB;
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = InnoDB;
CREATE TABLE t3(
 `��`  char(1),
 `��` char(1),
 `���` char(1)
)DEFAULT CHARSET = ujis ENGINE = InnoDB;
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE = InnoDB;

INSERT INTO t1 VALUES ('xxx');
INSERT INTO t2 VALUES ('�������');
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
INSERT INTO t4 VALUES ('��'),('��'),('���');

# Japanese parameter for column name
# the parameter for stmt is not interpreted as column name
PREPARE stmt1 FROM 'SELECT ? FROM t3';
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
# Japanese parameter for function argument
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
# Japanese parameter for UPDATE
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';

## Test jisx0201 ##
SET @arg = '��';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

## Test jisx0208 ##
SET @arg = '��';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

# Test jisx0212 ##
SET @arg = '���';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

DEALLOCATE PREPARE stmt1;
DEALLOCATE PREPARE stmt2;
DEALLOCATE PREPARE stmt3;
DEALLOCATE PREPARE stmt4;
DEALLOCATE PREPARE stmt5;
DEALLOCATE PREPARE stmt6;
DEALLOCATE PREPARE stmt7;
DEALLOCATE PREPARE stmt8;
DEALLOCATE PREPARE stmt9;
DEALLOCATE PREPARE stmt10;
DEALLOCATE PREPARE stmt11;
DEALLOCATE PREPARE stmt12;
DEALLOCATE PREPARE stmt13;
DEALLOCATE PREPARE stmt14;

DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;

### Test MyISAM ###
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = MyISAM;
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = MyISAM;
CREATE TABLE t3(
 `��` char(1),
 `��` char(1),
 `���` char(1)
)DEFAULT CHARSET = ujis ENGINE = MyISAM;
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE = MyISAM;

INSERT INTO t1 VALUES ('xxx');
INSERT INTO t2 VALUES ('�������');
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
INSERT INTO t4 VALUES ('��'),('��'),('���' );

# Japanese parameter for column name
PREPARE stmt1 FROM 'SELECT ? FROM t3';
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
# Japanese parameter for function argument
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
# Japanese parameter for UPDATE
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';

## Test jisx0201 ##
SET @arg = '��';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

## Test jisx0208 ##
SET @arg = '��';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

## Test jisx0212 ##
SET @arg = '���';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

DEALLOCATE PREPARE stmt1;
DEALLOCATE PREPARE stmt2;
DEALLOCATE PREPARE stmt3;
DEALLOCATE PREPARE stmt4;
DEALLOCATE PREPARE stmt5;
DEALLOCATE PREPARE stmt6;
DEALLOCATE PREPARE stmt7;
DEALLOCATE PREPARE stmt8;
DEALLOCATE PREPARE stmt9;
DEALLOCATE PREPARE stmt10;
DEALLOCATE PREPARE stmt11;
DEALLOCATE PREPARE stmt12;
DEALLOCATE PREPARE stmt13;
DEALLOCATE PREPARE stmt14;

DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;

### Test MEMORY ###
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = MEMORY;
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = MEMORY;
CREATE TABLE t3(
 `��` char(1),
 `��` char(1),
 `���` char(1)
)DEFAULT CHARSET = ujis ENGINE = MEMORY;
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE =MEMORY;

INSERT INTO t1 VALUES ('xxx');
INSERT INTO t2 VALUES ('�������');
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
INSERT INTO t4 VALUES ('��'),('��'),('���' );

# Japanese parameter for column name
PREPARE stmt1 FROM 'SELECT ? FROM t3';
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
# Japanese parameter for function argument
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
# Japanese parameter for UPDATE
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';

## Test jisx0201 ##
SET @arg = '��';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

## Test jisx0208 ##
SET @arg = '��';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

## Test jisx0212 ##
SET @arg = '���';
EXECUTE stmt1 USING @arg;
EXECUTE stmt2 USING @arg;
EXECUTE stmt3 USING @arg;
EXECUTE stmt4 USING @arg;
EXECUTE stmt5 USING @arg;
EXECUTE stmt6 USING @arg;
EXECUTE stmt7 USING @arg;
EXECUTE stmt8 USING @arg;
EXECUTE stmt9 USING @arg;
EXECUTE stmt10 USING @arg;
EXECUTE stmt11 USING @arg;
EXECUTE stmt12 USING @arg;
EXECUTE stmt13 USING @arg;
SELECT * FROM t4;
EXECUTE stmt14 USING @arg;
SELECT * FROM t4;

DEALLOCATE PREPARE stmt1;
DEALLOCATE PREPARE stmt2;
DEALLOCATE PREPARE stmt3;
DEALLOCATE PREPARE stmt4;
DEALLOCATE PREPARE stmt5;
DEALLOCATE PREPARE stmt6;
DEALLOCATE PREPARE stmt7;
DEALLOCATE PREPARE stmt8;
DEALLOCATE PREPARE stmt9;
DEALLOCATE PREPARE stmt10;
DEALLOCATE PREPARE stmt11;
DEALLOCATE PREPARE stmt12;
DEALLOCATE PREPARE stmt13;
DEALLOCATE PREPARE stmt14;

DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;

Filemanager

Name Type Size Permission Actions
disabled.def File 404 B 0644
jp_alter_sjis.test File 10.37 KB 0644
jp_alter_ucs2.test File 11.33 KB 0644
jp_alter_ujis.test File 11.28 KB 0644
jp_alter_utf8.test File 12.21 KB 0644
jp_charlength_sjis.test File 2.65 KB 0644
jp_charlength_ucs2.test File 2.76 KB 0644
jp_charlength_ujis.test File 2.71 KB 0644
jp_charlength_utf8.test File 2.96 KB 0644
jp_charset_sjis.test File 4.95 KB 0644
jp_charset_ucs2.test File 7.27 KB 0644
jp_charset_ujis.test File 4.97 KB 0644
jp_charset_utf8.test File 5.23 KB 0644
jp_convert_sjis.test File 3.89 KB 0644
jp_convert_ucs2.test File 6.42 KB 0644
jp_convert_ujis.test File 4.08 KB 0644
jp_convert_utf8.test File 4.34 KB 0644
jp_create_db_sjis.test File 597 B 0644
jp_create_db_ucs2.test File 643 B 0644
jp_create_db_ujis.test File 610 B 0644
jp_create_db_utf8.test File 641 B 0644
jp_create_tbl_sjis.test File 8.77 KB 0644
jp_create_tbl_ucs2.test File 9.35 KB 0644
jp_create_tbl_ujis.test File 9.35 KB 0644
jp_create_tbl_utf8.test File 9.89 KB 0644
jp_enum_sjis.test File 3.94 KB 0644
jp_enum_ucs2.test File 3.89 KB 0644
jp_enum_ujis.test File 3.68 KB 0644
jp_enum_utf8.test File 3.94 KB 0644
jp_insert_sjis.test File 11.8 KB 0644
jp_insert_ucs2.test File 12.06 KB 0644
jp_insert_ujis.test File 12.06 KB 0644
jp_insert_utf8.test File 13.32 KB 0644
jp_instr_sjis.test File 3.89 KB 0644
jp_instr_ucs2.test File 3.98 KB 0644
jp_instr_ujis.test File 3.94 KB 0644
jp_instr_utf8.test File 4.32 KB 0644
jp_join_sjis.test File 7.98 KB 0644
jp_join_ucs2.test File 8.01 KB 0644
jp_join_ujis.test File 7.97 KB 0644
jp_join_utf8.test File 8.7 KB 0644
jp_left_sjis.test File 4.49 KB 0644
jp_left_ucs2.test File 4.6 KB 0644
jp_left_ujis.test File 4.55 KB 0644
jp_left_utf8.test File 5.06 KB 0644
jp_length_sjis.test File 2.6 KB 0644
jp_length_ucs2.test File 2.71 KB 0644
jp_length_ujis.test File 2.67 KB 0644
jp_length_utf8.test File 2.91 KB 0644
jp_like_sjis.test File 6.31 KB 0644
jp_like_ucs2.test File 9.45 KB 0644
jp_like_ujis.test File 6.69 KB 0644
jp_like_utf8.test File 7.42 KB 0644
jp_locate_sjis.test File 3.95 KB 0644
jp_locate_ucs2.test File 4.04 KB 0644
jp_locate_ujis.test File 3.99 KB 0644
jp_locate_utf8.test File 4.37 KB 0644
jp_lpad_sjis.test File 2.64 KB 0644
jp_lpad_ucs2.test File 2.76 KB 0644
jp_lpad_ujis.test File 2.71 KB 0644
jp_lpad_utf8.test File 2.96 KB 0644
jp_ltrim_sjis.test File 4.89 KB 0644
jp_ltrim_ucs2.test File 5.11 KB 0644
jp_ltrim_ujis.test File 5.07 KB 0644
jp_ltrim_utf8.test File 5.57 KB 0644
jp_ps_sjis.test File 9.56 KB 0644
jp_ps_ujis.test File 9.56 KB 0644
jp_replace_sjis.test File 3.79 KB 0644
jp_replace_ucs2.test File 3.93 KB 0644
jp_replace_ujis.test File 3.89 KB 0644
jp_replace_utf8.test File 4.27 KB 0644
jp_reverse_sjis.test File 2.17 KB 0644
jp_reverse_ucs2.test File 2.22 KB 0644
jp_reverse_ujis.test File 2.18 KB 0644
jp_reverse_utf8.test File 2.35 KB 0644
jp_right_sjis.test File 4.54 KB 0644
jp_right_ucs2.test File 4.65 KB 0644
jp_right_ujis.test File 4.61 KB 0644
jp_right_utf8.test File 5.12 KB 0644
jp_rpad_sjis.test File 2.64 KB 0644
jp_rpad_ucs2.test File 2.76 KB 0644
jp_rpad_ujis.test File 2.71 KB 0644
jp_rpad_utf8.test File 2.96 KB 0644
jp_rtrim_sjis.test File 4.89 KB 0644
jp_rtrim_ucs2.test File 5.11 KB 0644
jp_rtrim_ujis.test File 5.07 KB 0644
jp_rtrim_utf8.test File 5.57 KB 0644
jp_select_sjis.test File 2.52 KB 0644
jp_select_ucs2.test File 4.77 KB 0644
jp_select_ujis.test File 2.43 KB 0644
jp_select_utf8.test File 2.51 KB 0644
jp_subquery_sjis.test File 5.87 KB 0644
jp_subquery_ucs2.test File 6.19 KB 0644
jp_subquery_ujis.test File 6.15 KB 0644
jp_subquery_utf8.test File 6.46 KB 0644
jp_substring_sjis.test File 15.15 KB 0644
jp_substring_ucs2.test File 15.49 KB 0644
jp_substring_ujis.test File 15.22 KB 0644
jp_substring_utf8.test File 16.89 KB 0644
jp_trim_sjis.test File 288 B 0644
jp_trim_ucs2.test File 7.49 KB 0644
jp_trim_ujis.test File 7.44 KB 0644
jp_trim_utf8.test File 8.29 KB 0644
jp_union_ujis.test File 4.8 KB 0644
jp_update_sjis.test File 2.4 KB 0644
jp_update_ucs2.test File 2.49 KB 0644
jp_update_ujis.test File 2.44 KB 0644
jp_update_utf8.test File 2.66 KB 0644
jp_where_sjis.test File 3.67 KB 0644
jp_where_ucs2.test File 5.42 KB 0644
jp_where_ujis.test File 3.06 KB 0644
jp_where_utf8.test File 3.31 KB 0644