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

Commit309411a

Browse files
author
Michael Meskes
committed
Applied Zoltan's patch to correctly align interval and timestamp data in ecpg's sqlda.
1 parent4509033 commit309411a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ sqlda_common_total_size(const PGresult *res, int row, enum COMPAT_MODE compat, l
127127
ecpg_sqlda_align_add_size(offset,sizeof(date),sizeof(date),&offset,&next_offset);
128128
break;
129129
caseECPGt_timestamp:
130-
ecpg_sqlda_align_add_size(offset,sizeof(int),sizeof(timestamp),&offset,&next_offset);
130+
ecpg_sqlda_align_add_size(offset,sizeof(int64),sizeof(timestamp),&offset,&next_offset);
131131
break;
132132
caseECPGt_interval:
133-
ecpg_sqlda_align_add_size(offset,sizeof(int),sizeof(interval),&offset,&next_offset);
133+
ecpg_sqlda_align_add_size(offset,sizeof(int64),sizeof(interval),&offset,&next_offset);
134134
break;
135135
caseECPGt_char:
136136
caseECPGt_unsigned_char:
@@ -359,7 +359,7 @@ ecpg_set_compat_sqlda(int lineno, struct sqlda_compat ** _sqlda, const PGresult
359359
sqlda->sqlvar[i].sqllen=sizeof(date);
360360
break;
361361
caseECPGt_timestamp:
362-
ecpg_sqlda_align_add_size(offset,sizeof(timestamp),sizeof(timestamp),&offset,&next_offset);
362+
ecpg_sqlda_align_add_size(offset,sizeof(int64),sizeof(timestamp),&offset,&next_offset);
363363
sqlda->sqlvar[i].sqldata= (char*)sqlda+offset;
364364
sqlda->sqlvar[i].sqllen=sizeof(timestamp);
365365
break;
@@ -545,7 +545,7 @@ ecpg_set_native_sqlda(int lineno, struct sqlda_struct ** _sqlda, const PGresult
545545
sqlda->sqlvar[i].sqllen=sizeof(date);
546546
break;
547547
caseECPGt_timestamp:
548-
ecpg_sqlda_align_add_size(offset,sizeof(timestamp),sizeof(timestamp),&offset,&next_offset);
548+
ecpg_sqlda_align_add_size(offset,sizeof(int64),sizeof(timestamp),&offset,&next_offset);
549549
sqlda->sqlvar[i].sqldata= (char*)sqlda+offset;
550550
sqlda->sqlvar[i].sqllen=sizeof(timestamp);
551551
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp