Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentSerializer.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentSerializer.java (date 1418628430000) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentSerializer.java (date 1419415408000) @@ -68,7 +68,7 @@ sb.append("{"); boolean needComma = false; for (String key : doc.keySet()) { - if (!columnProperties.contains(key)) { + if (columnProperties.contains(key)) { if (needComma) { sb.append(","); } Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java (date 1418628430000) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java (date 1419415408000) @@ -434,9 +434,10 @@ + tableName + " (ID varchar(512) not null primary key, MODIFIED bigint, HASBINARY smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(16384), BDATA blob)"); } else if ("MySQL".equals(dbtype)) { + this.dataLimitInOctets = 12288 * 3; stmt.execute("create table " + tableName - + " (ID varchar(512) not null primary key, MODIFIED bigint, HASBINARY smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(16384), BDATA mediumblob)"); + + " (ID varchar(190) not null primary key, MODIFIED bigint, HASBINARY smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(12288), BDATA mediumblob)"); } else if ("Oracle".equals(dbtype)) { // see https://issues.apache.org/jira/browse/OAK-1914 this.dataLimitInOctets = 4000; @@ -916,11 +917,17 @@ Boolean hasBinary = flag == null ? false : flag.intValue() == NodeDocument.HAS_BINARY_VAL; Long modcount = (Long) document.get(MODCOUNT); Long cmodcount = (Long) document.get(COLLISIONSMODCOUNT); - dbInsert(connection, tableName, document.getId(), modified, hasBinary, modcount, cmodcount, data); + boolean result = dbInsert(connection, tableName, document.getId(), modified, hasBinary, modcount, cmodcount, data); + if (!result) { + LOG.error("Error Id : " + data); - } - connection.commit(); + } + connection.commit(); + } +/* + connection.commit(); +*/ } catch (SQLException ex) { - LOG.debug("insert of " + ids + " failed", ex); + LOG.error("insert of " + ids + " failed", ex); this.ch.rollbackConnection(connection); throw new DocumentStoreException(ex); } finally {