config root man

Current Path : /compat/linux/proc/self/root/home/usr.opt/mysql57/mysql-test/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/home/usr.opt/mysql57/mysql-test/r/func_weight_string.result

drop table if exists t1;
set names latin1;
select hex(weight_string(0x010203));
hex(weight_string(0x010203))
010203
select hex(weight_string('aa' as char(3)));
hex(weight_string('aa' as char(3)))
414120
select hex(weight_string('a' as char(-1)));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1)))' at line 1
select hex(weight_string('a' as char(0)));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0)))' at line 1
select hex(weight_string('a' as char(1)));
hex(weight_string('a' as char(1)))
41
select hex(weight_string('ab' as char(1)));
hex(weight_string('ab' as char(1)))
41
select hex(weight_string('ab'));
hex(weight_string('ab'))
4142
select hex(weight_string('aa' as binary(3)));
hex(weight_string('aa' as binary(3)))
616100
select hex(weight_string(cast('aa' as binary(3))));
hex(weight_string(cast('aa' as binary(3))))
616100
select hex(weight_string('ab' level 1-1 ASC));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC))' at line 1
select hex(weight_string('ab' level 1-1 DESC));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC))' at line 1
select hex(weight_string('ab' level 1-1 REVERSE));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REVERSE))' at line 1
select hex(weight_string('ab' level 1 ASC));
hex(weight_string('ab' level 1 ASC))
4142
select hex(weight_string('ab' level 1 DESC));
hex(weight_string('ab' level 1 DESC))
BEBD
select hex(weight_string('ab' level 1 REVERSE));
hex(weight_string('ab' level 1 REVERSE))
4241
select hex(weight_string('ab' level 1 DESC REVERSE));
hex(weight_string('ab' level 1 DESC REVERSE))
BDBE
create table t1 select weight_string('test') as w;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `w` varbinary(4) DEFAULT NULL
) ENGINE=ENGINE DEFAULT CHARSET=latin1
drop table t1;
create table t1 select weight_string(repeat('t',66000)) as w;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `w` longblob
) ENGINE=ENGINE DEFAULT CHARSET=latin1
drop table t1;
select weight_string(NULL);
weight_string(NULL)
NULL
select 1 as weight_string, 2 as reverse;
weight_string	reverse
1	2
select coercibility(weight_string('test'));
coercibility(weight_string('test'))
4
select coercibility(weight_string('test' collate latin1_swedish_ci));
coercibility(weight_string('test' collate latin1_swedish_ci))
0
create table t1 (s1 varchar(5));
insert into t1 values ('a'),(null);
select hex(weight_string(s1)) from t1 order by s1;
hex(weight_string(s1))
NULL
41
drop table t1;
#
# BUG#11898467 - SERVER CRASHES ON SELECT HEX(WEIGHT_STRING(STR AS [CHAR|BINARY](N))) IF N IS BIG 
#
SELECT HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000)));
HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000)))
NULL
Warnings:
Warning	1301	Result of weight_string() was larger than max_allowed_packet (4194304) - truncated
SELECT HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000)));
HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000)))
NULL
Warnings:
Warning	1301	Result of weight_string() was larger than max_allowed_packet (4194304) - truncated
#
# BUG#21974321: WEIGHT_STRING RESULT IS WRONG IF USED IN A
#               VIEW (AS CHAR CLAUSE IS LOST)
#
SET NAMES utf8;
SET collation_connection=utf16_unicode_ci;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin2 COLLATE latin2_czech_cs);
INSERT INTO t1 VALUES ('abcd');
INSERT INTO t1 VALUES ('dcba');
CREATE VIEW v1 AS SELECT WEIGHT_STRING(_latin1 'ab') AS b;
CREATE VIEW v2 AS SELECT WEIGHT_STRING(a LEVEL 1) AS b FROM t1;
CREATE VIEW v3 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1) AS b FROM t1;
CREATE VIEW v4 AS SELECT WEIGHT_STRING(a AS CHAR(6) LEVEL 2) AS b FROM t1;
CREATE VIEW v5 AS SELECT WEIGHT_STRING(a AS BINARY(2)) AS b FROM t1;
CREATE VIEW v6 AS SELECT WEIGHT_STRING(a AS BINARY(6)) AS b FROM t1;
CREATE VIEW v7 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1 ASC) AS b FROM t1;
CREATE VIEW v8 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1 DESC) AS b FROM t1;
CREATE VIEW v9 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1,3 REVERSE) AS b FROM t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select weight_string(_latin1'ab' level 1) AS `b`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v2;
View	Create View	character_set_client	collation_connection
v2	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select weight_string(`t1`.`a` level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v3;
View	Create View	character_set_client	collation_connection
v3	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select weight_string(`t1`.`a` as char(2) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v4;
View	Create View	character_set_client	collation_connection
v4	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select weight_string(`t1`.`a` as char(6) level 2) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v5;
View	Create View	character_set_client	collation_connection
v5	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v5` AS select weight_string(cast(`t1`.`a` as char(2) charset binary) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v6;
View	Create View	character_set_client	collation_connection
v6	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v6` AS select weight_string(cast(`t1`.`a` as char(6) charset binary) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v7;
View	Create View	character_set_client	collation_connection
v7	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v7` AS select weight_string(`t1`.`a` as char(2) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v8;
View	Create View	character_set_client	collation_connection
v8	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v8` AS select weight_string(`t1`.`a` as char(2) level 1 desc) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v9;
View	Create View	character_set_client	collation_connection
v9	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v9` AS select weight_string(`t1`.`a` as char(2) level 1,3 reverse) AS `b` from `t1`	utf8	utf16_unicode_ci
DROP VIEW v1;
DROP VIEW v2;
DROP VIEW v3;
DROP VIEW v4;
DROP VIEW v5;
DROP VIEW v6;
DROP VIEW v7;
DROP VIEW v8;
DROP VIEW v9;
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10));
INSERT INTO t1 VALUES ('abcd');
INSERT INTO t1 VALUES ('dcba');
CREATE VIEW v1 AS SELECT WEIGHT_STRING(_latin1 'ab') AS b;
CREATE VIEW v2 AS SELECT WEIGHT_STRING(a) AS b FROM t1;
CREATE VIEW v3 AS SELECT WEIGHT_STRING(a AS CHAR(2)) AS b FROM t1;
CREATE VIEW v4 AS SELECT WEIGHT_STRING(a AS CHAR(6)) AS b FROM t1;
CREATE VIEW v5 AS SELECT WEIGHT_STRING(a AS BINARY(2)) AS b FROM t1;
CREATE VIEW v6 AS SELECT WEIGHT_STRING(a AS BINARY(6)) AS b FROM t1;
CREATE VIEW v7 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1 ASC) AS b FROM t1;
CREATE VIEW v8 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1 DESC) AS b FROM t1;
CREATE VIEW v9 AS SELECT WEIGHT_STRING(a AS CHAR(2) LEVEL 1 REVERSE) AS b FROM t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select weight_string(_latin1'ab' level 1) AS `b`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v2;
View	Create View	character_set_client	collation_connection
v2	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select weight_string(`t1`.`a` level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v3;
View	Create View	character_set_client	collation_connection
v3	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select weight_string(`t1`.`a` as char(2) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v4;
View	Create View	character_set_client	collation_connection
v4	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select weight_string(`t1`.`a` as char(6) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v5;
View	Create View	character_set_client	collation_connection
v5	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v5` AS select weight_string(cast(`t1`.`a` as char(2) charset binary) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v6;
View	Create View	character_set_client	collation_connection
v6	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v6` AS select weight_string(cast(`t1`.`a` as char(6) charset binary) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v7;
View	Create View	character_set_client	collation_connection
v7	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v7` AS select weight_string(`t1`.`a` as char(2) level 1) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v8;
View	Create View	character_set_client	collation_connection
v8	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v8` AS select weight_string(`t1`.`a` as char(2) level 1 desc) AS `b` from `t1`	utf8	utf16_unicode_ci
SHOW CREATE VIEW v9;
View	Create View	character_set_client	collation_connection
v9	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v9` AS select weight_string(`t1`.`a` as char(2) level 1 reverse) AS `b` from `t1`	utf8	utf16_unicode_ci
SELECT HEX(b) FROM v1;
HEX(b)
4142
SELECT HEX(WEIGHT_STRING(_latin1 'ab'));
HEX(WEIGHT_STRING(_latin1 'ab'))
4142
SELECT HEX(b) FROM v2;
HEX(b)
41424344
44434241
SELECT HEX(WEIGHT_STRING(a LEVEL 1)) FROM t1;
HEX(WEIGHT_STRING(a LEVEL 1))
41424344
44434241
SELECT HEX(b) FROM v3;
HEX(b)
4142
4443
SELECT HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1)) FROM t1;
HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1))
4142
4443
SELECT HEX(b) FROM v4;
HEX(b)
414243442020
444342412020
SELECT HEX(WEIGHT_STRING(a AS CHAR(6) LEVEL 2)) FROM t1;
HEX(WEIGHT_STRING(a AS CHAR(6) LEVEL 2))
414243442020
444342412020
SELECT HEX(b) FROM v5;
HEX(b)
6162
6463
Warnings:
Warning	1292	Truncated incorrect BINARY(2) value: 'abcd'
Warning	1292	Truncated incorrect BINARY(2) value: 'dcba'
SELECT HEX(WEIGHT_STRING(a AS BINARY(2))) FROM t1;
HEX(WEIGHT_STRING(a AS BINARY(2)))
6162
6463
Warnings:
Warning	1292	Truncated incorrect BINARY(2) value: 'abcd'
Warning	1292	Truncated incorrect BINARY(2) value: 'dcba'
SELECT HEX(b) FROM v6;
HEX(b)
616263640000
646362610000
SELECT HEX(WEIGHT_STRING(a AS BINARY(6))) FROM t1;
HEX(WEIGHT_STRING(a AS BINARY(6)))
616263640000
646362610000
SELECT HEX(b) FROM v7;
HEX(b)
4142
4443
SELECT HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1 ASC)) FROM t1;
HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1 ASC))
4142
4443
SELECT HEX(b) FROM v8;
HEX(b)
BEBD
BBBC
SELECT HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1 DESC)) FROM t1;
HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1 DESC))
BEBD
BBBC
SELECT HEX(b) FROM v9;
HEX(b)
4241
4344
SELECT HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1 REVERSE)) FROM t1;
HEX(WEIGHT_STRING(a AS CHAR(2) LEVEL 1 REVERSE))
4241
4344
DROP VIEW v1;
DROP VIEW v2;
DROP VIEW v3;
DROP VIEW v4;
DROP VIEW v5;
DROP VIEW v6;
DROP VIEW v7;
DROP VIEW v8;
DROP VIEW v9;
DROP TABLE t1;

Man Man