~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/varbinary.result

Moved the last of the libdrizzleclient calls into Protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1;
2
 
select 0x41,0x41+0,0x41 | 0x7fffffffffffffff | 0,0xffffffffffffffff | 0 ;
3
 
0x41    0x41+0  0x41 | 0x7fffffffffffffff | 0   0xffffffffffffffff | 0
4
 
A       65      9223372036854775807     18446744073709551615
5
2
select 0x31+1,concat(0x31)+1,-0xf;
6
3
0x31+1  concat(0x31)+1  -0xf
7
4
50      2       -15
8
5
select x'31',X'ffff'+0;
9
6
x'31'   X'ffff'+0
10
7
1       65535
11
 
create table t1 (ID int(8) unsigned zerofill not null auto_increment,UNIQ bigint(21) unsigned zerofill not null,primary key (ID),unique (UNIQ) );
 
8
create table t1 (ID int not null auto_increment,UNIQ bigint not null,primary key (ID),unique (UNIQ) );
12
9
insert into t1 set UNIQ=0x38afba1d73e6a18a;
13
10
insert into t1 set UNIQ=123;
14
11
explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a;
15
12
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
16
 
1       SIMPLE  t1      const   UNIQ    UNIQ    8       const   1       100.00  
 
13
1       SIMPLE  t1      const   UNIQ    UNIQ    8       const   1       100.00  Using index
17
14
Warnings:
18
 
Note    1003    select '00000001' AS `ID`,'004084688022709641610' AS `UNIQ` from `test`.`t1` where 1
 
15
Note    1003    select '1' AS `ID`,'4084688022709641610' AS `UNIQ` from `test`.`t1` where 1
19
16
drop table t1;
20
17
select x'hello';
21
 
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 'x'hello'' at line 1
 
18
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 'x'hello'' at line 1
22
19
select 0xfg;
23
20
ERROR 42S22: Unknown column '0xfg' in 'field list'
24
21
create table t1 select 1 as x, 2 as xx;
27
24
1       2
28
25
drop table t1;
29
26
show create table t1;
30
 
Table   Create Table
31
 
t1      CREATE TABLE `t1` (
32
 
  `a` varbinary(255) DEFAULT NULL,
33
 
  `b` varchar(255) DEFAULT NULL
34
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
35
 
select length(a), length(b) from t1;
36
 
length(a)       length(b)
37
 
255     3
38
 
255     3
39
 
CHECK TABLE t1 FOR UPGRADE;
40
 
Table   Op      Msg_type        Msg_text
41
 
test.t1 check   error   Table upgrade required. Please do "REPAIR TABLE `t1`" to fix it!
42
 
REPAIR TABLE t1;
43
 
Table   Op      Msg_type        Msg_text
44
 
test.t1 repair  status  OK
45
 
show create table t1;
46
 
Table   Create Table
47
 
t1      CREATE TABLE `t1` (
48
 
  `a` varbinary(255) DEFAULT NULL,
49
 
  `b` varchar(255) DEFAULT NULL
50
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
51
 
select length(a), length(b) from t1;
52
 
length(a)       length(b)
53
 
3       3
54
 
3       3
55
 
insert into t1 values("ccc", "ddd");
56
 
select length(a), length(b) from t1;
57
 
length(a)       length(b)
58
 
3       3
59
 
3       3
60
 
3       3
61
 
select hex(a), hex(b) from t1;
62
 
hex(a)  hex(b)
63
 
616161  636363
64
 
626262  646464
65
 
636363  646464
66
 
select concat("'", a, "'"), concat("'", b, "'") from t1;
67
 
concat("'", a, "'")     concat("'", b, "'")
68
 
'aaa'   'ccc'
69
 
'bbb'   'ddd'
70
 
'ccc'   'ddd'
 
27
ERROR 42S02: Table 'test.t1' doesn't exist
71
28
drop table t1;
 
29
ERROR 42S02: Unknown table 't1'
72
30
create table t1(a varbinary(255));
73
31
insert into t1 values("aaa   ");
74
32
select length(a) from t1;
85
43
show create table table_28127_a;
86
44
Table   Create Table
87
45
table_28127_a   CREATE TABLE `table_28127_a` (
88
 
  `0b02` int(11) DEFAULT NULL
89
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
46
  `0b02` int DEFAULT NULL
 
47
) ENGINE=DEFAULT
90
48
create table table_28127_b(0b2 int);
91
49
show create table table_28127_b;
92
50
Table   Create Table
93
51
table_28127_b   CREATE TABLE `table_28127_b` (
94
 
  `0b2` int(11) DEFAULT NULL
95
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
52
  `0b2` int DEFAULT NULL
 
53
) ENGINE=DEFAULT
96
54
drop table table_28127_a;
97
55
drop table table_28127_b;