[Commits] Rev 2866: MWL#136: Rename binlog_trx_{file, position} to the much better binlog_snapshot_{file, position} in http://bazaar.launchpad.net/~maria-captains/maria/5.1

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Mon Nov 8 12:59:39 EET 2010


At http://bazaar.launchpad.net/~maria-captains/maria/5.1

------------------------------------------------------------
revno: 2866
revision-id: knielsen at knielsen-hq.org-20101108105939-4bsj66cafazp9ccw
parent: knielsen at knielsen-hq.org-20101108081144-73uijsaidpmxtdka
committer: knielsen at knielsen-hq.org
branch nick: work-5.1-mwl136
timestamp: Mon 2010-11-08 11:59:39 +0100
message:
  MWL#136: Rename binlog_trx_{file,position} to the much better binlog_snapshot_{file,position}
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2010-11-07 21:37:43 +0000
+++ b/client/mysqldump.c	2010-11-08 10:59:39 +0000
@@ -1114,8 +1114,8 @@ static int fetch_db_collation(const char
 
 /*
   Check if server supports non-blocking binlog position using the
-  binlog_trx_file and binlog_trx_position status variables. If it does,
-  also return the position obtained if output pointers are non-NULL.
+  binlog_snapshot_file and binlog_snapshot_position status variables. If it
+  does, also return the position obtained if output pointers are non-NULL.
   Returns 1 if position available, 0 if not.
 */
 static int
@@ -1126,19 +1126,19 @@ check_consistent_binlog_pos(char *binlog
   int found;
 
   if (mysql_query_with_error_report(mysql, &res,
-                                    "SHOW STATUS LIKE 'binlog_trx_%'"))
+                                    "SHOW STATUS LIKE 'binlog_snapshot_%'"))
     return 1;
 
   found= 0;
   while ((row= mysql_fetch_row(res)))
   {
-    if (0 == strcmp(row[0], "binlog_trx_file"))
+    if (0 == strcmp(row[0], "binlog_snapshot_file"))
     {
       if (binlog_pos_file)
         strmake(binlog_pos_file, row[1], FN_REFLEN-1);
       found++;
     }
-    else if (0 == strcmp(row[0], "binlog_trx_position"))
+    else if (0 == strcmp(row[0], "binlog_snapshot_position"))
     {
       if (binlog_pos_offset)
         strmake(binlog_pos_offset, row[1], LONGLONG_LEN);

=== modified file 'mysql-test/suite/binlog/r/binlog_consistent.result'
--- a/mysql-test/suite/binlog/r/binlog_consistent.result	2010-11-07 21:37:43 +0000
+++ b/mysql-test/suite/binlog/r/binlog_consistent.result	2010-11-08 10:59:39 +0000
@@ -4,10 +4,10 @@ CREATE TABLE t1 (a INT, b VARCHAR(100), 
 SHOW MASTER STATUS;
 File    Position        Binlog_Do_DB    Binlog_Ignore_DB
 master-bin.000001       241             
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 Variable_name   Value
-binlog_trx_file ./master-bin.000001
-binlog_trx_position     241
+binlog_snapshot_file    ./master-bin.000001
+binlog_snapshot_position        241
 BEGIN;
 INSERT INTO t1 VALUES (0, "");
 # Connection con1
@@ -35,10 +35,10 @@ COMMIT;
 SELECT * FROM t1 ORDER BY a,b;
 a       b
 0       
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 Variable_name   Value
-binlog_trx_file ./master-bin.000001
-binlog_trx_position     540
+binlog_snapshot_file    ./master-bin.000001
+binlog_snapshot_position        540
 SHOW MASTER STATUS;
 File    Position        Binlog_Do_DB    Binlog_Ignore_DB
 master-bin.000001       727             
@@ -57,18 +57,18 @@ FLUSH LOGS;
 SELECT * FROM t1 ORDER BY a,b;
 a       b
 0       
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 Variable_name   Value
-binlog_trx_file ./master-bin.000001
-binlog_trx_position     540
+binlog_snapshot_file    ./master-bin.000001
+binlog_snapshot_position        540
 SHOW MASTER STATUS;
 File    Position        Binlog_Do_DB    Binlog_Ignore_DB
 master-bin.000002       106             
 COMMIT;
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 Variable_name   Value
-binlog_trx_file ./master-bin.000002
-binlog_trx_position     106
+binlog_snapshot_file    ./master-bin.000002
+binlog_snapshot_position        106
 SHOW MASTER STATUS;
 File    Position        Binlog_Do_DB    Binlog_Ignore_DB
 master-bin.000002       106             

=== modified file 'mysql-test/suite/binlog/t/binlog_consistent.test'
--- a/mysql-test/suite/binlog/t/binlog_consistent.test	2010-11-07 21:37:43 +0000
+++ b/mysql-test/suite/binlog/t/binlog_consistent.test	2010-11-08 10:59:39 +0000
@@ -17,7 +17,7 @@ connection default;
 
 CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
 SHOW MASTER STATUS;
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 BEGIN;
 INSERT INTO t1 VALUES (0, "");
 
@@ -56,7 +56,7 @@ COMMIT;
 connection default;
 --echo # Connection default
 SELECT * FROM t1 ORDER BY a,b;
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 SHOW MASTER STATUS;
 SELECT * FROM t2 ORDER BY a;
 
@@ -76,10 +76,10 @@ FLUSH LOGS;
 connection default;
 --echo # Connection default
 SELECT * FROM t1 ORDER BY a,b;
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 SHOW MASTER STATUS;
 COMMIT;
-SHOW STATUS LIKE 'binlog_trx_%';
+SHOW STATUS LIKE 'binlog_snapshot_%';
 SHOW MASTER STATUS;
 
 --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2010-11-07 21:37:43 +0000
+++ b/sql/log.cc	2010-11-08 10:59:39 +0000
@@ -6600,8 +6600,8 @@ mysql_bin_log_commit_pos(THD *thd, ulong
 
 static ulonglong binlog_status_var_num_commits;
 static ulonglong binlog_status_var_num_group_commits;
-static char binlog_trx_file[FN_REFLEN];
-static ulonglong binlog_trx_position;
+static char binlog_snapshot_file[FN_REFLEN];
+static ulonglong binlog_snapshot_position;
 
 static SHOW_VAR binlog_status_vars_detail[]=
 {
@@ -6609,10 +6609,10 @@ static SHOW_VAR binlog_status_vars_detai
     (char *)&binlog_status_var_num_commits, SHOW_LONGLONG},
   {"group_commits",
     (char *)&binlog_status_var_num_group_commits, SHOW_LONGLONG},
-  {"trx_file",
-    (char *)&binlog_trx_file, SHOW_CHAR},
-  {"trx_position",
-   (char *)&binlog_trx_position, SHOW_LONGLONG},
+  {"snapshot_file",
+    (char *)&binlog_snapshot_file, SHOW_CHAR},
+  {"snapshot_position",
+   (char *)&binlog_snapshot_position, SHOW_LONGLONG},
   {NullS, NullS, SHOW_LONG}
 };
 
@@ -6671,16 +6671,17 @@ TC_LOG_BINLOG::set_status_variables(THD 
   binlog_status_var_num_group_commits= this->num_group_commits;
   if (!trx_data || 0 == strcmp(trx_data->last_commit_pos_file, ""))
   {
-    strmake(binlog_trx_file, last_commit_pos_file, sizeof(binlog_trx_file)-1);
-    binlog_trx_position= last_commit_pos_offset;
+    strmake(binlog_snapshot_file, last_commit_pos_file,
+            sizeof(binlog_snapshot_file)-1);
+    binlog_snapshot_position= last_commit_pos_offset;
   }
   pthread_mutex_unlock(&LOCK_commit_ordered);
 
   if (trx_data && 0 != strcmp(trx_data->last_commit_pos_file, ""))
   {
-    strmake(binlog_trx_file, trx_data->last_commit_pos_file,
-            sizeof(binlog_trx_file)-1);
-    binlog_trx_position= trx_data->last_commit_pos_offset;
+    strmake(binlog_snapshot_file, trx_data->last_commit_pos_file,
+            sizeof(binlog_snapshot_file)-1);
+    binlog_snapshot_position= trx_data->last_commit_pos_offset;
   }
 }
 



More information about the commits mailing list