)]}'
{"mariadb/templates/bin/_restore_mariadb.sh.tpl":[{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"4f5a2346224bc2e427a24a842dfb33b85b6f763a","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  # if that\u0027s the case."},{"line_number":116,"context_line":"  delete_restore_user \"no_action_on_error\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"  $MYSQL --execute\u003d\"GRANT SELECT ON *.* TO ${RESTORE_USER}@\u0027%\u0027 IDENTIFIED BY \u0027${RESTORE_PW}\u0027;\" 2\u003e$RESTORE_LOG"},{"line_number":119,"context_line":"  if [ \"$?\" -eq 0 ]"},{"line_number":120,"context_line":"  then"},{"line_number":121,"context_line":"    $MYSQL --execute\u003d\"GRANT ALL ON ${restore_db}.* TO ${RESTORE_USER}@\u0027%\u0027 IDENTIFIED BY \u0027${RESTORE_PW}\u0027;\" 2\u003e$RESTORE_LOG"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_39d67e28","line":118,"range":{"start_line":118,"start_character":96,"end_line":118,"end_character":97},"updated":"2020-02-05 16:57:42.000000000","message":"should these be \u003e\u003e, doesn\u0027t \u003e just to overwrite the file vs. appending. Do we want these to append?","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"8a25c14ba608141693d5480512200e7b831e1a4e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  # if that\u0027s the case."},{"line_number":116,"context_line":"  delete_restore_user \"no_action_on_error\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"  $MYSQL --execute\u003d\"GRANT SELECT ON *.* TO ${RESTORE_USER}@\u0027%\u0027 IDENTIFIED BY \u0027${RESTORE_PW}\u0027;\" 2\u003e$RESTORE_LOG"},{"line_number":119,"context_line":"  if [ \"$?\" -eq 0 ]"},{"line_number":120,"context_line":"  then"},{"line_number":121,"context_line":"    $MYSQL --execute\u003d\"GRANT ALL ON ${restore_db}.* TO ${RESTORE_USER}@\u0027%\u0027 IDENTIFIED BY \u0027${RESTORE_PW}\u0027;\" 2\u003e$RESTORE_LOG"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_217075a7","line":118,"range":{"start_line":118,"start_character":96,"end_line":118,"end_character":97},"in_reply_to":"3fa7e38b_39d67e28","updated":"2020-02-06 16:18:17.000000000","message":"yes, appending is what should be done.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"4f5a2346224bc2e427a24a842dfb33b85b6f763a","unresolved":false,"context_lines":[{"line_number":139,"context_line":"  $MYSQL --execute\u003d\"DROP USER ${RESTORE_USER}@\u0027%\u0027;\" 2\u003e$RESTORE_LOG"},{"line_number":140,"context_line":"  if [ \"$?\" -ne 0 ]"},{"line_number":141,"context_line":"  then"},{"line_number":142,"context_line":"    if [ \"$action_on_error\" \u003d\u003d \"yes\" ]"},{"line_number":143,"context_line":"    then"},{"line_number":144,"context_line":"      cat $RESTORE_LOG"},{"line_number":145,"context_line":"      echo \"Failed to delete temporary restore user - needs attention to avoid a security hole\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_59249a5f","line":142,"range":{"start_line":142,"start_character":10,"end_line":142,"end_character":26},"updated":"2020-02-05 16:57:42.000000000","message":"this variable implies the code will take action, but turns out just printing a warning message, can we name this something else.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"8a25c14ba608141693d5480512200e7b831e1a4e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"  $MYSQL --execute\u003d\"DROP USER ${RESTORE_USER}@\u0027%\u0027;\" 2\u003e$RESTORE_LOG"},{"line_number":140,"context_line":"  if [ \"$?\" -ne 0 ]"},{"line_number":141,"context_line":"  then"},{"line_number":142,"context_line":"    if [ \"$action_on_error\" \u003d\u003d \"yes\" ]"},{"line_number":143,"context_line":"    then"},{"line_number":144,"context_line":"      cat $RESTORE_LOG"},{"line_number":145,"context_line":"      echo \"Failed to delete temporary restore user - needs attention to avoid a security hole\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_a191c59d","line":142,"range":{"start_line":142,"start_character":10,"end_line":142,"end_character":26},"in_reply_to":"3fa7e38b_59249a5f","updated":"2020-02-06 16:18:17.000000000","message":"Yes, will do.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"54108e5d732759c9e591bffc82560821925cdbb5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    then"},{"line_number":144,"context_line":"      cat $RESTORE_LOG"},{"line_number":145,"context_line":"      echo \"Failed to delete temporary restore user - needs attention to avoid a security hole\""},{"line_number":146,"context_line":"      exit 1"},{"line_number":147,"context_line":"    fi"},{"line_number":148,"context_line":"  fi"},{"line_number":149,"context_line":"}"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_94cf3789","line":146,"range":{"start_line":146,"start_character":0,"end_line":146,"end_character":12},"updated":"2020-02-05 17:43:19.000000000","message":"Agree with the security attention, but we probably don\u0027t want to simply exit 1 here perhaps?  in case other cleanup need to be done?\n\nAnd I can\u0027t help but have to comment on the large volumes of \"exit 1\" in this template, it is mind numbing.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"8a25c14ba608141693d5480512200e7b831e1a4e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    then"},{"line_number":144,"context_line":"      cat $RESTORE_LOG"},{"line_number":145,"context_line":"      echo \"Failed to delete temporary restore user - needs attention to avoid a security hole\""},{"line_number":146,"context_line":"      exit 1"},{"line_number":147,"context_line":"    fi"},{"line_number":148,"context_line":"  fi"},{"line_number":149,"context_line":"}"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_213155bc","line":146,"range":{"start_line":146,"start_character":0,"end_line":146,"end_character":12},"in_reply_to":"3fa7e38b_94cf3789","updated":"2020-02-06 16:18:17.000000000","message":"No other cleanup can be done by the script. I want to leave the log there and any decompressed files in place for debugging purposes. Those files get cleaned up anyway at the beginning of the next restore attempt. But I\u0027ll try to simplify this code a bit.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"4f5a2346224bc2e427a24a842dfb33b85b6f763a","unresolved":false,"context_lines":[{"line_number":190,"context_line":"          echo \"Database $single_db_name Permission Restore successful.\""},{"line_number":191,"context_line":"        else"},{"line_number":192,"context_line":"          cat $RESTORE_LOG"},{"line_number":193,"context_line":"          echo \"Database $single_db_name Permission Restore failed.\""},{"line_number":194,"context_line":"          exit 1"},{"line_number":195,"context_line":"        fi"},{"line_number":196,"context_line":"      else"},{"line_number":197,"context_line":"        echo \"There is no permission file available for $single_db_name\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_7994f698","line":194,"range":{"start_line":193,"start_character":0,"end_line":194,"end_character":16},"updated":"2020-02-05 16:57:42.000000000","message":"can we refactor this into a function like err_log that echoes a message and exit rather than putting exit 1 everywhere.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"8a25c14ba608141693d5480512200e7b831e1a4e","unresolved":false,"context_lines":[{"line_number":190,"context_line":"          echo \"Database $single_db_name Permission Restore successful.\""},{"line_number":191,"context_line":"        else"},{"line_number":192,"context_line":"          cat $RESTORE_LOG"},{"line_number":193,"context_line":"          echo \"Database $single_db_name Permission Restore failed.\""},{"line_number":194,"context_line":"          exit 1"},{"line_number":195,"context_line":"        fi"},{"line_number":196,"context_line":"      else"},{"line_number":197,"context_line":"        echo \"There is no permission file available for $single_db_name\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_c13f2182","line":194,"range":{"start_line":193,"start_character":0,"end_line":194,"end_character":16},"in_reply_to":"3fa7e38b_7994f698","updated":"2020-02-06 16:18:17.000000000","message":"Yes, good suggestion.  Will do that.","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"54108e5d732759c9e591bffc82560821925cdbb5","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    usage"},{"line_number":313,"context_line":"    exit 1"},{"line_number":314,"context_line":"  else"},{"line_number":315,"context_line":"    if [ -f ${ARCHIVE_DIR}/${ARGS[1]} ]"},{"line_number":316,"context_line":"    then"},{"line_number":317,"context_line":"      #Get all the databases in that archive"},{"line_number":318,"context_line":"      get_databases ${ARGS[1]}"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_3998be18","line":315,"range":{"start_line":315,"start_character":0,"end_line":315,"end_character":39},"updated":"2020-02-05 17:43:19.000000000","message":"maybe make this the first check in main() since this seems to be needed by all the functions here?\n\nNot sure if we want to recheck this again everywhere, but I supposed that\u0027s fine","commit_id":"c2f361af5f455344fef1e516f4aa0f88071a67d7"}]}
