Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79a1a2e

Browse files
author
Michael Meskes
committed
Cleaned up log output a little bit more.
1 parent75b5630 commit79a1a2e

File tree

5 files changed

+42
-11
lines changed

5 files changed

+42
-11
lines changed

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.56 2006/08/02 13:43:23 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.57 2006/08/08 15:30:39 meskes Exp $ */
22

33
/*
44
* The aim is to get a simpler inteface to the database routines.
@@ -421,9 +421,6 @@ ECPGstore_result(const PGresult *results, int act_field,
421421
len+=strlen(PQgetvalue(results,act_tuple,act_field))+1;
422422
len *=var->offset;/* should be 1, but YMNK */
423423
len+= (ntuples+1)*sizeof(char*);
424-
425-
ECPGlog("ECPGstore_result: line %d: allocating %d bytes for %d tuples (char**=0)",
426-
stmt->lineno,len,ntuples);
427424
}
428425
else
429426
{
@@ -447,6 +444,7 @@ ECPGstore_result(const PGresult *results, int act_field,
447444
len=var->offset*ntuples;
448445
break;
449446
}
447+
ECPGlog("ECPGstore_result: line %d: allocating memory for %d tuples\n",stmt->lineno,ntuples);
450448
var->value= (char*)ECPGalloc(len,stmt->lineno);
451449
if (!var->value)
452450
return false;

‎src/interfaces/ecpg/test/expected/complex-test2.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
[NO_PID]: sqlca: code: 0, state: 00000
4343
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
4444
[NO_PID]: sqlca: code: 0, state: 00000
45+
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
46+
[NO_PID]: sqlca: code: 0, state: 00000
4547
[NO_PID]: ECPGget_data line 70: RESULT: 04-04-1990 offset: -1 array: Yes
4648
[NO_PID]: sqlca: code: 0, state: 00000
4749
[NO_PID]: ECPGget_data line 70: RESULT: 3 offset: -1 array: Yes
@@ -56,6 +58,8 @@
5658
[NO_PID]: sqlca: code: 0, state: 00000
5759
[NO_PID]: ECPGget_data line 70: RESULT: 35 offset: -1 array: Yes
5860
[NO_PID]: sqlca: code: 0, state: 00000
61+
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
62+
[NO_PID]: sqlca: code: 0, state: 00000
5963
[NO_PID]: ECPGget_data line 70: RESULT: 04-04-1990 offset: -1 array: Yes
6064
[NO_PID]: sqlca: code: 0, state: 00000
6165
[NO_PID]: ECPGget_data line 70: RESULT: 3 offset: -1 array: Yes
@@ -70,6 +74,8 @@
7074
[NO_PID]: sqlca: code: 0, state: 00000
7175
[NO_PID]: ECPGget_data line 70: RESULT: 10 offset: -1 array: Yes
7276
[NO_PID]: sqlca: code: 0, state: 00000
77+
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
78+
[NO_PID]: sqlca: code: 0, state: 00000
7379
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
7480
[NO_PID]: sqlca: code: 0, state: 00000
7581
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
@@ -84,6 +90,8 @@
8490
[NO_PID]: sqlca: code: 0, state: 00000
8591
[NO_PID]: ECPGget_data line 70: RESULT: 8 offset: -1 array: Yes
8692
[NO_PID]: sqlca: code: 0, state: 00000
93+
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
94+
[NO_PID]: sqlca: code: 0, state: 00000
8795
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
8896
[NO_PID]: sqlca: code: 0, state: 00000
8997
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
@@ -98,6 +106,8 @@
98106
[NO_PID]: sqlca: code: 0, state: 00000
99107
[NO_PID]: ECPGget_data line 70: RESULT: 4 offset: -1 array: Yes
100108
[NO_PID]: sqlca: code: 0, state: 00000
109+
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
110+
[NO_PID]: sqlca: code: 0, state: 00000
101111
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
102112
[NO_PID]: sqlca: code: 0, state: 00000
103113
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
@@ -128,6 +138,8 @@
128138
[NO_PID]: sqlca: code: 0, state: 00000
129139
[NO_PID]: ECPGget_data line 100: RESULT: offset: -1 array: Yes
130140
[NO_PID]: sqlca: code: 0, state: 00000
141+
[NO_PID]: ECPGstore_result: line 100: allocating memory for 1 tuples
142+
[NO_PID]: sqlca: code: 0, state: 00000
131143
[NO_PID]: ECPGget_data line 100: RESULT: 04-04-1990 offset: -1 array: Yes
132144
[NO_PID]: sqlca: code: 0, state: 00000
133145
[NO_PID]: ECPGget_data line 100: RESULT: 3 offset: -1 array: Yes

‎src/interfaces/ecpg/test/expected/complex-test3.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
[NO_PID]: sqlca: code: 0, state: 00000
4747
[NO_PID]: ECPGget_data line 64: RESULT: 10 offset: -1 array: Yes
4848
[NO_PID]: sqlca: code: 0, state: 00000
49+
[NO_PID]: ECPGstore_result: line 64: allocating memory for 1 tuples
50+
[NO_PID]: sqlca: code: 0, state: 00000
4951
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
5052
[NO_PID]: sqlca: code: 0, state: 00000
5153
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
@@ -60,6 +62,8 @@
6062
[NO_PID]: sqlca: code: 0, state: 00000
6163
[NO_PID]: ECPGget_data line 64: RESULT: 8 offset: -1 array: Yes
6264
[NO_PID]: sqlca: code: 0, state: 00000
65+
[NO_PID]: ECPGstore_result: line 64: allocating memory for 1 tuples
66+
[NO_PID]: sqlca: code: 0, state: 00000
6367
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
6468
[NO_PID]: sqlca: code: 0, state: 00000
6569
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
@@ -74,6 +78,8 @@
7478
[NO_PID]: sqlca: code: 0, state: 00000
7579
[NO_PID]: ECPGget_data line 64: RESULT: 4 offset: -1 array: Yes
7680
[NO_PID]: sqlca: code: 0, state: 00000
81+
[NO_PID]: ECPGstore_result: line 64: allocating memory for 1 tuples
82+
[NO_PID]: sqlca: code: 0, state: 00000
7783
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
7884
[NO_PID]: sqlca: code: 0, state: 00000
7985
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
@@ -104,6 +110,8 @@
104110
[NO_PID]: sqlca: code: 0, state: 00000
105111
[NO_PID]: ECPGget_data line 94: RESULT: offset: -1 array: Yes
106112
[NO_PID]: sqlca: code: 0, state: 00000
113+
[NO_PID]: ECPGstore_result: line 94: allocating memory for 1 tuples
114+
[NO_PID]: sqlca: code: 0, state: 00000
107115
[NO_PID]: ECPGget_data line 94: RESULT: 04-04-1990 offset: -1 array: Yes
108116
[NO_PID]: sqlca: code: 0, state: 00000
109117
[NO_PID]: ECPGget_data line 94: RESULT: 3 offset: -1 array: Yes

‎src/interfaces/ecpg/test/expected/sql-dynalloc.stderr

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,54 +22,64 @@
2222
[NO_PID]: sqlca: code: 0, state: 00000
2323
[NO_PID]: ECPGget_desc: reading items for tuple 1
2424
[NO_PID]: sqlca: code: 0, state: 00000
25+
[NO_PID]: ECPGstore_result: line 41: allocating memory for 2 tuples
26+
[NO_PID]: sqlca: code: 0, state: 00000
2527
[NO_PID]: ECPGget_data line 41: RESULT: 1 offset: -1 array: Yes
2628
[NO_PID]: sqlca: code: 0, state: 00000
2729
[NO_PID]: ECPGget_data line 41: RESULT: 2 offset: -1 array: Yes
2830
[NO_PID]: sqlca: code: 0, state: 00000
2931
[NO_PID]: ECPGget_desc: reading items for tuple 2
3032
[NO_PID]: sqlca: code: 0, state: 00000
33+
[NO_PID]: ECPGstore_result: line 42: allocating memory for 2 tuples
34+
[NO_PID]: sqlca: code: 0, state: 00000
3135
[NO_PID]: ECPGget_data line 42: RESULT: 23.456 offset: -1 array: Yes
3236
[NO_PID]: sqlca: code: 0, state: 00000
3337
[NO_PID]: ECPGget_data line 42: RESULT: 2.446 offset: -1 array: Yes
3438
[NO_PID]: sqlca: code: 0, state: 00000
3539
[NO_PID]: ECPGget_desc: reading items for tuple 3
3640
[NO_PID]: sqlca: code: 0, state: 00000
37-
[NO_PID]: ECPGstore_result: line 43: allocating 21 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
41+
[NO_PID]: ECPGstore_result: line 43: allocating memory for 2 tuples
42+
[NO_PID]: sqlca: code: 0, state: 00000
3843
[NO_PID]: ECPGget_data line 43: RESULT: varchar offset: -1 array: Yes
3944
[NO_PID]: sqlca: code: 0, state: 00000
4045
[NO_PID]: ECPGget_data line 43: RESULT: offset: -1 array: Yes
4146
[NO_PID]: sqlca: code: 0, state: 00000
4247
[NO_PID]: ECPGget_desc: reading items for tuple 4
4348
[NO_PID]: sqlca: code: 0, state: 00000
44-
[NO_PID]: ECPGstore_result: line 44: allocating 16 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
49+
[NO_PID]: ECPGstore_result: line 44: allocating memory for 2 tuples
50+
[NO_PID]: sqlca: code: 0, state: 00000
4551
[NO_PID]: ECPGget_data line 44: RESULT: v offset: -1 array: Yes
4652
[NO_PID]: sqlca: code: 0, state: 00000
4753
[NO_PID]: ECPGget_data line 44: RESULT: v offset: -1 array: Yes
4854
[NO_PID]: sqlca: code: 0, state: 00000
4955
[NO_PID]: ECPGget_desc: reading items for tuple 5
5056
[NO_PID]: sqlca: code: 0, state: 00000
51-
[NO_PID]: ECPGstore_result: line 45: allocating 22 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
57+
[NO_PID]: ECPGstore_result: line 45: allocating memory for 2 tuples
58+
[NO_PID]: sqlca: code: 0, state: 00000
5259
[NO_PID]: ECPGget_data line 45: RESULT: c offset: -1 array: Yes
5360
[NO_PID]: sqlca: code: 0, state: 00000
5461
[NO_PID]: ECPGget_data line 45: RESULT: c offset: -1 array: Yes
5562
[NO_PID]: sqlca: code: 0, state: 00000
5663
[NO_PID]: ECPGget_desc: reading items for tuple 6
5764
[NO_PID]: sqlca: code: 0, state: 00000
58-
[NO_PID]: ECPGstore_result: line 46: allocating 70 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
65+
[NO_PID]: ECPGstore_result: line 46: allocating memory for 2 tuples
66+
[NO_PID]: sqlca: code: 0, state: 00000
5967
[NO_PID]: ECPGget_data line 46: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
6068
[NO_PID]: sqlca: code: 0, state: 00000
6169
[NO_PID]: ECPGget_data line 46: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
6270
[NO_PID]: sqlca: code: 0, state: 00000
6371
[NO_PID]: ECPGget_desc: reading items for tuple 7
6472
[NO_PID]: sqlca: code: 0, state: 00000
65-
[NO_PID]: ECPGstore_result: line 47: allocating 16 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
73+
[NO_PID]: ECPGstore_result: line 47: allocating memory for 2 tuples
74+
[NO_PID]: sqlca: code: 0, state: 00000
6675
[NO_PID]: ECPGget_data line 47: RESULT: t offset: -1 array: Yes
6776
[NO_PID]: sqlca: code: 0, state: 00000
6877
[NO_PID]: ECPGget_data line 47: RESULT: f offset: -1 array: Yes
6978
[NO_PID]: sqlca: code: 0, state: 00000
7079
[NO_PID]: ECPGget_desc: reading items for tuple 9
7180
[NO_PID]: sqlca: code: 0, state: 00000
72-
[NO_PID]: ECPGstore_result: line 50: allocating 46 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
81+
[NO_PID]: ECPGstore_result: line 50: allocating memory for 2 tuples
82+
[NO_PID]: sqlca: code: 0, state: 00000
7383
[NO_PID]: ECPGget_data line 50: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1 array: Yes
7484
[NO_PID]: sqlca: code: 0, state: 00000
7585
[NO_PID]: ECPGget_data line 50: RESULT: offset: -1 array: Yes

‎src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
[NO_PID]: sqlca: code: 0, state: 00000
4141
[NO_PID]: ECPGget_desc: reading items for tuple 1
4242
[NO_PID]: sqlca: code: 0, state: 00000
43+
[NO_PID]: ECPGstore_result: line 33: allocating memory for 6 tuples
44+
[NO_PID]: sqlca: code: 0, state: 00000
4345
[NO_PID]: ECPGget_data line 33: RESULT: 1 offset: -1 array: Yes
4446
[NO_PID]: sqlca: code: 0, state: 00000
4547
[NO_PID]: ECPGget_data line 33: RESULT: 2 offset: -1 array: Yes
@@ -54,7 +56,8 @@
5456
[NO_PID]: sqlca: code: 0, state: 00000
5557
[NO_PID]: ECPGget_desc: reading items for tuple 2
5658
[NO_PID]: sqlca: code: 0, state: 00000
57-
[NO_PID]: ECPGstore_result: line 34: allocating 49 bytes for 6 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
59+
[NO_PID]: ECPGstore_result: line 34: allocating memory for 6 tuples
60+
[NO_PID]: sqlca: code: 0, state: 00000
5861
[NO_PID]: ECPGget_data line 34: RESULT: one offset: -1 array: Yes
5962
[NO_PID]: sqlca: code: 0, state: 00000
6063
[NO_PID]: ECPGget_data line 34: RESULT: two offset: -1 array: Yes

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp