diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-04-23 01:41:06 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-04-23 01:41:06 +0000 |
commit | e355992ff96fa0aa9ea2a68209a59c05c048e751 (patch) | |
tree | 0399778a849ac41eca7ef26a9748160723072091 /src/interfaces/odbc/execute.c | |
parent | cc6bdb3e4898cf5411005871e9dad7a341a07f20 (diff) | |
download | postgresql-e355992ff96fa0aa9ea2a68209a59c05c048e751.tar.gz postgresql-e355992ff96fa0aa9ea2a68209a59c05c048e751.zip |
1) Decrease the size of needlessly large buffers. For example, it
resolved the stack over flow errors reported by Johann Zuschlag.
2) Support {oj syntax for 71. servers.
Diffstat (limited to 'src/interfaces/odbc/execute.c')
-rw-r--r-- | src/interfaces/odbc/execute.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/odbc/execute.c b/src/interfaces/odbc/execute.c index 9777f4324c2..5a0fb17b1b4 100644 --- a/src/interfaces/odbc/execute.c +++ b/src/interfaces/odbc/execute.c @@ -300,6 +300,11 @@ SQLExecute( stmt->data_at_exec = -1; for (i = 0; i < stmt->parameters_allocated; i++) { + Int4 *pcVal = stmt->parameters[i].used; + if (pcVal && (*pcVal == SQL_DATA_AT_EXEC || *pcVal <= SQL_LEN_DATA_AT_EXEC_OFFSET)) + stmt->parameters[i].data_at_exec = TRUE; + else + stmt->parameters[i].data_at_exec = FALSE; /* Check for data at execution parameters */ if (stmt->parameters[i].data_at_exec == TRUE) { |