diff options
| author | Tatsuo Ishii | 2017-03-29 05:48:54 +0000 |
|---|---|---|
| committer | Tatsuo Ishii | 2017-03-29 05:48:54 +0000 |
| commit | ff32fcb40738338ea4633d2907a998efe92eccaf (patch) | |
| tree | 94d1b5378fd38962742a940de0797343973afd72 /src/protocol | |
| parent | 0d2b2795d239d1806e5c7c4e0e10080fc6700205 (diff) | |
Code clean up.bug271
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/CommandComplete.c | 3 | ||||
| -rw-r--r-- | src/protocol/pool_process_query.c | 30 |
2 files changed, 3 insertions, 30 deletions
diff --git a/src/protocol/CommandComplete.c b/src/protocol/CommandComplete.c index 8e8915a76..8974c9e83 100644 --- a/src/protocol/CommandComplete.c +++ b/src/protocol/CommandComplete.c @@ -53,6 +53,9 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac POOL_SESSION_CONTEXT *session_context; POOL_CONNECTION *con; + p1 = NULL; + len1 = 0; + /* Get session context */ session_context = pool_get_session_context(false); diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c index cbf6cb2bc..74afd8373 100644 --- a/src/protocol/pool_process_query.c +++ b/src/protocol/pool_process_query.c @@ -72,7 +72,6 @@ static int reset_backend(POOL_CONNECTION_POOL *backend, int qcnt); static char *get_insert_command_table_name(InsertStmt *node); -static int send_deallocate(POOL_CONNECTION_POOL *backend, POOL_SENT_MESSAGE_LIST msglist, int n); static bool is_cache_empty(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend); static bool is_panic_or_fatal_error(const char *message, int major); static int detect_error(POOL_CONNECTION *master, char *error_code, int major, char class, bool unread); @@ -3622,35 +3621,6 @@ void read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac } /* - * Send DEALLOCATE message to backend by using SimpleQuery. - */ -static int send_deallocate(POOL_CONNECTION_POOL *backend, - POOL_SENT_MESSAGE_LIST msglist, int n) -{ - int len; - char *name; - char *query; - - if (msglist.size <= n) - return 1; - - name = msglist.sent_messages[n]->name; - - len = strlen(name) + 14; /* "DEALLOCATE \"" + "\"" + '\0' */ - query = palloc(len); - sprintf(query, "DEALLOCATE \"%s\"", name); - - if (SimpleQuery(NULL, backend, strlen(query)+1, query) != POOL_CONTINUE) - { - pfree(query); - return 1; - } - pfree(query); - - return 0; -} - -/* * parse_copy_data() * Parses CopyDataRow string. * Returns divide key value. If cannot parse data, returns NULL. |
