Fix SimpleQuery so that statements our parser does not understand
authorTatsuo Ishii <ishii at sraoss.co.jp>
Sun, 18 Jul 2010 06:11:39 +0000 (06:11 +0000)
committerTatsuo Ishii <ishii at sraoss.co.jp>
Sun, 18 Jul 2010 06:11:39 +0000 (06:11 +0000)
are sent to all nodes(in replication mode) or primary/master node.

pool_proto_modules.c

index 9d145265ea5495d6ee4f6e5e6b69e34eeb858a85..3a264f65686fb2b61af427d8b98343a8dd9f59ec 100644 (file)
@@ -181,9 +181,13 @@ static int is_temp_table(POOL_CONNECTION_POOL *backend, Node *node);
                /*
                 * Unable to parse the query. Probably syntax error or the
                 * query is too new and our parser cannot understand. Treat as
-                * if it were an ordinaly SET command(thus replicated).
+                * if it were an INSERT command. Note that the INSERT command
+                * does not execute, instead the original query will be sent
+                * to backends, which may or may not cause an actual syntax errors.
+                * The command will be sent to all backends in replication mode
+                * or master/primary in master/slave mode.
                 */
-               char *p = "SET DATESTYLE to ISO";
+               char *p = "INSERT INTO foo VALUES(1)";
 
                pool_log("SimpleQuery: Unable to parse the query: %s", string);
                parse_tree_list = raw_parser(p);