Fix extended query communication in do_query()
authorTakuma Hoshiai <hoshiai@sraoss.co.jp>
Tue, 8 Oct 2019 07:00:23 +0000 (16:00 +0900)
committerTakuma Hoshiai <hoshiai@sraoss.co.jp>
Tue, 8 Oct 2019 07:00:23 +0000 (16:00 +0900)
do_query() didn't send Describe message to PostgreSQL.
It didn't use strcasecmp() but strcasecmp() when check if query is SELECT.

src/protocol/pool_process_query.c

index 6bbb8671ac4758037ff42e2e14c00b91fd0dea4d..52c613a909156c4ce06a790a7666a691a3ee54b9 100644 (file)
@@ -1968,7 +1968,7 @@ do_query(POOL_CONNECTION * backend, char *query, POOL_SELECT_RESULT * *result, i
                /*
                 * Send descrive message if the query is SELECT.
                 */
-               if (!strcasecmp(query, "SELECT"))
+               if (!strncasecmp(query, "SELECT", strlen("SELECT")))
                {
                        /*
                         * Send descrive message