Merge branch 'stable-2.13'

* stable-2.13:
  Fix to reindex a change via SSH: get from DB/Notes instead of Lucene
  Update git submodules
  Fix Postgresql JDBC driver leaking memory
  Fix Schema_127 for mysql on case-sensitive FS
  Update git submodules

Change-Id: Ida6a895ccb8cab2c68bb0cdb83fe4d076f2b007c
This commit is contained in:
David Pursehouse
2016-11-02 17:35:57 +09:00
4 changed files with 55 additions and 12 deletions

View File

@@ -45,18 +45,18 @@ public class Schema_127 extends SchemaVersion {
H2AccountPatchReviewStore.createTableIfNotExists(url);
try (Connection con = DriverManager.getConnection(url);
PreparedStatement stmt =
con.prepareStatement("INSERT INTO ACCOUNT_PATCH_REVIEWS "
+ "(ACCOUNT_ID, CHANGE_ID, PATCH_SET_ID, FILE_NAME) VALUES "
con.prepareStatement("INSERT INTO account_patch_reviews "
+ "(account_id, change_id, patch_set_id, file_name) VALUES "
+ "(?, ?, ?, ?)")) {
int batchCount = 0;
try (Statement s = newStatement(db);
ResultSet rs = s.executeQuery("SELECT * from ACCOUNT_PATCH_REVIEWS")) {
ResultSet rs = s.executeQuery("SELECT * from account_patch_reviews")) {
while (rs.next()) {
stmt.setInt(1, rs.getInt("ACCOUNT_ID"));
stmt.setInt(2, rs.getInt("CHANGE_ID"));
stmt.setInt(3, rs.getInt("PATCH_SET_ID"));
stmt.setString(4, rs.getString("FILE_NAME"));
stmt.setInt(1, rs.getInt("account_id"));
stmt.setInt(2, rs.getInt("change_id"));
stmt.setInt(3, rs.getInt("patch_set_id"));
stmt.setString(4, rs.getString("file_name"));
stmt.addBatch();
batchCount++;
if (batchCount >= MAX_BATCH_SIZE) {