--- scripts/mysqldiff.save.py 2015-02-06 20:54:46.640977144 +0000 +++ scripts/mysqldiff.py 2015-02-09 08:29:02.311209625 +0000 @@ -93,6 +93,16 @@ parser.add_option("--force", action="store_true", dest="force", help="do not abort when a diff test fails") + # Perform a data compare + parser.add_option("--data-compare", action="store_true", dest="data_compare", + help="compare the data for tables") + + # Add skips + parser.add_option("--skip-checksum-table", action="store_true", + dest="no_checksum_table", + help="skip CHECKSUM TABLE step in data consistency " + "check.") + # Add compact option for resulting diff parser.add_option("-c", "--compact", action="store_true", dest="compact", help="compact output from a diff.") @@ -110,7 +120,7 @@ add_difftype(parser, True) # Add the direction (changes-for) - add_changes_for(parser, None) + add_changes_for(parser) # Add show reverse option add_reverse(parser) @@ -136,6 +146,8 @@ "skip_table_opts": opt.skip_tbl_opts, "compact": opt.compact, "charset": opt.charset, + "data_compare": opt.data_compare, + "no_checksum_table": opt.no_checksum_table, } # add ssl options values. @@ -252,7 +264,11 @@ if diff_failed: if not opt.quiet: - print("Compare failed. One or more differences found.") + if(opt.data_compare): + print("# Compare failed. One or more differences found.") + else: + print("Compare failed. One or more differences found.") + sys.exit(1) if not opt.quiet: