~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/oqgraph/r/basic.result

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists graph;
 
2
Warnings:
 
3
Note    1051    Unknown table 'graph'
 
4
CREATE TABLE graph (
 
5
latch   SMALLINT  UNSIGNED NULL,
 
6
origid  BIGINT    UNSIGNED NULL,
 
7
destid  BIGINT    UNSIGNED NULL,
 
8
weight  DOUBLE    NULL,
 
9
seq     BIGINT    UNSIGNED NULL,
 
10
linkid  BIGINT    UNSIGNED NULL,
 
11
KEY (latch, origid, destid) USING HASH,
 
12
KEY (latch, destid, origid) USING HASH
 
13
) ENGINE=OQGRAPH;
 
14
delete from graph;
 
15
insert into graph(origid, destid) values (1,2), (2,1);
 
16
insert into graph(origid, destid) values (1,3), (3,1);
 
17
insert into graph(origid, destid) values (3,4), (4,3);
 
18
insert into graph(origid, destid) values (3,5), (5,3);
 
19
insert into graph(origid, destid) values (5,6), (6,5);
 
20
select * from graph where latch = 2 and origid = 1 and weight = 1;
 
21
latch   origid  destid  weight  seq     linkid
 
22
2       1       NULL    1       3       3
 
23
2       1       NULL    1       2       2
 
24
select * from graph where latch = 2 and origid = 1 and weight = 2;
 
25
latch   origid  destid  weight  seq     linkid
 
26
2       1       NULL    2       5       5
 
27
2       1       NULL    2       4       4
 
28
select * from graph 
 
29
where latch = 2 and origid = 1 and (weight = 1 or weight = 2);
 
30
latch   origid  destid  weight  seq     linkid
 
31
2       1       NULL    2       5       5
 
32
2       1       NULL    2       4       4
 
33
2       1       NULL    1       3       3
 
34
2       1       NULL    1       2       2
 
35
select * from graph where latch=1 and origid=1 and destid=6;
 
36
latch   origid  destid  weight  seq     linkid
 
37
1       1       6       NULL    0       1
 
38
1       1       6       1       1       3
 
39
1       1       6       1       2       5
 
40
1       1       6       1       3       6
 
41
select * from graph where latch=1 and origid=1 and destid=4;
 
42
latch   origid  destid  weight  seq     linkid
 
43
1       1       4       NULL    0       1
 
44
1       1       4       1       1       3
 
45
1       1       4       1       2       4
 
46
select * from graph where latch=1 and origid=4 and destid=1;
 
47
latch   origid  destid  weight  seq     linkid
 
48
1       4       1       NULL    0       4
 
49
1       4       1       1       1       3
 
50
1       4       1       1       2       1
 
51
insert into graph (origid,destid) values (4,6);
 
52
delete from graph where origid=5;
 
53
delete from graph where origid=3 and destid=5;
 
54
select * from graph where latch=1 and origid=1 and destid=6;
 
55
latch   origid  destid  weight  seq     linkid
 
56
1       1       6       NULL    0       1
 
57
1       1       6       1       1       3
 
58
1       1       6       1       2       4
 
59
1       1       6       1       3       6
 
60
select * from graph where latch=1 and origid=6 and destid=1;
 
61
latch   origid  destid  weight  seq     linkid
 
62
truncate table graph;
 
63
drop table graph;