Ignore white space in need_insert_lock().
authorYoshiyuki Asaba <y-asaba at pgfoundry.org>
Fri, 2 Nov 2007 09:27:52 +0000 (09:27 +0000)
committerYoshiyuki Asaba <y-asaba at pgfoundry.org>
Fri, 2 Nov 2007 09:27:52 +0000 (09:27 +0000)
pool_process_query.c

index d174c353b43db46f9c193d8982ad9e51fce6e338..f645507dcdf793391924c8482c378deacbd6734f 100644 (file)
@@ -3587,6 +3587,13 @@ static int need_insert_lock(POOL_CONNECTION_POOL *backend, char *query)
 {
        if (MAJOR(backend) != PROTO_MAJOR_V3)
                return 0;
+
+       if (pool_config.ignore_leading_white_space)
+       {
+               /* ignore leading white spaces */
+               while (*query && isspace(*query))
+                       query++;
+       }
        
        /*
         * either insert_lock directive specified and without "NO INSERT LOCK" comment