~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_weight_string.result

  • Committer: Brian Aker
  • Date: 2010-02-11 22:56:25 UTC
  • Revision ID: brian@gaz-20100211225625-63v3e79p78blva2u
Remove WEIGHT_STRING() from parser (where it does not belong). If someone
wants to they can reimplement this as a straight function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drop table if exists t1;
2
 
select hex(weight_string(0x010203));
3
 
hex(weight_string(0x010203))
4
 
010203
5
 
select hex(weight_string('aa' as char(3)));
6
 
hex(weight_string('aa' as char(3)))
7
 
004100410020
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 Drizzle 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 Drizzle 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)))
14
 
0041
15
 
select hex(weight_string('ab' as char(1)));
16
 
hex(weight_string('ab' as char(1)))
17
 
0041
18
 
select hex(weight_string('ab'));
19
 
hex(weight_string('ab'))
20
 
00410042
21
 
select hex(weight_string('aa' as binary(3)));
22
 
hex(weight_string('aa' as binary(3)))
23
 
616100
24
 
select hex(weight_string(cast('aa' as binary(3))));
25
 
hex(weight_string(cast('aa' as binary(3))))
26
 
616100
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 Drizzle 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 Drizzle 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 Drizzle 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))
35
 
00410042
36
 
select hex(weight_string('ab' level 1 DESC));
37
 
hex(weight_string('ab' level 1 DESC))
38
 
FFBEFFBD
39
 
select hex(weight_string('ab' level 1 REVERSE));
40
 
hex(weight_string('ab' level 1 REVERSE))
41
 
42004100
42
 
select hex(weight_string('ab' level 1 DESC REVERSE));
43
 
hex(weight_string('ab' level 1 DESC REVERSE))
44
 
BDFFBEFF
45
 
create table t1 select weight_string('test') as w;
46
 
show create table t1;
47
 
Table   Create Table
48
 
t1      CREATE TABLE `t1` (
49
 
  `w` varbinary(64) DEFAULT NULL
50
 
) ENGINE=DEFAULT
51
 
drop table t1;
52
 
create table t1 select weight_string(repeat('t',66000)) as w;
53
 
show create table t1;
54
 
Table   Create Table
55
 
t1      CREATE TABLE `t1` (
56
 
  `w` blob
57
 
) ENGINE=DEFAULT
58
 
drop table t1;
59
 
select weight_string(NULL);
60
 
weight_string(NULL)
61
 
NULL
62
 
select 1 as weight_string, 2 as reverse;
63
 
weight_string   reverse
64
 
1       2
65
 
select coercibility(weight_string('test'));
66
 
coercibility(weight_string('test'))
67
 
4
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))
72
 
NULL
73
 
0041
74
 
drop table t1;