Repository navigation
Expand file tree
/
Copy pathaffinity2.test
More file actions
165 lines (140 loc) · 3.92 KB
/
Copy pathaffinity2.test
File metadata and controls
165 lines (140 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
==== affinity2-100
CREATE TABLE t1(
xi INTEGER,
xr REAL,
xb BLOB,
xn NUMERIC,
xt TEXT
);
INSERT INTO t1(rowid,xi,xr,xb,xn,xt) VALUES(1,1,1,1,1,1);
INSERT INTO t1(rowid,xi,xr,xb,xn,xt) VALUES(2,'2','2','2','2','2');
INSERT INTO t1(rowid,xi,xr,xb,xn,xt) VALUES(3,'03','03','03','03','03');
----
stmt 0 ok
stmt 94 err 1 -1 154 no such table: t1
stmt 154 err 1 -1 224 no such table: t1
stmt 224 err 1 -1 299 no such table: t1
==== affinity2-110
SELECT xi, typeof(xi) FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 48 no such table: t1
==== affinity2-120
SELECT xr, typeof(xr) FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 48 no such table: t1
==== affinity2-130
SELECT xb, typeof(xb) FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 48 no such table: t1
==== affinity2-140
SELECT xn, typeof(xn) FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 48 no such table: t1
==== affinity2-150
SELECT xt, typeof(xt) FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 48 no such table: t1
==== affinity2-200
SELECT rowid, xi==xt, xi==xb, xi==+xt FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 64 no such table: t1
==== affinity2-210
SELECT rowid, xr==xt, xr==xb, xr==+xt FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 64 no such table: t1
==== affinity2-220
SELECT rowid, xn==xt, xn==xb, xn==+xt FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 64 no such table: t1
==== affinity2-300
SELECT rowid, xt==+xi, xt==xi, xt==xb FROM t1 ORDER BY rowid;
----
stmt 0 err 1 -1 64 no such table: t1
==== 400
CREATE TABLE ttt(c0, c1);
CREATE INDEX ii ON ttt(CAST(c0 AS NUMERIC));
INSERT INTO ttt VALUES('abc', '-1');
----
stmt 0 ok
stmt 28 err 1 -1 75 no such table: main.ttt
stmt 75 err 1 -1 115 no such table: ttt
==== 410
SELECT * FROM ttt WHERE CAST(c0 AS NUMERIC) > c1 GROUP BY rowid;
----
stmt 0 err 1 -1 67 no such table: ttt
==== 420
SELECT * FROM ttt INDEXED BY ii WHERE CAST(c0 AS NUMERIC) > c1 GROUP BY rowid;
----
stmt 0 err 1 -1 81 no such table: ttt
==== 430
CREATE TABLE t3(a, b, c INTEGER);
CREATE INDEX t3ac ON t3(a, c-1);
INSERT INTO t3 VALUES(1, 1, 1);
INSERT INTO t3 VALUES(2, 1, 0);
INSERT INTO t3 VALUES(3, 1, 1);
INSERT INTO t3 VALUES(4, 1, 0);
INSERT INTO t3 VALUES(5, 1, 1);
----
stmt 0 ok
stmt 36 err 1 -1 71 no such table: main.t3
stmt 71 err 1 -1 105 no such table: t3
stmt 105 err 1 -1 139 no such table: t3
stmt 139 err 1 -1 173 no such table: t3
stmt 173 err 1 -1 207 no such table: t3
stmt 207 err 1 -1 241 no such table: t3
==== 440
SELECT * FROM t3 WHERE c='0' ORDER BY a;
----
stmt 0 err 1 -1 43 no such table: t3
==== 500
DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 TEXT UNIQUE, c1);
INSERT INTO t0(c0) VALUES (-1);
SELECT quote(- x'ce'), quote(t0.c0), quote(- x'ce' >= t0.c0) FROM t0;
----
stmt 0 ok
stmt 27 ok
stmt 66 err 1 -1 100 no such table: t0
stmt 100 err 1 -1 172 no such table: t0
==== 501
SELECT * FROM t0 WHERE - x'ce' >= t0.c0;
----
stmt 0 err 1 -1 43 no such table: t0
==== 502
SELECT quote(+-+x'ce'), quote(t0.c0), quote(+-+x'ce' >= t0.c0) FROM t0;
----
stmt 0 err 1 -1 74 no such table: t0
==== 503
SELECT * FROM t0 WHERE +-+x'ce' >= t0.c0;
----
stmt 0 err 1 -1 44 no such table: t0
==== 504
SELECT quote(- 'ce'), quote(t0.c0), quote(- 'ce' >= t0.c0) FROM t0;
----
stmt 0 err 1 -1 70 no such table: t0
==== 505
SELECT * FROM t0 WHERE - 'ce' >= t0.c0;
----
stmt 0 err 1 -1 42 no such table: t0
==== 506
SELECT quote(+-+'ce'), quote(t0.c0), quote(+-+'ce' >= t0.c0) FROM t0;
----
stmt 0 err 1 -1 72 no such table: t0
==== 507
SELECT * FROM t0 WHERE +-+'ce' >= t0.c0;
----
stmt 0 err 1 -1 43 no such table: t0
==== 600
DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 REAL UNIQUE);
INSERT INTO t0(c0) VALUES (3175546974276630385);
SELECT 3175546974276630385 < c0 FROM t0;
----
stmt 0 ok
stmt 29 ok
stmt 66 err 1 -1 119 no such table: t0
stmt 119 err 1 -1 164 no such table: t0
==== 601
SELECT 1 FROM t0 WHERE 3175546974276630385 < c0;
----
stmt 0 err 1 -1 53 no such table: t0