*** empty log message ***
[csql.git] / test / tools / csql / exp.testnw026.ksh
blob227fdcee8e7de123834174ace0d9d0111a3ab13a
1 Network CSql
2 echo binary data type testing;
3 Statement Executed
4 Statement Executed: Rows Affected = 1
5 Statement Executed: Rows Affected = 1
6 Statement Executed: Rows Affected = 1
7 Statement Executed: Rows Affected = 1
8 Statement Executed: Rows Affected = 1
9 Statement Executed: Rows Affected = 1
10 echo select * from t1;
11 ---------------------------------------------------------
12 t1.f1 t1.f2
13 ---------------------------------------------------------
14 10 12FE
15 11 245AF
16 12 245AF
17 13 12FE
18 -2147483648 DC23
19 2147483647 323A34
21 echo select * from t1 where f2 = '12fe';
22 ---------------------------------------------------------
23 t1.f1 t1.f2
24 ---------------------------------------------------------
25 10 12FE
26 13 12FE
28 echo select * from t1 where f2 != '323a34' AND f1 = 13;
29 ---------------------------------------------------------
30 t1.f1 t1.f2
31 ---------------------------------------------------------
32 13 12FE
34 echo select * from t1 where f1 = 12 AND f2 >= '245af';
35 ---------------------------------------------------------
36 t1.f1 t1.f2
37 ---------------------------------------------------------
39 echo select * from t1 where f1 = 12 OR f2 > 'dc23';
40 ---------------------------------------------------------
41 t1.f1 t1.f2
42 ---------------------------------------------------------
43 11 245AF
44 12 245AF
45 2147483647 323A34
47 echo select * from t1 where f1 = 12 OR f2 < 'dc23';
48 ---------------------------------------------------------
49 t1.f1 t1.f2
50 ---------------------------------------------------------
51 10 12FE
52 12 245AF
53 13 12FE
55 echo select * from t1 where f1 = 12 OR f2 <> '245af';
56 ---------------------------------------------------------
57 t1.f1 t1.f2
58 ---------------------------------------------------------
59 10 12FE
60 12 245AF
61 13 12FE
62 -2147483648 DC23
63 2147483647 323A34
65 echo select * from t1 where NOT f2 ='12fe';
66 ---------------------------------------------------------
67 t1.f1 t1.f2
68 ---------------------------------------------------------
69 11 245AF
70 12 245AF
71 -2147483648 DC23
72 2147483647 323A34
74 echo select * from t1 where f2 != '12fe';
75 ---------------------------------------------------------
76 t1.f1 t1.f2
77 ---------------------------------------------------------
78 11 245AF
79 12 245AF
80 -2147483648 DC23
81 2147483647 323A34
83 echo select * from t1 where NOT f2 != '12fe';
84 ---------------------------------------------------------
85 t1.f1 t1.f2
86 ---------------------------------------------------------
87 10 12FE
88 13 12FE
90 echo select * from t1 where f1 = f2;
91 ---------------------------------------------------------
92 t1.f1 t1.f2
93 ---------------------------------------------------------
95 echo select * from t1 where f2 in ('245af','12fe');
96 ---------------------------------------------------------
97 t1.f1 t1.f2
98 ---------------------------------------------------------
99 10 12FE
100 11 245AF
101 12 245AF
102 13 12FE
104 echo select * from t1 where f2 between '00000000' and 'ffffffff';
105 ---------------------------------------------------------
106 t1.f1 t1.f2
107 ---------------------------------------------------------
109 echo select * from t1 where f2 between '122' and '12a2';
110 ---------------------------------------------------------
111 t1.f1 t1.f2
112 ---------------------------------------------------------
114 echo update t1 set f2 = '435f3' where f1 != 13 and f2='323a34' ;
115 Statement Executed: Rows Affected = 1
116 ---------------------------------------------------------
117 t1.f1 t1.f2
118 ---------------------------------------------------------
119 10 12FE
120 11 245AF
121 12 245AF
122 13 12FE
123 -2147483648 DC23
124 2147483647 435F3
126 echo update t1 set f2 = '23abc' where f2 = '245af';
127 Statement Executed: Rows Affected = 2
128 ---------------------------------------------------------
129 t1.f1 t1.f2
130 ---------------------------------------------------------
131 10 12FE
132 11 23ABC
133 12 23ABC
134 13 12FE
135 -2147483648 DC23
136 2147483647 435F3
138 echo delete from t1 where f2 = '12fe';
139 Statement Executed: Rows Affected = 2
140 ---------------------------------------------------------
141 t1.f1 t1.f2
142 ---------------------------------------------------------
143 11 23ABC
144 12 23ABC
145 -2147483648 DC23
146 2147483647 435F3
148 Statement Executed
149 Network CSql
150 echo binary data type testing with primary key;
151 Statement Executed
152 Statement Executed: Rows Affected = 1
153 Statement Executed: Rows Affected = 1
154 Statement Executed: Rows Affected = 1
155 Statement execute failed with error -21
156 Statement Executed: Rows Affected = 1
157 Statement Executed: Rows Affected = 1
158 echo select * from t1;
159 ---------------------------------------------------------
160 t1.f1 t1.f2
161 ---------------------------------------------------------
162 10 12FE
163 11 245AF
164 12 2423FE
165 -2147483648 DC23
166 2147483647 323A34
168 echo select * from t1 where f2 = '12fe';
169 ---------------------------------------------------------
170 t1.f1 t1.f2
171 ---------------------------------------------------------
172 10 12FE
174 echo select * from t1 where f2 != '323a34' AND f1 = 13;
175 ---------------------------------------------------------
176 t1.f1 t1.f2
177 ---------------------------------------------------------
179 echo select * from t1 where f1 = 12 AND f2 >= '245af';
180 ---------------------------------------------------------
181 t1.f1 t1.f2
182 ---------------------------------------------------------
184 echo select * from t1 where f1 = 12 OR f2 > 'dc23';
185 ---------------------------------------------------------
186 t1.f1 t1.f2
187 ---------------------------------------------------------
188 11 245AF
189 12 2423FE
190 2147483647 323A34
192 echo select * from t1 where f1 = 12 OR f2 < 'dc23';
193 ---------------------------------------------------------
194 t1.f1 t1.f2
195 ---------------------------------------------------------
196 10 12FE
197 12 2423FE
199 echo select * from t1 where f1 = 12 OR f2 <> '245af';
200 ---------------------------------------------------------
201 t1.f1 t1.f2
202 ---------------------------------------------------------
203 10 12FE
204 12 2423FE
205 -2147483648 DC23
206 2147483647 323A34
208 echo select * from t1 where NOT f2 ='12fe';
209 ---------------------------------------------------------
210 t1.f1 t1.f2
211 ---------------------------------------------------------
212 11 245AF
213 12 2423FE
214 -2147483648 DC23
215 2147483647 323A34
217 echo select * from t1 where f2 != '12fe';
218 ---------------------------------------------------------
219 t1.f1 t1.f2
220 ---------------------------------------------------------
221 11 245AF
222 12 2423FE
223 -2147483648 DC23
224 2147483647 323A34
226 echo select * from t1 where NOT f2 != '12fe';
227 ---------------------------------------------------------
228 t1.f1 t1.f2
229 ---------------------------------------------------------
230 10 12FE
232 echo select * from t1 where f1 = f2;
233 ---------------------------------------------------------
234 t1.f1 t1.f2
235 ---------------------------------------------------------
237 echo select * from t1 where f2 in ('245af','12fe');
238 ---------------------------------------------------------
239 t1.f1 t1.f2
240 ---------------------------------------------------------
241 10 12FE
242 11 245AF
244 echo select * from t1 where f2 between '00000000' and 'ffffffff';
245 ---------------------------------------------------------
246 t1.f1 t1.f2
247 ---------------------------------------------------------
249 echo select * from t1 where f2 between '122' and '12a2';
250 ---------------------------------------------------------
251 t1.f1 t1.f2
252 ---------------------------------------------------------
254 echo update t1 set f2 = '435f3' where f1 != 13 and f2='323a34' ;
255 Statement prepare failed with error -21
256 ---------------------------------------------------------
257 t1.f1 t1.f2
258 ---------------------------------------------------------
259 10 12FE
260 11 245AF
261 12 2423FE
262 -2147483648 DC23
263 2147483647 323A34
265 echo delete from t1 where f2 = '23abc';
266 Statement Executed: Rows Affected = 0
267 ---------------------------------------------------------
268 t1.f1 t1.f2
269 ---------------------------------------------------------
270 10 12FE
271 11 245AF
272 12 2423FE
273 -2147483648 DC23
274 2147483647 323A34
276 Statement Executed
277 Network CSql
278 echo binary data type testing with primary key;
279 echo create table t1 (f1 int, f2 binary(4) DEFAULT 'abcd12' ,primary key(f2));
280 Statement Executed
281 Statement Executed: Rows Affected = 1
282 Statement Executed: Rows Affected = 1
283 Statement Executed: Rows Affected = 1
284 Statement Executed: Rows Affected = 1
285 Statement execute failed with error -21
286 Statement Executed: Rows Affected = 1
287 Statement Executed: Rows Affected = 1
288 echo select * from t1;
289 ---------------------------------------------------------
290 t1.f1 t1.f2
291 ---------------------------------------------------------
292 10 12FE
293 10 ABCD12
294 11 245AF
295 12 2423FE
296 -2147483648 DC23
297 2147483647 323A34
299 echo select * from t1 where f2 = '12fe';
300 ---------------------------------------------------------
301 t1.f1 t1.f2
302 ---------------------------------------------------------
303 10 12FE
305 echo select * from t1 where f2 != '323a34' AND f1 = 13;
306 ---------------------------------------------------------
307 t1.f1 t1.f2
308 ---------------------------------------------------------
310 echo select * from t1 where f1 = 12 AND f2 >= '245af';
311 ---------------------------------------------------------
312 t1.f1 t1.f2
313 ---------------------------------------------------------
315 echo select * from t1 where f1 = 12 OR f2 > 'dc23';
316 ---------------------------------------------------------
317 t1.f1 t1.f2
318 ---------------------------------------------------------
319 10 ABCD12
320 11 245AF
321 12 2423FE
322 2147483647 323A34
324 echo select * from t1 where f1 = 12 OR f2 < 'dc23';
325 ---------------------------------------------------------
326 t1.f1 t1.f2
327 ---------------------------------------------------------
328 10 12FE
329 12 2423FE
331 echo select * from t1 where f1 = 12 OR f2 <> '245af';
332 ---------------------------------------------------------
333 t1.f1 t1.f2
334 ---------------------------------------------------------
335 10 12FE
336 10 ABCD12
337 12 2423FE
338 -2147483648 DC23
339 2147483647 323A34
341 echo select * from t1 where NOT f2 ='12fe';
342 ---------------------------------------------------------
343 t1.f1 t1.f2
344 ---------------------------------------------------------
345 10 ABCD12
346 11 245AF
347 12 2423FE
348 -2147483648 DC23
349 2147483647 323A34
351 echo select * from t1 where f2 != '12fe';
352 ---------------------------------------------------------
353 t1.f1 t1.f2
354 ---------------------------------------------------------
355 10 ABCD12
356 11 245AF
357 12 2423FE
358 -2147483648 DC23
359 2147483647 323A34
361 echo select * from t1 where NOT f2 != '12fe';
362 ---------------------------------------------------------
363 t1.f1 t1.f2
364 ---------------------------------------------------------
365 10 12FE
367 echo select * from t1 where f1 = f2;
368 ---------------------------------------------------------
369 t1.f1 t1.f2
370 ---------------------------------------------------------
372 echo select * from t1 where f2 in ('245af','12fe');
373 ---------------------------------------------------------
374 t1.f1 t1.f2
375 ---------------------------------------------------------
376 10 12FE
377 11 245AF
379 echo select * from t1 where f2 between '00000000' and 'ffffffff';
380 ---------------------------------------------------------
381 t1.f1 t1.f2
382 ---------------------------------------------------------
384 echo select * from t1 where f2 between '122' and '12a2';
385 ---------------------------------------------------------
386 t1.f1 t1.f2
387 ---------------------------------------------------------
389 echo update t1 set f2 = '435f3' where f1 != 13 and f2='323a34' ;
390 Statement prepare failed with error -21
391 ---------------------------------------------------------
392 t1.f1 t1.f2
393 ---------------------------------------------------------
394 10 12FE
395 10 ABCD12
396 11 245AF
397 12 2423FE
398 -2147483648 DC23
399 2147483647 323A34
401 echo delete from t1 where f2 = '12fe';
402 Statement Executed: Rows Affected = 1
403 ---------------------------------------------------------
404 t1.f1 t1.f2
405 ---------------------------------------------------------
406 10 ABCD12
407 11 245AF
408 12 2423FE
409 -2147483648 DC23
410 2147483647 323A34
412 Statement Executed
413 Statement execute failed with error -4