lib/capistrano/tasks/z10_remote_db_diff.rb
# Execute the specified SQL file given the parameters and create an error log
# in order to check at the end the standard error output for any result.
#
Execute the specified SQL file given the parameters and create an error log
in order to check at the end the standard error output for any result.
Execute the specified SQL file given the parameters and create an error log in order to check at the end the standard error output for any result .
def execute_file_or_exit( filename, db_host, db_user, db_pwd, db_name )
    puts "\r\nExecuting '#{filename}' on DB #{db_name}..."
    stderr_file_name  = File.join(DB_DIFFS_NEW_PATH, 'std_err_log.txt')
    run_locally do
      execute :mysql, "--host=#{ db_host } --user=#{ db_user } --password=\"#{db_pwd}\" --database=#{ db_name } --execute=\"\\. #{ filename }\" 2> #{ stderr_file_name }"
    end
    test_locally_error_log_file_for_size_and_abort( stderr_file_name )
  end
def execute_file_or_exit ( filename , db_host , db_user , db_pwd , db_name ) puts "\r\nExecuting '#{filename}' on DB #{db_name}..." stderr_file_name = File . join ( DB_DIFFS_NEW_PATH , 'std_err_log.txt' ) run_locally do execute :mysql , "--host=#{ db_host } --user=#{ db_user } --password=\"#{db_pwd}\" --database=#{ db_name } --execute=\"\\. #{ filename }\" 2> #{ stderr_file_name }" end test_locally_error_log_file_for_size_and_abort ( stderr_file_name ) end
Execute the specified SQL file given the parameters and create an error log
in order to check at the end the standard error output for any result.
Execute the specified SQL file given the parameters and create an error log in order to check at the end the standard error output for any result .
# Execute the file, creating an error log:
filename
<not_specific>
db_host
<not_specific>
db_user
<not_specific>
db_pwd
<not_specific>
db_name
<not_specific>