Commit d5d49231 authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

LPAD and RPAD test with UCS2 was added.

parent ebbc1dc1
......@@ -13,6 +13,40 @@ hex(word)
0420
2004
DROP TABLE t1;
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'0421');
LPAD(_ucs2 X'0420',10,_ucs2 X'0421')
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
LPAD(_ucs2 X'0420',10,_ucs2 X'04210422')
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423')
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
RPAD(_ucs2 X'0420',10,_ucs2 X'0421')
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
RPAD(_ucs2 X'0420',10,_ucs2 X'04210422')
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423')
CREATE TABLE t1 SELECT
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`l` char(10) character set ucs2 NOT NULL default '',
`r` char(10) character set ucs2 NOT NULL default ''
) TYPE=MyISAM CHARSET=latin1
DROP TABLE t1;
SET NAMES koi8r;
SET character_set_connection=ucs2;
create table t1 (a varchar(10) character set ucs2, key(a));
......
......@@ -29,6 +29,24 @@ INSERT INTO t1 VALUES (X'042000200020'), (X'200400200020');
SELECT hex(word) FROM t1 ORDER BY word;
DROP TABLE t1;
#
# Check LPAD/RPAD
#
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'0421');
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
CREATE TABLE t1 SELECT
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r;
SHOW CREATE TABLE t1;
DROP TABLE t1;
######################################################
#
# Test of like
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment