MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:June 13 2010 1:04am
Subject:bzr commit into mysql-5.1-rep+3 branch (alfranio.correia:3148) WL#2775
View as plain text  
#At file:///home/acorreia/workspace.sun/repository.mysql.new/bzrwork/wl-2775/mysql-5.1-rep%2B3.crash-safe.2775/ based on revid:alfranio.correia@stripped

 3148 Alfranio Correia	2010-06-13
      Post-push fix for WL#2775.
      
      1- Changed the name of the following tables:
       . mysql.rli_info to mysql.slave_relay_log_info and;
       . mysql.mi_info to mysql.slave_master_info.
      
      2- Removed the empty Xid_log_event::do_update_pos as
      Log_event::update_pos is not called from the slave.cc
      when an XID_EVENT is processed. This means however,
      that update_pos() is called if the event is skiped.
      
      3- A TRUE returned from find_info_id() was interpreted as
      "row not found" what was not right. So, we fixed this.
     @ client/mysqldump.c
        Changed the name of the tables.
     @ mysql-test/extra/rpl_tests/rpl_crash_safe.inc
        Changed the name of the tables.
     @ mysql-test/r/1st.result
        Changed the name of the tables.
     @ mysql-test/r/connect.result
        Changed the name of the tables.
     @ mysql-test/r/mysql_upgrade.result
        Changed the name of the tables.
     @ mysql-test/r/mysqlcheck.result
        Changed the name of the tables.
     @ mysql-test/r/system_mysql_db.result
        Changed the name of the tables.
     @ mysql-test/suite/rpl/r/rpl_mixed_crash_safe.result
        Changed the name of the tables.
     @ mysql-test/suite/rpl/r/rpl_row_crash_safe.result
        Changed the name of the tables.
     @ mysql-test/suite/rpl/r/rpl_stmt_crash_safe.result
        Changed the name of the tables and fields.
     @ mysql-test/t/system_mysql_db_fix30020.test
        Changed the name of the tables.
     @ mysql-test/t/system_mysql_db_fix40123.test
        Changed the name of the tables.
     @ mysql-test/t/system_mysql_db_fix50030.test
        Changed the name of the tables.
     @ mysql-test/t/system_mysql_db_fix50117.test
        Changed the name of the tables.
     @ scripts/mysql_install_db.pl.in
        Changed the name of the tables.
     @ scripts/mysql_install_db.sh
        Changed the name of the tables.
     @ scripts/mysql_system_tables.sql
        Changed the name of the tables and fields.
     @ sql/log_event.cc
        Removed the empty update position and did something
        equilavent at the slave.cc
     @ sql/log_event.h
        Removed the empty update position and did something
        equilavent at the slave.cc
     @ sql/rpl_info_factory.h
        Changed the name of the tables.
     @ sql/rpl_info_fields.cc
        Updated comments.
     @ sql/rpl_info_table.cc
        A TRUE returned from find_info_id() was interpreted as "row not found"
        what was not right. So, we fixed this.
     @ sql/rpl_info_table_access.cc
        A TRUE returned from find_info_id() was interpreted as "row not found"
        what was not right. So, we fixed this.
     @ sql/rpl_info_table_access.h
        A TRUE returned from find_info_id() was interpreted as "row not found"
        what was not right. So, we fixed this.
     @ sql/slave.cc
        Avoided a call to update_pos() when XID_EVENT is processed,
        this means that update_pos() is called if the event is skiped.
     @ sql/table.cc
        Changed the name of the tables.

    modified:
      client/mysqldump.c
      mysql-test/extra/rpl_tests/rpl_crash_safe.inc
      mysql-test/r/1st.result
      mysql-test/r/connect.result
      mysql-test/r/information_schema.result
      mysql-test/r/mysql_upgrade.result
      mysql-test/r/mysqlcheck.result
      mysql-test/r/system_mysql_db.result
      mysql-test/suite/rpl/r/rpl_mixed_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stmt_crash_safe.result
      mysql-test/t/system_mysql_db_fix30020.test
      mysql-test/t/system_mysql_db_fix40123.test
      mysql-test/t/system_mysql_db_fix50030.test
      mysql-test/t/system_mysql_db_fix50117.test
      scripts/mysql_install_db.pl.in
      scripts/mysql_install_db.sh
      scripts/mysql_system_tables.sql
      sql/log_event.cc
      sql/log_event.h
      sql/rpl_info_factory.h
      sql/rpl_info_fields.cc
      sql/rpl_info_table.cc
      sql/rpl_info_table_access.cc
      sql/rpl_info_table_access.h
      sql/slave.cc
      sql/table.cc
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2010-05-24 10:48:30 +0000
+++ b/client/mysqldump.c	2010-06-13 01:04:05 +0000
@@ -897,9 +897,9 @@ static int get_options(int *argc, char *
       my_hash_insert(&ignore_table,
                      (uchar*) my_strdup("mysql.slow_log", MYF(MY_WME))) ||
       my_hash_insert(&ignore_table,
-                     (uchar*) my_strdup("mysql.mi_info", MYF(MY_WME))) ||
+                     (uchar*) my_strdup("mysql.slave_master_info", MYF(MY_WME))) ||
       my_hash_insert(&ignore_table,
-                     (uchar*) my_strdup("mysql.rli_info", MYF(MY_WME))))
+                     (uchar*) my_strdup("mysql.slave_relay_log_info", MYF(MY_WME))))
     return(EX_EOM);
 
   if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))

