)]}'
{
  "commit": "1e9537265cbc3a0e6c9941fc1af20c5af9a70fe3",
  "tree": "f5928cd3a692370d1f72db8ba25a71fa5e90328f",
  "parents": [
    "69d669f214ccf639e936348c6f794e3235bbea6a"
  ],
  "author": {
    "name": "Ian Wienand",
    "email": "iwienand@redhat.com",
    "time": "Mon Feb 22 14:59:44 2021 +1100"
  },
  "committer": {
    "name": "Ian Wienand",
    "email": "iwienand@redhat.com",
    "time": "Thu Mar 11 03:16:43 2021 +0000"
  },
  "message": "AccountPatchReview mariadb: fix key length\n\nSetting up the db on mariadb currently fails with\n\n com.google.gerrit.exceptions.StorageException: create failure on ACCOUNT_PATCH_REVIEWS\n at com.google.gerrit.server.schema.JdbcAccountPatchReviewStore.createTableIfNotExists(JdbcAccountPatchReviewStore.java:188)\n ...\n Caused by: java.sql.SQLSyntaxErrorException: (conn\u003d13) Specified key was too long; max key length is 3072 bytes\n\nIf35aff6c8d dealt with this for mysql, this just ports it to mariadb.\n\nOut of interest, I did a query on the file_name size on our production\ndatabase.\n\n +---------------+---------------+---------------+----------------+\n | pct_length_10 | pct_length_20 | pct_length_50 | pct_length_100 |\n +---------------+---------------+---------------+----------------+\n |          2.14 |         15.96 |         77.80 |          99.48 |\n +---------------+---------------+---------------+----------------+\n\nSo 100 characters gets 99.48% of file names.  Our longest filename is\n249 characters apparently.  We could probably optimize this with\npartial indexes if required.\n\nChange-Id: Ide9a8c647565d657d691a73be76129f237bf6ebb\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b0a3370fe154610b454ae1531c80ffac5ba9f94a",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/schema/MariaDBAccountPatchReviewStore.java",
      "new_id": "dd82be21596cfc8797f844b2207dc6edffb1e75b",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/schema/MariaDBAccountPatchReviewStore.java"
    }
  ]
}
