~drizzle-trunk/drizzle/development

1 by brian
clean slate
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)))
506 by Brian Aker
Added back more tests.
7
004100410020
1 by brian
clean slate
8
select hex(weight_string('a' as char(-1)));
629.2.6 by Monty
Updated test output with new and improved error messages.
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
1 by brian
clean slate
10
select hex(weight_string('a' as char(0)));
629.2.6 by Monty
Updated test output with new and improved error messages.
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
1 by brian
clean slate
12
select hex(weight_string('a' as char(1)));
13
hex(weight_string('a' as char(1)))
506 by Brian Aker
Added back more tests.
14
0041
1 by brian
clean slate
15
select hex(weight_string('ab' as char(1)));
16
hex(weight_string('ab' as char(1)))
506 by Brian Aker
Added back more tests.
17
0041
1 by brian
clean slate
18
select hex(weight_string('ab'));
19
hex(weight_string('ab'))
506 by Brian Aker
Added back more tests.
20
00410042
1 by brian
clean slate
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));
629.2.6 by Monty
Updated test output with new and improved error messages.
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
1 by brian
clean slate
29
select hex(weight_string('ab' level 1-1 DESC));
629.2.6 by Monty
Updated test output with new and improved error messages.
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
1 by brian
clean slate
31
select hex(weight_string('ab' level 1-1 REVERSE));
629.2.6 by Monty
Updated test output with new and improved error messages.
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
1 by brian
clean slate
33
select hex(weight_string('ab' level 1 ASC));
34
hex(weight_string('ab' level 1 ASC))
506 by Brian Aker
Added back more tests.
35
00410042
1 by brian
clean slate
36
select hex(weight_string('ab' level 1 DESC));
37
hex(weight_string('ab' level 1 DESC))
506 by Brian Aker
Added back more tests.
38
FFBEFFBD
1 by brian
clean slate
39
select hex(weight_string('ab' level 1 REVERSE));
40
hex(weight_string('ab' level 1 REVERSE))
506 by Brian Aker
Added back more tests.
41
42004100
1 by brian
clean slate
42
select hex(weight_string('ab' level 1 DESC REVERSE));
43
hex(weight_string('ab' level 1 DESC REVERSE))
506 by Brian Aker
Added back more tests.
44
BDFFBEFF
1 by brian
clean slate
45
create table t1 select weight_string('test') as w;
46
show create table t1;
47
Table	Create Table
506 by Brian Aker
Added back more tests.
48
t1	CREATE TABLE `t1` (
873.2.35 by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements.
49
  `w` varbinary(64) DEFAULT NULL
942.3.1 by Vladimir Kolesnikov
test generalizations
50
) ENGINE=DEFAULT
1 by brian
clean slate
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
506 by Brian Aker
Added back more tests.
55
t1	CREATE TABLE `t1` (
56
  `w` blob
942.3.1 by Vladimir Kolesnikov
test generalizations
57
) ENGINE=DEFAULT
1 by brian
clean slate
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
506 by Brian Aker
Added back more tests.
73
0041
1 by brian
clean slate
74
drop table t1;