DBRepair development

@Tony_T @ChuckPa I done some more tests on this today. It appears the tables that are being continually reported as damaged are fts4_metadata_titles, fts4_metadata_titles_icu, fts4_tag_titles and fts4_tag_titles_icu within the main and blogs db.

So I ran …

  1. ran sudo bash DBRepair.sh stop check status start exit - which confirms they are “damaged”
  2. ran sudo bash DBRepair.sh stop automatic status start exit which reindexes and “repairs them”.
  3. ran sudo bash DBRepair.sh stop check status start exit - which confirms they are still reported as okay
  4. ran a manual scan of my libraries
  5. optimise the db
  6. ran sudo bash DBRepair.sh stop check status start exit - to check the indexes again. At this point they are yet again reported as “damaged”.

I’m not sure what this part of the tool is actually trying to accomplish as its looks to be just doing a insert integrity_check …

  # Check each FTS table
  for Table in $FTSTables
  do
    Result="$("$PLEX_SQLITE" $CPPL.db "INSERT INTO $Table($Table) VALUES('integrity-check');" 2>&1)"
    ExitCode=$?

    if [ $ExitCode -eq 0 ] && [ -z "$Result" ]; then
      Output "  FTS index '$Table' - OK"
      WriteLog "$Caller - FTS Check: $Table - PASS"
    else
      Output "  FTS index '$Table' - DAMAGED"
      Output "    Error: $Result"
      WriteLog "$Caller - FTS Check: $Table - FAIL ($Result)"
      FTSFail=1
    fi
  done

… however, at least for me all four of these tables are blank and empty in my db. Maybe they are used in a feature I have disabled!

Anyhow, passing along as information and I’m just going to ignore the reports on these tables as noise and a false positive.