summaryrefslogtreecommitdiffstats
path: root/src/test/test5.gold
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test5.gold')
-rw-r--r--src/test/test5.gold387
1 files changed, 387 insertions, 0 deletions
diff --git a/src/test/test5.gold b/src/test/test5.gold
new file mode 100644
index 0000000..c1c4a82
--- /dev/null
+++ b/src/test/test5.gold
@@ -0,0 +1,387 @@
+[
+ {
+ "table_name": "result-0",
+ "query": "select qname as CertainQnames, qtype as Qtype, count(1) as count from dns where (qname='localhost' or qname like '%.root-servers.net') and qr==0 group by CertainQnames,Qtype order by count desc;",
+ "head": [
+ { "name": "CertainQnames","type": "text" },
+ { "name": "Qtype","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select qtype as Qtype, qname as Qname, count(1) as count from dns where qclass==3 and qr==0 group by Qtype,Qname order by count desc;",
+ "head": [
+ { "name": "Qtype","type": "int" },
+ { "name": "Qname","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select rcode as Rcode, if(qr==1,dst_addr,src_addr) as ClientAddr, count(1) as count from dns where qr==1 group by Rcode,ClientAddr order by count,Rcode,ClientAddr desc limit 50;",
+ "head": [
+ { "name": "Rcode","type": "int" },
+ { "name": "ClientAddr","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ [3,"172.18.24.52",1],
+ [0,"172.18.24.52",3]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, if(ether_type==34525,rsplit(src_addr,7,':')||':'||rsplit(src_addr,6,':')||':'||rsplit(src_addr,5,':')||':'||rsplit(src_addr,4,':')||':'||rsplit(src_addr,3,':')||'::',rsplit(src_addr,3)||'.'||rsplit(src_addr,2)||'.'||rsplit(src_addr,1)||'.0') as ClientSubnet, count(1) as count from dns where qr==0 group by All,ClientSubnet order by count,ClientSubnet desc limit 200;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "ClientSubnet","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL","172.18.24.0",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select if(rsplit(qname,1)='de','ok','non-auth-tld') as Class, if(ether_type==34525,rsplit(src_addr,7,':')||':'||rsplit(src_addr,6,':')||':'||rsplit(src_addr,5,':')||':'||rsplit(src_addr,4,':')||':'||rsplit(src_addr,3,':')||'::',rsplit(src_addr,3)||'.'||rsplit(src_addr,2)||'.'||rsplit(src_addr,1)||'.0') as ClientSubnet, count(1) as count from dns where qr==0 group by Class,ClientSubnet order by count,ClientSubnet,Class desc limit 200;",
+ "head": [
+ { "name": "Class","type": "text" },
+ { "name": "ClientSubnet","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["non-auth-tld","172.18.24.0",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select if(qr==1,'sent','recv') as Direction, if(protocol==6,'tcp',if(protocol==17,'udp',if(protocol==1,'icmp',if(protocol==58,'ipv6-icmp',protocol)))) as IPProto, count(1) as count from dns group by Direction,IPProto order by count,Direction,IPProto desc;",
+ "head": [
+ { "name": "Direction","type": "text" },
+ { "name": "IPProto","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["recv","udp",4],
+ ["sent","udp",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select if(ether_type==34525,'IPv6','IPv4') as IPVersion, qtype as Qtype, count(1) as count from dns where qr==0 group by IPVersion,Qtype order by count,IPVersion,Qtype desc;",
+ "head": [
+ { "name": "IPVersion","type": "text" },
+ { "name": "Qtype","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["IPv4",12,2],
+ ["IPv4",1,2]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, do, edns0, edns_version, extended_rcode, z, if(do==1,'set','clr') as D0, count(1) as count from dns where qr==0 group by All,do,D0,edns0,edns_version,extended_rcode,z order by count desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "do","type": "bool" },
+ { "name": "edns0","type": "bool" },
+ { "name": "edns_version","type": "int" },
+ { "name": "extended_rcode","type": "int" },
+ { "name": "z","type": "int" },
+ { "name": "D0","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL",0,0,0,0,0,"clr",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, if(edns0,edns_version,'none') as EDNSVersion, count(1) as count from dns where qr==0 group by All,EDNSVersion order by count desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "EDNSVersion","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL","none",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, if(qname like 'xn--%','idn','normal') as IDNQname, count(1) as count from dns where qr==0 group by All,IDNQname order by count desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "IDNQname","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL","normal",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, lower(rsplit(qname,1)) as TLD, count(1) as count from dns where qr==0 and (qname like 'xn--%') group by All,TLD order by count,TLD desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "TLD","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, if(qr==1,dst_addr,src_addr) as ClientAddr, count(1) as count from dns where qr==0 and (qtype=28 or qtype=38) and (qname like '%.root-servers.net') group by All,ClientAddr order by count desc limit 50;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "ClientAddr","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, opcode as Opcode, count(1) as count from dns where qr==0 group by All,Opcode order by count,Opcode desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "Opcode","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL",0,4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, qtype as Qtype, count(1) as count from dns where qr==0 group by All,Qtype order by count,Qtype desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "Qtype","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL",12,2],
+ ["ALL",1,2]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select qtype as Qtype, len(qname) as QnameLen, count(1) as count from dns where qr==0 group by Qtype,QnameLen order by count,QnameLen,Qtype desc;",
+ "head": [
+ { "name": "Qtype","type": "int" },
+ { "name": "QnameLen","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ [1,7,1],
+ [1,13,1],
+ [12,25,1],
+ [12,27,1]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select qtype as Qtype, lower(rsplit(qname,1)) as TLD, count(1) as count from dns where qr==0 and (qtype=1 or qtype=2 or qtype=5 or qtype=6 or qtype=12 or qtype=15 or qtype=28 or qtype=38 or qtype=255) group by Qtype,TLD order by count,TLD,Qtype desc limit 200;",
+ "head": [
+ { "name": "Qtype","type": "int" },
+ { "name": "TLD","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ [1,"org",1],
+ [1,"se",1],
+ [12,"arpa",2]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, rcode as Rcode, count(1) as count from dns where qr==1 group by All,Rcode order by count,Rcode desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "Rcode","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL",3,1],
+ ["ALL",0,3]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select rcode as Rcode, msg_size as ReplyLen, count(1) as count from dns where qr==1 group by Rcode,ReplyLen order by count,Rcode,ReplyLen desc;",
+ "head": [
+ { "name": "Rcode","type": "int" },
+ { "name": "ReplyLen","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ [0,96,1],
+ [0,78,1],
+ [0,40,1],
+ [3,119,1]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select 'ALL' as All, rd as RD, count(1) as count from dns where qr==0 group by All,RD order by count desc;",
+ "head": [
+ { "name": "All","type": "text" },
+ { "name": "RD","type": "bool" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["ALL",1,4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select if(protocol==6,'tcp',if(protocol==17,'udp',protocol)) as Transport, qtype as Qtype, count(1) as count from dns where qr==0 group by Transport,Qtype order by Transport,Qtype,count desc;",
+ "head": [
+ { "name": "Transport","type": "text" },
+ { "name": "Qtype","type": "int" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["udp",1,2],
+ ["udp",12,2]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select s, dst_addr as Dst_addr, qtype as questiontype, lower(src_addr) as lower_src, if(1 and s < 1 or s <= 1 or s > 1 or s >= 1, 't', 'f'), trim(trim('foofoo' || rsplit(src_addr, 1) || 'foofoo', 'foo'), 'bar'), count(*), len(src_addr), sum(msg_size + -1 - 2 % 4 << 3 >> 2 | 3 & ~4) + 1, min(msg_size), max(msg_size), truncate(1.1) as integer, 1.1 as float, sum(src_port + 1.0 - 2.0 / 1.5 * -2.5) + 1.0, max(src_port + 1.0), min(src_port + 1.0), avg(src_port), stdev(src_port), name('rcode', 0) from dns where src_addr like '%' and (qr or not qr) group by src_addr, s having s >= 0 order by s, dst_addr, lower_src, integer, float;",
+ "head": [
+ { "name": "s","type": "int" },
+ { "name": "Dst_addr","type": "text" },
+ { "name": "questiontype","type": "int" },
+ { "name": "lower_src","type": "text" },
+ { "name": "if((1and((((s<1)or(s<=1))or(s>1))or(s>=1))),t,f)","type": "text" },
+ { "name": "trim(trim(((foofoo||rsplit(src_addr,1))||foofoo),foo),bar)","type": "text" },
+ { "name": "count(1)","type": "int" },
+ { "name": "len(src_addr)","type": "int" },
+ { "name": "(sum((msg_size+-((((((1-(2%4))<<3)>>2)|3)&~(4)))))+1)","type": "int" },
+ { "name": "min(msg_size)","type": "int" },
+ { "name": "max(msg_size)","type": "int" },
+ { "name": "integer","type": "int" },
+ { "name": "float","type": "float" },
+ { "name": "(sum(((src_port+1.0)-((2.0/1.5)*-(2.5))))+1.0)","type": "float" },
+ { "name": "max((src_port+1.0))","type": "float" },
+ { "name": "min((src_port+1.0))","type": "float" },
+ { "name": "avg(src_port)","type": "float" },
+ { "name": "stdev(src_port)","type": "float" },
+ { "name": "name(rcode,0)","type": "text" }
+ ],
+ "data": [
+ [1297433016,"172.18.24.52",12,"212.247.204.2","t","204",1,13,125,119,119,1,1.1,58.3333,54,54,53,0,"NoError"],
+ [1297433016,"212.247.204.2",12,"172.18.24.52","t","24",1,12,48,42,42,1,1.1,52271.3,52267,52267,52266,0,"NoError"],
+ [1297433026,"212.247.204.2",1,"172.18.24.52","t","24",1,12,36,30,30,1,1.1,54066.3,54062,54062,54061,0,"NoError"],
+ [1297433027,"172.18.24.52",1,"212.247.204.2","t","204",1,13,84,78,78,1,1.1,58.3333,54,54,53,0,"NoError"],
+ [1297433030,"172.18.24.52",1,"212.247.204.2","t","204",1,13,46,40,40,1,1.1,58.3333,54,54,53,0,"NoError"],
+ [1297433030,"212.247.204.2",1,"172.18.24.52","t","24",1,12,30,24,24,1,1.1,59489.3,59485,59485,59484,0,"NoError"],
+ [1297433038,"212.247.204.2",12,"172.18.24.52","t","24",1,12,50,44,44,1,1.1,49372.3,49368,49368,49367,0,"NoError"],
+ [1297433039,"172.18.24.52",12,"212.247.204.2","t","204",1,13,102,96,96,1,1.1,58.3333,54,54,53,0,"NoError"]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select name( 'qtype' , qtype ) as qt, count(*) as count from dns group by qtype order by count, qt desc;",
+ "head": [
+ { "name": "qt","type": "text" },
+ { "name": "count","type": "int" }
+ ],
+ "data": [
+ ["PTR",4],
+ ["A",4]
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select * from icmp;",
+ "head": [
+ { "name": "id","type": "int" },
+ { "name": "s","type": "int" },
+ { "name": "us","type": "int" },
+ { "name": "ether_type","type": "int" },
+ { "name": "src_port","type": "int" },
+ { "name": "dst_port","type": "int" },
+ { "name": "src_addr","type": "text" },
+ { "name": "dst_addr","type": "text" },
+ { "name": "protocol","type": "int" },
+ { "name": "ip_ttl","type": "int" },
+ { "name": "ip_version","type": "int" },
+ { "name": "fragments","type": "int" },
+ { "name": "type","type": "int" },
+ { "name": "code","type": "int" },
+ { "name": "echo_identifier","type": "int" },
+ { "name": "echo_sequence","type": "int" },
+ { "name": "du_protocol","type": "int" },
+ { "name": "du_src_addr","type": "text" },
+ { "name": "du_dst_addr","type": "text" },
+ { "name": "desc","type": "text" }
+ ],
+ "data": [
+ ]
+ }
+]
+[
+ {
+ "table_name": "result-0",
+ "query": "select count(*) from icmp;",
+ "head": [
+ { "name": "count(1)","type": "int" }
+ ],
+ "data": [
+ ]
+ }
+]