aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc/connection.c')
-rw-r--r--src/interfaces/odbc/connection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/odbc/connection.c b/src/interfaces/odbc/connection.c
index 9ae6a223a96..3c784ead445 100644
--- a/src/interfaces/odbc/connection.c
+++ b/src/interfaces/odbc/connection.c
@@ -938,7 +938,7 @@ QResultClass *
CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi)
{
QResultClass *result_in = NULL, *res = NULL, *retres = NULL;
- char swallow;
+ char swallow, *wq;
int id;
SocketClass *sock = self->sock;
int maxlen, empty_reqs;
@@ -999,7 +999,9 @@ CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi)
ReadyToReturn = FALSE;
empty_reqs = 0;
- if (strcmp(query, " ") == 0)
+ for (wq = query; isspace(*wq); wq++)
+ ;
+ if (*wq == '\0')
empty_reqs = 1;
while (!ReadyToReturn)
{