=== modified file 'mysql-test/extra/rpl_tests/rpl_crash_safe.inc'
--- a/mysql-test/extra/rpl_tests/rpl_crash_safe.inc	2010-06-01 12:25:03 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_crash_safe.inc	2010-06-13 01:04:05 +0000
@@ -1,15 +1,15 @@
 if (`SELECT HEX(@commands) = HEX('configure')`)
 {
   --sync_slave_with_master
-  SHOW CREATE TABLE mysql.rli_info;
-  ALTER TABLE mysql.rli_info ENGINE= Innodb;
-  SHOW CREATE TABLE mysql.rli_info;
+  SHOW CREATE TABLE mysql.slave_relay_log_info;
+  ALTER TABLE mysql.slave_relay_log_info ENGINE= Innodb;
+  SHOW CREATE TABLE mysql.slave_relay_log_info;
 
   connection master;
   --source extra/rpl_tests/rpl_mixing_engines.inc
 
   --sync_slave_with_master
-  SELECT * FROM mysql.rli_info;
+  SELECT * FROM mysql.slave_relay_log_info;
 }
 
 if (`SELECT HEX(@commands) = HEX('clean')`)
@@ -43,14 +43,14 @@ if (`SELECT HEX(@commands) != HEX('')`)
     --enable_reconnect
     --source include/wait_until_connected_again.inc
     connection slave;
-    --let $slave_before= `SELECT rli_master_log_pos FROM mysql.rli_info`
+    --let $slave_before= `SELECT master_log_pos FROM mysql.slave_relay_log_info`
     START SLAVE;
     source include/wait_for_slave_to_start.inc;
   }
 
   connection master;
   sync_slave_with_master;
-  --let $slave_after= `SELECT rli_master_log_pos FROM mysql.rli_info`
+  --let $slave_after= `SELECT master_log_pos FROM mysql.slave_relay_log_info`
   connection master;
   SHOW MASTER STATUS;
 }

=== modified file 'mysql-test/r/1st.result'
--- a/mysql-test/r/1st.result	2010-05-24 10:48:30 +0000
+++ b/mysql-test/r/1st.result	2010-06-13 01:04:05 +0000
@@ -16,13 +16,13 @@ help_keyword
 help_relation
 help_topic
 host
-mi_info
 ndb_binlog_index
 plugin
 proc
 procs_priv
-rli_info
 servers
+slave_master_info
+slave_relay_log_info
 slow_log
 tables_priv
 time_zone

=== modified file 'mysql-test/r/connect.result'
--- a/mysql-test/r/connect.result	2010-05-24 10:48:30 +0000
+++ b/mysql-test/r/connect.result	2010-06-13 01:04:05 +0000
@@ -11,13 +11,13 @@ help_keyword
 help_relation
 help_topic
 host
-mi_info
 ndb_binlog_index
 plugin
 proc
 procs_priv
-rli_info
 servers
+slave_master_info
+slave_relay_log_info
 slow_log
 tables_priv
 time_zone
@@ -46,13 +46,13 @@ help_keyword
 help_relation
 help_topic
 host
-mi_info
 ndb_binlog_index
 plugin
 proc
 procs_priv
-rli_info
 servers
+slave_master_info
+slave_relay_log_info
 slow_log
 tables_priv
 time_zone
@@ -89,13 +89,13 @@ help_keyword
 help_relation
 help_topic
 host
-mi_info
 ndb_binlog_index
 plugin
 proc
 procs_priv
-rli_info
 servers
+slave_master_info
+slave_relay_log_info
 slow_log
 tables_priv
 time_zone

=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2010-05-24 10:48:30 +0000
+++ b/mysql-test/r/information_schema.result	2010-06-13 01:04:05 +0000
@@ -81,12 +81,12 @@ help_keyword
 help_relation
 help_topic
 host
-mi_info
 plugin
 proc
 procs_priv
-rli_info
 servers
+slave_master_info
+slave_relay_log_info
 slow_log
 tables_priv
 time_zone

=== modified file 'mysql-test/r/mysql_upgrade.result'
--- a/mysql-test/r/mysql_upgrade.result	2010-05-24 10:48:30 +0000
+++ b/mysql-test/r/mysql_upgrade.result	2010-06-13 01:04:05 +0000
@@ -13,17 +13,17 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info
-Error    : You can't use locks with log tables.
-status   : OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info
+mysql.servers                                      OK
+mysql.slave_master_info
+Error    : You can't use locks with log tables.
+status   : OK
+mysql.slave_relay_log_info
 Error    : You can't use locks with log tables.
 status   : OK
-mysql.servers                                      OK
 mysql.slow_log
 Error    : You can't use locks with log tables.
 status   : OK
@@ -51,17 +51,17 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info
-Error    : You can't use locks with log tables.
-status   : OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info
+mysql.servers                                      OK
+mysql.slave_master_info
+Error    : You can't use locks with log tables.
+status   : OK
+mysql.slave_relay_log_info
 Error    : You can't use locks with log tables.
 status   : OK
-mysql.servers                                      OK
 mysql.slow_log
 Error    : You can't use locks with log tables.
 status   : OK
@@ -89,17 +89,17 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info
-Error    : You can't use locks with log tables.
-status   : OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info
+mysql.servers                                      OK
+mysql.slave_master_info
+Error    : You can't use locks with log tables.
+status   : OK
+mysql.slave_relay_log_info
 Error    : You can't use locks with log tables.
 status   : OK
-mysql.servers                                      OK
 mysql.slow_log
 Error    : You can't use locks with log tables.
 status   : OK
@@ -129,17 +129,17 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info
-Error    : You can't use locks with log tables.
-status   : OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info
+mysql.servers                                      OK
+mysql.slave_master_info
+Error    : You can't use locks with log tables.
+status   : OK
+mysql.slave_relay_log_info
 Error    : You can't use locks with log tables.
 status   : OK
-mysql.servers                                      OK
 mysql.slow_log
 Error    : You can't use locks with log tables.
 status   : OK
