diff -ur mysql-5.1.31/client/mysqlbinlog.cc mysql-5.1.31-binlog-compress/client/mysqlbinlog.cc --- mysql-5.1.31/client/mysqlbinlog.cc 2009-02-11 00:23:17.000000000 +0000 +++ mysql-5.1.31-binlog-compress/client/mysqlbinlog.cc 2009-03-01 22:39:29.000000000 +0000 @@ -74,7 +74,7 @@ static const char* database= 0; static my_bool force_opt= 0, short_form= 0, remote_opt= 0; static my_bool debug_info_flag, debug_check_flag; -static my_bool force_if_open_opt= 1; +static my_bool force_if_open_opt= 1, opt_compress= 0; static ulonglong offset = 0; static const char* host = 0; static int port= 0; @@ -953,6 +953,9 @@ {"character-sets-dir", OPT_CHARSETS_DIR, "Directory where character sets are.", (uchar**) &charsets_dir, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"compress", 'C', "Requires -R. Use compression in server/client protocol.", + (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, + 0, 0, 0}, {"database", 'd', "List entries for just this database (local log only).", (uchar**) &database, (uchar**) &database, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1316,7 +1319,8 @@ error("Failed on mysql_init."); return ERROR_STOP; } - + if (opt_compress) + mysql_options(mysql,MYSQL_OPT_COMPRESS,NullS); if (opt_protocol) mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol); if (!mysql_real_connect(mysql, host, user, pass, 0, port, sock, 0))