~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/func_weight_string.result

Merged in changes. 
Edited a the comment test case so deal with our version bump.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1;
 
2
set names latin1;
2
3
select hex(weight_string(0x010203));
3
4
hex(weight_string(0x010203))
4
5
010203
5
6
select hex(weight_string('aa' as char(3)));
6
7
hex(weight_string('aa' as char(3)))
7
 
004100410020
 
8
414120
8
9
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 Drizzle server version for the right syntax to use near '-1)))' at line 1
 
10
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
11
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 Drizzle server version for the right syntax to use near '0)))' at line 1
 
12
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
13
select hex(weight_string('a' as char(1)));
13
14
hex(weight_string('a' as char(1)))
14
 
0041
 
15
41
15
16
select hex(weight_string('ab' as char(1)));
16
17
hex(weight_string('ab' as char(1)))
17
 
0041
 
18
41
18
19
select hex(weight_string('ab'));
19
20
hex(weight_string('ab'))
20
 
00410042
 
21
4142
21
22
select hex(weight_string('aa' as binary(3)));
22
23
hex(weight_string('aa' as binary(3)))
23
24
616100
25
26
hex(weight_string(cast('aa' as binary(3))))
26
27
616100
27
28
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 Drizzle server version for the right syntax to use near 'ASC))' at line 1
 
29
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
30
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 Drizzle server version for the right syntax to use near 'DESC))' at line 1
 
31
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
32
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 Drizzle server version for the right syntax to use near 'REVERSE))' at line 1
 
33
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
34
select hex(weight_string('ab' level 1 ASC));
34
35
hex(weight_string('ab' level 1 ASC))
35
 
00410042
 
36
4142
36
37
select hex(weight_string('ab' level 1 DESC));
37
38
hex(weight_string('ab' level 1 DESC))
38
 
FFBEFFBD
 
39
BEBD
39
40
select hex(weight_string('ab' level 1 REVERSE));
40
41
hex(weight_string('ab' level 1 REVERSE))
41
 
42004100
 
42
4241
42
43
select hex(weight_string('ab' level 1 DESC REVERSE));
43
44
hex(weight_string('ab' level 1 DESC REVERSE))
44
 
BDFFBEFF
 
45
BDBE
45
46
create table t1 select weight_string('test') as w;
46
47
show create table t1;
47
48
Table   Create Table
48
 
t1      CREATE TABLE `t1` (
49
 
  `w` varbinary(64) DEFAULT NULL
50
 
) ENGINE=DEFAULT
 
49
t1      CREATE TABLE "t1" (
 
50
  "w" varbinary(4)
 
51
) ENGINE=MyISAM DEFAULT CHARSET=latin1
51
52
drop table t1;
52
53
create table t1 select weight_string(repeat('t',66000)) as w;
53
54
show create table t1;
54
55
Table   Create Table
55
 
t1      CREATE TABLE `t1` (
56
 
  `w` blob
57
 
) ENGINE=DEFAULT
 
56
t1      CREATE TABLE "t1" (
 
57
  "w" longblob
 
58
) ENGINE=MyISAM DEFAULT CHARSET=latin1
58
59
drop table t1;
59
60
select weight_string(NULL);
60
61
weight_string(NULL)
65
66
select coercibility(weight_string('test'));
66
67
coercibility(weight_string('test'))
67
68
4
 
69
select coercibility(weight_string('test' collate latin1_swedish_ci));
 
70
coercibility(weight_string('test' collate latin1_swedish_ci))
 
71
0
68
72
create table t1 (s1 varchar(5));
69
73
insert into t1 values ('a'),(null);
70
74
select hex(weight_string(s1)) from t1 order by s1;
71
75
hex(weight_string(s1))
72
76
NULL
73
 
0041
 
77
41
74
78
drop table t1;