~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_weight_string.result

Removing global errbuff and cleaning up two remaining instances that referenced it.

Show diffs side-by-side

added added

removed removed

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