1
drop table if exists t1;
2
select hex(weight_string(0x010203));
3
hex(weight_string(0x010203))
5
select hex(weight_string('aa' as char(3)));
6
hex(weight_string('aa' as char(3)))
8
select hex(weight_string('a' as char(-1)));
9
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
10
select hex(weight_string('a' as char(0)));
11
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
12
select hex(weight_string('a' as char(1)));
13
hex(weight_string('a' as char(1)))
15
select hex(weight_string('ab' as char(1)));
16
hex(weight_string('ab' as char(1)))
18
select hex(weight_string('ab'));
19
hex(weight_string('ab'))
21
select hex(weight_string('aa' as binary(3)));
22
hex(weight_string('aa' as binary(3)))
24
select hex(weight_string(cast('aa' as binary(3))));
25
hex(weight_string(cast('aa' as binary(3))))
27
select hex(weight_string('ab' level 1-1 ASC));
28
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
29
select hex(weight_string('ab' level 1-1 DESC));
30
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
31
select hex(weight_string('ab' level 1-1 REVERSE));
32
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
33
select hex(weight_string('ab' level 1 ASC));
34
hex(weight_string('ab' level 1 ASC))
36
select hex(weight_string('ab' level 1 DESC));
37
hex(weight_string('ab' level 1 DESC))
39
select hex(weight_string('ab' level 1 REVERSE));
40
hex(weight_string('ab' level 1 REVERSE))
42
select hex(weight_string('ab' level 1 DESC REVERSE));
43
hex(weight_string('ab' level 1 DESC REVERSE))
45
create table t1 select weight_string('test') as w;
48
t1 CREATE TABLE `t1` (
52
create table t1 select weight_string(repeat('t',66000)) as w;
55
t1 CREATE TABLE `t1` (
59
select weight_string(NULL);
62
select 1 as weight_string, 2 as reverse;
65
select coercibility(weight_string('test'));
66
coercibility(weight_string('test'))
68
create table t1 (s1 varchar(5));
69
insert into t1 values ('a'),(null);
70
select hex(weight_string(s1)) from t1 order by s1;
71
hex(weight_string(s1))