[pgjdbc/pgjdbc] c2885d: fix: IndexOutOfBounds on prepared multistatement w...

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] c2885d: fix: IndexOutOfBounds on prepared multistatement w...
Date: 2018-08-15 08:08:36
Message-ID: 5b73df847b6f_1e1e2b0990868ed04174d@hookshot-fe-7191cb1.cp1-iad.github.net.mail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: c2885dd0cfc793f81e5dd3ed2300bb32476eb14a
https://github.com/pgjdbc/pgjdbc/commit/c2885dd0cfc793f81e5dd3ed2300bb32476eb14a
Author: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Date: 2018-08-15 (Wed, 15 Aug 2018)

Changed paths:
M pgjdbc/src/main/java/org/postgresql/core/Parser.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/PreparedStatementTest.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc3/CompositeQueryParseTest.java

Log Message:
-----------
fix: IndexOutOfBounds on prepared multistatement with insert values

Re-initialize "isValuesFound and isCurrentReWriteCompatible" variables so multi-statement
prepared sql like INSERT INTO inttable(a) VALUES (?);... could be parsed properly.

Previously it identified the second statement as multi-values since isValuesFound was not reset

closes #1289

**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Wegrzyn, Artur 2018-08-17 07:28:22 Java 11 Compatibility check postgresqljdbc41.jar
Previous Message Roger Pack 2018-08-07 20:43:32 isvalid(5) can hang forever