File: func_weight_string.result

package info (click to toggle)
percona-xtrabackup 2.2.3-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 293,260 kB
  • ctags: 146,881
  • sloc: cpp: 1,051,960; ansic: 570,217; java: 54,595; perl: 53,495; pascal: 44,194; sh: 27,826; yacc: 15,314; python: 12,142; xml: 7,848; sql: 4,125; makefile: 1,459; awk: 785; lex: 758
file content (91 lines) | stat: -rw-r--r-- 3,521 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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=MyISAM 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=MyISAM 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