@@ -173,17 +173,17 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info
-Error    : You can't use locks with log tables.
-status   : OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info
+mysql.servers                                      OK
+mysql.slave_master_info
+Error    : You can't use locks with log tables.
+status   : OK
+mysql.slave_relay_log_info
 Error    : You can't use locks with log tables.
 status   : OK
-mysql.servers                                      OK
 mysql.slow_log
 Error    : You can't use locks with log tables.
 status   : OK

=== modified file 'mysql-test/r/mysqlcheck.result'
--- a/mysql-test/r/mysqlcheck.result	2010-05-24 10:48:30 +0000
+++ b/mysql-test/r/mysqlcheck.result	2010-06-13 01:04:05 +0000
@@ -14,13 +14,13 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info                                      OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info                                     OK
 mysql.servers                                      OK
+mysql.slave_master_info                            OK
+mysql.slave_relay_log_info                         OK
 mysql.slow_log
 note     : The storage engine for the table doesn't support optimize
 mysql.tables_priv                                  OK
@@ -41,13 +41,13 @@ mysql.help_keyword                      
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
-mysql.mi_info                                      OK
 mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
-mysql.rli_info                                     OK
 mysql.servers                                      OK
+mysql.slave_master_info                            OK
+mysql.slave_relay_log_info                         OK
 mysql.slow_log
 note     : The storage engine for the table doesn't support optimize
 mysql.tables_priv                                  OK

=== modified file 'mysql-test/r/system_mysql_db.result'
--- a/mysql-test/r/system_mysql_db.result	2010-05-24 10:48:30 +0000
+++ b/mysql-test/r/system_mysql_db.result	2010-06-13 01:04:05 +0000
@@ -10,13 +10,13 @@ help_keyword
 help_relation
 help_topic
 host
-mi_info
 ndb_binlog_index
 plugin
 proc
 procs_priv
-rli_info
 servers
+slave_master_info
+slave_relay_log_info
 slow_log
 tables_priv
 time_zone

=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_crash_safe.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_crash_safe.result	2010-06-01 12:25:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_crash_safe.result	2010-06-13 01:04:05 +0000
@@ -11,26 +11,26 @@ call mtr.add_suppression("Unsafe stateme
 #                               PREPARE EXECUTION
 ###################################################################################
 SET @commands= 'configure';
-SHOW CREATE TABLE mysql.rli_info;
+SHOW CREATE TABLE mysql.slave_relay_log_info;
 Table	Create Table
-rli_info	CREATE TABLE `rli_info` (
-  `master_id` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_pos` int(10) unsigned NOT NULL,
-  `rli_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_master_log_pos` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`master_id`(128))
+slave_relay_log_info	CREATE TABLE `slave_relay_log_info` (
+  `Master_id` int(10) unsigned NOT NULL,
+  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Relay_log_pos` int(10) unsigned NOT NULL,
+  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Master_log_pos` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`Master_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Relay Log Information'
-ALTER TABLE mysql.rli_info ENGINE= Innodb;
-SHOW CREATE TABLE mysql.rli_info;
+ALTER TABLE mysql.slave_relay_log_info ENGINE= Innodb;
+SHOW CREATE TABLE mysql.slave_relay_log_info;
 Table	Create Table
-rli_info	CREATE TABLE `rli_info` (
-  `master_id` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_pos` int(10) unsigned NOT NULL,
-  `rli_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_master_log_pos` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`master_id`(128))
+slave_relay_log_info	CREATE TABLE `slave_relay_log_info` (
+  `Master_id` int(10) unsigned NOT NULL,
+  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Relay_log_pos` int(10) unsigned NOT NULL,
+  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Master_log_pos` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`Master_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Relay Log Information'
 SET SQL_LOG_BIN=0;
 CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
@@ -139,8 +139,8 @@ INSERT INTO nt_6(trans_id, stmt_id) VALU
 INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
 END|
 SET @commands= '';
-SELECT * FROM mysql.rli_info;
-master_id	rli_relay_log_name	rli_relay_log_pos	rli_master_log_name	rli_master_log_pos
+SELECT * FROM mysql.slave_relay_log_info;
+Master_id	Relay_log_name	Relay_log_pos	Master_log_name	Master_log_pos
 2	./slave-relay-bin.000003	4036	master-bin.000001	3889
 ###################################################################################
 #                         EXECUTE CASES CRASHING THE XID

=== modified file 'mysql-test/suite/rpl/r/rpl_row_crash_safe.result'
--- a/mysql-test/suite/rpl/r/rpl_row_crash_safe.result	2010-06-01 12:25:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_crash_safe.result	2010-06-13 01:04:05 +0000
@@ -11,26 +11,26 @@ call mtr.add_suppression("Unsafe stateme
 #                               PREPARE EXECUTION
 ###################################################################################
 SET @commands= 'configure';
-SHOW CREATE TABLE mysql.rli_info;
+SHOW CREATE TABLE mysql.slave_relay_log_info;
 Table	Create Table
-rli_info	CREATE TABLE `rli_info` (
-  `master_id` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_pos` int(10) unsigned NOT NULL,
-  `rli_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_master_log_pos` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`master_id`(128))
+slave_relay_log_info	CREATE TABLE `slave_relay_log_info` (
+  `Master_id` int(10) unsigned NOT NULL,
+  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Relay_log_pos` int(10) unsigned NOT NULL,
+  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Master_log_pos` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`Master_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Relay Log Information'
-ALTER TABLE mysql.rli_info ENGINE= Innodb;
-SHOW CREATE TABLE mysql.rli_info;
+ALTER TABLE mysql.slave_relay_log_info ENGINE= Innodb;
+SHOW CREATE TABLE mysql.slave_relay_log_info;
 Table	Create Table
-rli_info	CREATE TABLE `rli_info` (
-  `master_id` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_pos` int(10) unsigned NOT NULL,
-  `rli_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_master_log_pos` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`master_id`(128))
+slave_relay_log_info	CREATE TABLE `slave_relay_log_info` (
+  `Master_id` int(10) unsigned NOT NULL,
+  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Relay_log_pos` int(10) unsigned NOT NULL,
+  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Master_log_pos` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`Master_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Relay Log Information'
 SET SQL_LOG_BIN=0;
 CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
@@ -139,8 +139,8 @@ INSERT INTO nt_6(trans_id, stmt_id) VALU
 INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
 END|
 SET @commands= '';
-SELECT * FROM mysql.rli_info;
-master_id	rli_relay_log_name	rli_relay_log_pos	rli_master_log_name	rli_master_log_pos
+SELECT * FROM mysql.slave_relay_log_info;
+Master_id	Relay_log_name	Relay_log_pos	Master_log_name	Master_log_pos
 2	./slave-relay-bin.000003	3487	master-bin.000001	3340
 ###################################################################################
 #                         EXECUTE CASES CRASHING THE XID

=== modified file 'mysql-test/suite/rpl/r/rpl_stmt_crash_safe.result'
--- a/mysql-test/suite/rpl/r/rpl_stmt_crash_safe.result	2010-06-01 12:25:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stmt_crash_safe.result	2010-06-13 01:04:05 +0000
@@ -11,28 +11,28 @@ call mtr.add_suppression("Unsafe stateme
 #                               PREPARE EXECUTION
 ###################################################################################
 SET @commands= 'configure';
-SHOW CREATE TABLE mysql.rli_info;
+SHOW CREATE TABLE mysql.slave_relay_log_info;
 Table	Create Table
-rli_info	CREATE TABLE `rli_info` (
-  `master_id` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_pos` int(10) unsigned NOT NULL,
-  `rli_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_master_log_pos` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`master_id`(128))
+slave_relay_log_info	CREATE TABLE `slave_relay_log_info` (
+  `Master_id` int(10) unsigned NOT NULL,
+  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Relay_log_pos` int(10) unsigned NOT NULL,
+  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Master_log_pos` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`Master_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Relay Log Information'
-ALTER TABLE mysql.rli_info ENGINE= Innodb;
+ALTER TABLE mysql.slave_relay_log_info ENGINE= Innodb;
 Warnings:
 Note	1592	Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses the general_log or slow_log table. This is unsafe because system tables may differ on slave.
-SHOW CREATE TABLE mysql.rli_info;
+SHOW CREATE TABLE mysql.slave_relay_log_info;
 Table	Create Table
-rli_info	CREATE TABLE `rli_info` (
-  `master_id` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_relay_log_pos` int(10) unsigned NOT NULL,
-  `rli_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `rli_master_log_pos` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`master_id`(128))
+slave_relay_log_info	CREATE TABLE `slave_relay_log_info` (
+  `Master_id` int(10) unsigned NOT NULL,
+  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Relay_log_pos` int(10) unsigned NOT NULL,
+  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `Master_log_pos` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`Master_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Relay Log Information'
 SET SQL_LOG_BIN=0;
 CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
@@ -141,8 +141,8 @@ INSERT INTO nt_6(trans_id, stmt_id) VALU
 INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
 END|
 SET @commands= '';
-SELECT * FROM mysql.rli_info;
-master_id	rli_relay_log_name	rli_relay_log_pos	rli_master_log_name	rli_master_log_pos
+SELECT * FROM mysql.slave_relay_log_info;
+Master_id	Relay_log_name	Relay_log_pos	Master_log_name	Master_log_pos
 2	./slave-relay-bin.000003	4036	master-bin.000001	3889
 ###################################################################################
 #                         EXECUTE CASES CRASHING THE XID

=== modified file 'mysql-test/t/system_mysql_db_fix30020.test'
--- a/mysql-test/t/system_mysql_db_fix30020.test	2010-05-24 10:48:30 +0000
+++ b/mysql-test/t/system_mysql_db_fix30020.test	2010-06-13 01:04:05 +0000
@@ -97,7 +97,7 @@ INSERT INTO user VALUES ('localhost','',
 DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv,
 procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc,
 time_zone, time_zone_leap_second, time_zone_name, time_zone_transition,
-time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, mi_info, rli_info;
+time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, slave_relay_log_info, slave_master_info;
 
 -- enable_query_log
 

=== modified file 'mysql-test/t/system_mysql_db_fix40123.test'
--- a/mysql-test/t/system_mysql_db_fix40123.test	2010-05-24 10:48:30 +0000
+++ b/mysql-test/t/system_mysql_db_fix40123.test	2010-06-13 01:04:05 +0000
@@ -72,7 +72,7 @@ CREATE TABLE time_zone_leap_second (   T
 -- disable_query_log
 
 # Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, mi_info, rli_info;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, slave_master_info, slave_relay_log_info;
 
 -- enable_query_log
 

=== modified file 'mysql-test/t/system_mysql_db_fix50030.test'
--- a/mysql-test/t/system_mysql_db_fix50030.test	2010-05-24 10:48:30 +0000
+++ b/mysql-test/t/system_mysql_db_fix50030.test	2010-06-13 01:04:05 +0000
@@ -78,7 +78,7 @@ INSERT INTO servers VALUES ('test','loca
 -- disable_query_log
 
 # Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, mi_info, rli_info;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, slave_master_info, slave_relay_log_info;
 
 -- enable_query_log
 

=== modified file 'mysql-test/t/system_mysql_db_fix50117.test'
--- a/mysql-test/t/system_mysql_db_fix50117.test	2010-05-24 10:48:30 +0000
+++ b/mysql-test/t/system_mysql_db_fix50117.test	2010-06-13 01:04:05 +0000
@@ -97,7 +97,7 @@ CREATE TABLE IF NOT EXISTS ndb_binlog_in
 -- disable_query_log
 
 # Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, mi_info, rli_info;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, slave_master_info, slave_relay_log_info;
 
 -- enable_query_log
 

=== modified file 'scripts/mysql_install_db.pl.in'
--- a/scripts/mysql_install_db.pl.in	2010-05-24 10:48:30 +0000
+++ b/scripts/mysql_install_db.pl.in	2010-06-13 01:04:05 +0000
@@ -79,11 +79,11 @@ Usage: $0 [OPTIONS]
                        user.  You must be root to use this option.  By default
                        mysqld runs using your current login name and files and
                        directories that it creates will be owned by you.
-  --engine_rep=engine  The type of the engine where the mysql.mi_info and
-                       mysql.rli_info tables will be created. By default both
-                       tables will be created in the MyIsam engine. However, a
-                       user may choose any available engine. If a crash-safe
-                       slave is desired the engine must be transactional.
+  --engine_rep=engine  The type of the engine where the mysql.slave_master_info and
+                       mysql.slave_relay_log_info tables will be created. By default
+                       both tables will be created in the MyIsam engine. However, a
+                       user may choose any available engine. If a crash-safe slave
+                       is desired the engine must be transactional.
 
 All other options are passed to the mysqld program
 
@@ -459,7 +459,7 @@ if ( open(PIPE, "| $mysqld_install_cmd_l
   report_verbose($opt,"OK");
 
   # ----------------------------------------------------------------------
-  # Pipe ALTER TABLE mysql.mi|rli_info to "mysqld --bootstrap"
+  # Pipe ALTER TABLE mysql.slave_master_info|slave_relay_log_info to "mysqld --bootstrap"
   # ----------------------------------------------------------------------
 
   if ($engine_rep)
@@ -468,8 +468,8 @@ if ( open(PIPE, "| $mysqld_install_cmd_l
     if ( open(PIPE, "| $mysqld_install_cmd_line") )
     {
       print PIPE "use mysql;\n";
-      print PIPE "ALTER TABLE mysql.mi_info ENGINE= " . $engine_rep . ";\n";
-      print PIPE "ALTER TABLE mysql.rli_info ENGINE= " . $engine_rep . ";\n";
+      print PIPE "ALTER TABLE mysql.slave_master_info ENGINE= " . $engine_rep . ";\n";
+      print PIPE "ALTER TABLE mysql.slave_relay_log_info ENGINE= " . $engine_rep . ";\n";
       close PIPE;
 
       report_verbose($opt,"OK");

=== modified file 'scripts/mysql_install_db.sh'
--- a/scripts/mysql_install_db.sh	2010-05-24 10:48:30 +0000
+++ b/scripts/mysql_install_db.sh	2010-06-13 01:04:05 +0000
@@ -63,11 +63,11 @@ Usage: $0 [OPTIONS]
                        user.  You must be root to use this option.  By default
                        mysqld runs using your current login name and files and
                        directories that it creates will be owned by you.
-  --engine_rep=engine  The type of the engine where the mysql.mi_info and
-                       mysql.rli_info tables will be created. By default both
-                       tables will be created in the MyIsam engine. However, a
-                       user may choose any available engine. If a crash-safe
-                       slave is desired the engine must be transactional.
+  --engine_rep=engine  The type of the engine where the mysql.slave_master_info and
+                       mysql.slave_relay_log_info tables will be created. By default
+                       both tables will be created in the MyIsam engine. However, a
+                       user may choose any available engine. If a crash-safe slave
+                       is desired the engine must be transactional.
 
 All other options are passed to the mysqld program
 
@@ -430,8 +430,8 @@ fi
 
 if { -n "$engine_rep" }
 then
-  s_echo "Setting engine for mysql.mi_info mysql.rli_info tables..."
-  if { echo "use mysql;"; echo "ALTER TABLE mysql.mi_info ENGINE= $engine_rep;"; echo "ALTER TABLE mysql.rli_info ENGINE= $engine_rep;"; } | $mysqld_install_cmd_line > /dev/null
+  s_echo "Setting engine for mysql.slave_master_info mysql.slave_relay_log_info tables..."
+  if { echo "use mysql;"; echo "ALTER TABLE mysql.slave_master_info ENGINE= $engine_rep;"; echo "ALTER TABLE mysql.slave_relay_log_info ENGINE= $engine_rep;"; } | $mysqld_install_cmd_line > /dev/null
   then
     s_echo "OK"
   else

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2010-06-01 08:19:08 +0000
+++ b/scripts/mysql_system_tables.sql	2010-06-13 01:04:05 +0000
@@ -85,6 +85,6 @@ CREATE TABLE IF NOT EXISTS event ( db ch
 
 CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
 
-CREATE TABLE IF NOT EXISTS rli_info (master_id TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, rli_relay_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, rli_relay_log_pos INTEGER UNSIGNED NOT NULL, rli_master_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, rli_master_log_pos INTEGER UNSIGNED NOT NULL, PRIMARY KEY(master_id(128))) ENGINE=MYISAM DEFAULT CHARSET=utf8 COMMENT 'Relay Log Information';
+CREATE TABLE IF NOT EXISTS slave_relay_log_info (Master_id INTEGER UNSIGNED NOT NULL, Relay_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, Relay_log_pos INTEGER UNSIGNED NOT NULL, Master_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, Master_log_pos INTEGER UNSIGNED NOT NULL, PRIMARY KEY(Master_id)) ENGINE=MYISAM DEFAULT CHARSET=utf8 COMMENT 'Relay Log Information';
 
-CREATE TABLE IF NOT EXISTS mi_info (master_id TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, mi_lines INTEGER UNSIGNED NOT NULL, mi_master_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, mi_master_log_pos INTEGER UNSIGNED NOT NULL, mi_host TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_user TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_password TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_port INTEGER UNSIGNED NOT NULL, mi_connect_retry INTEGER UNSIGNED NOT NULL, mi_ssl BOOLEAN NOT NULL, mi_ssl_ca TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_ssl_capath TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_ssl_cert TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_ssl_cipher TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_ssl_key TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_ssl_verify_servert_cert BOOLEAN NOT NULL, mi_heartbeat FLOAT NOT NULL, mi_ignore_server_ids TEXT CHARACTER SET utf8 COLLATE utf8_bin, mi_retry_count INTEGER UNSIGNED NOT NULL,  PRIMARY KEY(master_id(128))) EN!
 GINE=MYIS
+CREATE TABLE IF NOT EXISTS slave_master_info (Master_id INTEGER UNSIGNED NOT NULL, Number_of_lines INTEGER UNSIGNED NOT NULL, Master_log_name TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, Master_log_pos INTEGER UNSIGNED NOT NULL, Host TEXT CHARACTER SET utf8 COLLATE utf8_bin, User_name TEXT CHARACTER SET utf8 COLLATE utf8_bin, User_password TEXT CHARACTER SET utf8 COLLATE utf8_bin, Port INTEGER UNSIGNED NOT NULL, Connect_retry INTEGER UNSIGNED NOT NULL, Enabled_ssl BOOLEAN NOT NULL, Ssl_ca TEXT CHARACTER SET utf8 COLLATE utf8_bin, Ssl_capath TEXT CHARACTER SET utf8 COLLATE utf8_bin, Ssl_cert TEXT CHARACTER SET utf8 COLLATE utf8_bin, Ssl_cipher TEXT CHARACTER SET utf8 COLLATE utf8_bin, Ssl_key TEXT CHARACTER SET utf8 COLLATE utf8_bin, Ssl_verify_servert_cert BOOLEAN NOT NULL, Heartbeat FLOAT NOT NULL, Ignored_server_ids TEXT CHARACTER SET utf8 COLLATE utf8_bin, Retry_count INTEGER UNSIGNED NOT NULL, PRIMARY KEY(Master_id)) ENGINE=MYISAM DEFAULT CHARSET=utf8 COMMENT 'Mas!
 ter Infor

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-06-01 12:23:57 +0000
+++ b/sql/log_event.cc	2010-06-13 01:04:05 +0000
@@ -5556,11 +5556,6 @@ Xid_log_event::do_shall_skip(Relay_log_i
   }
   DBUG_RETURN(Log_event::do_shall_skip(rli));
 }
-
-int Xid_log_event::do_update_pos(Relay_log_info *rli)
-{
-  return (0);
-}
 #endif /* !MYSQL_CLIENT */
 
 

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	2010-05-24 10:48:30 +0000
+++ b/sql/log_event.h	2010-06-13 01:04:05 +0000
@@ -2464,7 +2464,6 @@ class Xid_log_event: public Log_event
   Xid_log_event(THD* thd_arg, my_xid x): Log_event(thd_arg,0,0), xid(x) {}
 #ifdef HAVE_REPLICATION
   void pack_info(Protocol* protocol);
-  int do_update_pos(Relay_log_info *rli);
 #endif /* HAVE_REPLICATION */
 #else
   void print(FILE* file, PRINT_EVENT_INFO* print_event_info);

=== modified file 'sql/rpl_info_factory.h'
--- a/sql/rpl_info_factory.h	2010-05-24 10:48:30 +0000
+++ b/sql/rpl_info_factory.h	2010-06-13 01:04:05 +0000
@@ -22,12 +22,12 @@
 #define MI_FIELD_ID 0
 
 #define MI_SCHEMA "mysql"
-#define MI_TABLE  "mi_info"
+#define MI_TABLE  "slave_master_info"
 
 #define RLI_FIELD_ID 0
 
 #define RLI_SCHEMA "mysql"
-#define RLI_TABLE  "rli_info"
+#define RLI_TABLE  "slave_relay_log_info"
 
 class Rpl_info_factory
 {

=== modified file 'sql/rpl_info_fields.cc'
--- a/sql/rpl_info_fields.cc	2010-06-01 08:19:08 +0000
+++ b/sql/rpl_info_fields.cc	2010-06-13 01:04:05 +0000
@@ -81,8 +81,8 @@ bool Rpl_info_fields::resize(int needed_
 }
 
 /**
-  Restore the pointer from "saved" to "use". This method must be called
-  if the "use" points to another space in memory that it is not the
+  Restore the pointer from "saved" to "use". This member function must be
+  called if the "use" points to another space in memory that it is not the
   original one initially allocated. For instance, this may happen when
   a the repository is a table and one reads from it.
 */

=== modified file 'sql/rpl_info_table.cc'
--- a/sql/rpl_info_table.cc	2010-06-01 08:19:08 +0000
+++ b/sql/rpl_info_table.cc	2010-06-13 01:04:05 +0000
@@ -35,6 +35,7 @@ Rpl_info_table::~Rpl_info_table()
 int Rpl_info_table::do_init_info()
 {
   int error= 1;
+  int type_error= Rpl_info_table_access::FOUND;
   TABLE *table= NULL;
   ulong saved_mode;
   Open_tables_state backup;
@@ -55,13 +56,12 @@ int Rpl_info_table::do_init_info()
     goto end;
 
   /*
-    Points the cursor at the row to be read where the master_id
-    equals to the server_id. If the row is not found, the slave
-    is being initialized and a new row is inserted.
+    Points the cursor at the row to be read where the master_id equals to
+    the server_id.
   */
   longlong2str(server_id, field_values->field[field_idx].use.str, 10);
   field_values->field[field_idx].use.length= strlen(field_values->field[field_idx].use.str);
-  if (!access->find_info_id(field_idx, field_values->field[field_idx].use, table))
+  if (!access->find_info_id(field_idx, field_values->field[field_idx].use, table, &type_error))
   {
     /*
       Reads the information stored in the rpl_info table into a
@@ -72,9 +72,9 @@ int Rpl_info_table::do_init_info()
                                  field_values))
       goto end;
   }
-
-  error= 0;
-
+  error= ((type_error == Rpl_info_table_access::FOUND ||
+          type_error == Rpl_info_table_access::NOT_FOUND)
+         ? 0 : 1);
 end:
   /*
     Unlocks and closes the rpl_info table.
@@ -89,6 +89,7 @@ end:
 int Rpl_info_table::do_flush_info(const bool force)
 {
   int error= 1;
+  int type_error= Rpl_info_table_access::FOUND;
   TABLE *table= NULL;
   ulong saved_mode;
   Open_tables_state backup;
@@ -122,7 +123,9 @@ int Rpl_info_table::do_flush_info(const 
   */
   longlong2str(server_id, field_values->field[field_idx].use.str, 10);
   field_values->field[field_idx].use.length= strlen(field_values->field[field_idx].use.str);
-  if (access->find_info_id(field_idx, field_values->field[field_idx].use, table))
+  if (access->find_info_id(field_idx, field_values->field[field_idx].use,
+                           table, &type_error) &&
+      type_error == Rpl_info_table_access::NOT_FOUND)
   {
     /*
       Prepares the information to be stored before calling ha_write_row.
@@ -140,8 +143,9 @@ int Rpl_info_table::do_flush_info(const 
       table->file->print_error(error, MYF(0));
       goto end;
     }
+    error= 0;
   }
-  else
+  else if (type_error == Rpl_info_table_access::FOUND)
   {
     /*
       Prepares the information to be stored before calling ha_update_row.
@@ -161,8 +165,8 @@ int Rpl_info_table::do_flush_info(const 
       table->file->print_error(error, MYF(0));
       goto end;
     }
+    error= 0;
   }
-  error= 0;
 
 end:
   /*
@@ -178,6 +182,7 @@ end:
 int Rpl_info_table::do_reset_info()
 {
   int error= 1;
+  int type_error= Rpl_info_table_access::FOUND;
   TABLE *table= NULL;
   ulong saved_mode;
   Open_tables_state backup;
@@ -203,7 +208,7 @@ int Rpl_info_table::do_reset_info()
   */
   longlong2str(server_id, field_values->field[field_idx].use.str, 10);
   field_values->field[field_idx].use.length= strlen(field_values->field[field_idx].use.str);
-  if (!access->find_info_id(field_idx, field_values->field[field_idx].use, table))
+  if (!access->find_info_id(field_idx, field_values->field[field_idx].use, table, &type_error))
   {
     /*
       Deletes a row in the rpl_info table.
@@ -214,7 +219,9 @@ int Rpl_info_table::do_reset_info()
       goto end;
     }
   }
-  error= 0;
+  error= ((type_error == Rpl_info_table_access::FOUND ||
+           type_error == Rpl_info_table_access::NOT_FOUND)
+          ? 0 : 1);
 
 end:
   /*
@@ -232,6 +239,7 @@ int Rpl_info_table::do_check_info()
   int error= 1;
   TABLE *table= NULL;
   Open_tables_state backup;
+  int type_error= Rpl_info_table_access::FOUND;
 
   THD *thd= access->create_fake_thd();
 
@@ -251,7 +259,7 @@ int Rpl_info_table::do_check_info()
   */
   longlong2str(server_id, field_values->field[field_idx].use.str, 10);
   field_values->field[field_idx].use.length= strlen(field_values->field[field_idx].use.str);
-  if (access->find_info_id(field_idx, field_values->field[field_idx].use, table))
+  if (access->find_info_id(field_idx, field_values->field[field_idx].use, table, &type_error))
   {
     /* 
        We cannot simply call my_error here because it does not

=== modified file 'sql/rpl_info_table_access.cc'
--- a/sql/rpl_info_table_access.cc	2010-06-01 08:19:08 +0000
+++ b/sql/rpl_info_table_access.cc	2010-06-13 01:04:05 +0000
@@ -128,20 +128,22 @@ bool Rpl_info_table_access::close_table(
 
   In case search succeeded, the table cursor points to the found row.
 
-  @param[in]      idx    Index field
-  @param[in]      id     Server id
-  @param[in,out]  table  Table
+  @param[in]      idx        Index field
+  @param[in]      id         Server id
+  @param[in,out]  table      Table
+  @param[out]     type_error Type of the result: FOUND, NOT_FOUND or ERROR.
 
   @return
     @retval FALSE No error
     @retval TRUE  Failure
 */
-bool Rpl_info_table_access::find_info_id(uint idx, LEX_STRING id, TABLE *table)
+bool Rpl_info_table_access::find_info_id(uint idx, LEX_STRING id, TABLE *table, int *type_error)
 {
   uchar key[MAX_KEY_LENGTH];
   DBUG_ENTER("Relay_log_info_table::find_info_id");
   DBUG_PRINT("enter", ("name: %.*s", (int) id.length, id.str));
 
+  (*type_error)= ERROR;
   if (id.length > table->field[idx]->field_length)
     DBUG_RETURN(TRUE);
 
@@ -155,11 +157,11 @@ bool Rpl_info_table_access::find_info_id
   if (table->file->index_read_idx_map(table->record[0], 0, key, HA_WHOLE_KEY,
                                       HA_READ_KEY_EXACT))
   {
-    DBUG_PRINT("info", ("Row not found"));
+    (*type_error)= NOT_FOUND;
     DBUG_RETURN(TRUE);
   }
 
-  DBUG_PRINT("info", ("Row found!"));
+  (*type_error)= FOUND;
   DBUG_RETURN(FALSE);
 }
 

=== modified file 'sql/rpl_info_table_access.h'
--- a/sql/rpl_info_table_access.h	2010-05-24 10:48:30 +0000
+++ b/sql/rpl_info_table_access.h	2010-06-13 01:04:05 +0000
@@ -25,6 +25,10 @@
 class Rpl_info_table_access
 {
 public:
+  static const int FOUND= 1;
+  static const int NOT_FOUND= 2;
+  static const int ERROR= 3;
+
   Rpl_info_table_access();
   virtual ~Rpl_info_table_access();
 
@@ -32,7 +36,7 @@ public:
                   uint max_num_field, enum thr_lock_type lock_type,
                   TABLE** table, Open_tables_state* backup);
   bool close_table(THD* thd, TABLE* table, Open_tables_state* backup);
-  bool find_info_id(uint idx, LEX_STRING, TABLE*);
+  bool find_info_id(uint idx, LEX_STRING, TABLE*, int*);
   bool load_info_fields(uint max_num_field, Field **fields, ...);
   bool load_info_fields(uint max_num_field, Field **fields,
                         Rpl_info_fields *field_values);

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2010-06-01 08:19:08 +0000
+++ b/sql/slave.cc	2010-06-13 01:04:05 +0000
@@ -768,8 +768,6 @@ int start_slave_thread(pthread_handler h
   ulong start_id;
   DBUG_ENTER("start_slave_thread");
 
-  DBUG_ASSERT(mi->inited);
-
   if (start_lock)
     pthread_mutex_lock(start_lock);
   if (!server_id)
@@ -2352,6 +2350,7 @@ static int has_temporary_error(THD *thd)
 int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli)
 {
   int exec_res= 0;
+  bool skip_event= FALSE;
 
   DBUG_ENTER("apply_event_and_update_pos");
 
@@ -2396,10 +2395,13 @@ int apply_event_and_update_pos(Log_event
 
   int reason= ev->shall_skip(rli);
   if (reason == Log_event::EVENT_SKIP_COUNT)
+  {
     --rli->slave_skip_counter;
+    skip_event= TRUE;
+  }
   pthread_mutex_unlock(&rli->data_lock);
   if (reason == Log_event::EVENT_SKIP_NOT)
-     exec_res= ev->apply_event(rli);
+    exec_res= ev->apply_event(rli);
 
 #ifndef DBUG_OFF
   /*
@@ -2425,7 +2427,8 @@ int apply_event_and_update_pos(Log_event
   DBUG_PRINT("info", ("apply_event error = %d", exec_res));
   if (exec_res == 0)
   {
-    int error= ev->update_pos(rli);
+    int error= (ev->get_type_code() != XID_EVENT || skip_event) ?
+                ev->update_pos(rli) : 0;
 #ifdef HAVE_purify
     if (!rli->is_fake)
 #endif
@@ -4444,8 +4447,10 @@ static Log_event* next_event(Relay_log_i
       goto err;
 #ifndef DBUG_OFF
     {
-      DBUG_PRINT("info", ("assertion file %lu  event relay log pos %lu\n",
-        (ulong) my_b_tell(cur_log), (ulong) rli->get_event_relay_log_pos()));
+      DBUG_PRINT("info", ("assertion skip %lu file pos %lu event relay log pos %lu file %s\n",
+        (ulong) rli->slave_skip_counter, (ulong) my_b_tell(cur_log),
+        (ulong) rli->get_event_relay_log_pos(),
+        rli->get_event_relay_log_name()));
 
       /* This is an assertion which sometimes fails, let's try to track it */
       char llbuf1[22], llbuf2[22];
@@ -4455,7 +4460,7 @@ static Log_event* next_event(Relay_log_i
       DBUG_ASSERT(my_b_tell(cur_log) >= BIN_LOG_HEADER_SIZE);
       DBUG_ASSERT(my_b_tell(cur_log) == rli->get_event_relay_log_pos());
 
-      DBUG_PRINT("info", ("next_event group master %s %lu  group relay %s %lu event %s %lu\n",
+      DBUG_PRINT("info", ("next_event group master %s %lu group relay %s %lu event %s %lu\n",
         rli->get_group_master_log_name(),
         (ulong) rli->get_group_master_log_pos(),
         rli->get_group_relay_log_name(),

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2010-05-24 10:48:30 +0000
+++ b/sql/table.cc	2010-06-13 01:04:05 +0000
@@ -34,10 +34,10 @@ LEX_STRING GENERAL_LOG_NAME= {C_STRING_W
 LEX_STRING SLOW_LOG_NAME= {C_STRING_WITH_LEN("slow_log")};
 
 /* RLI_INFO name */
-LEX_STRING RLI_INFO_NAME= {C_STRING_WITH_LEN("rli_info")};
+LEX_STRING RLI_INFO_NAME= {C_STRING_WITH_LEN("slave_relay_log_info")};
 
 /* MI_INFO name */
-LEX_STRING MI_INFO_NAME= {C_STRING_WITH_LEN("mi_info")};
+LEX_STRING MI_INFO_NAME= {C_STRING_WITH_LEN("slave_master_info")};
 
 	/* Functions defined in this file */
 


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.1-rep+3 branch (alfranio.correia:3148) WL#2775Alfranio Correia13 Jun