Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

bk commit into 5.1 tree (gkodinov:1.2576)

From: <kgeorge(at)mysql.com>
Date: Tue Jul 31 2007 - 07:58:07 EDT


Below is the list of changes that have just been committed into a local 5.1 repository of kgeorge. When kgeorge does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository.
For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@1.2576, 2007-07-31 14:58:04+03:00, gkodinov@magare.gmz +6 -0   merge of the fix for bug 17417 5.0-opt->5.1-opt

  mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@1.45, 2007-07-31 14:53:28+03:00, gkodinov@magare.gmz +0 -118     merge of the fix for bug 17417 5.0-opt->5.1-opt

  mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result@1.44, 2007-07-31 14:53:28+03:00, gkodinov@magare.gmz +12 -12     merge of the fix for bug 17417 5.0-opt->5.1-opt

  mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test@1.12, 2007-07-31 14:53:28+03:00, gkodinov@magare.gmz +120 -0     merge of the fix for bug 17417 5.0-opt->5.1-opt

  sql/sql_class.cc@1.349, 2007-07-31 14:53:28+03:00, gkodinov@magare.gmz +1 -1     merge of the fix for bug 17417 5.0-opt->5.1-opt

  sql/sql_insert.cc@1.290, 2007-07-31 14:53:28+03:00, gkodinov@magare.gmz +1 -1     merge of the fix for bug 17417 5.0-opt->5.1-opt

  sql/sql_parse.cc@1.697, 2007-07-31 14:53:28+03:00, gkodinov@magare.gmz +1 -1     merge of the fix for bug 17417 5.0-opt->5.1-opt

diff -Nrup a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test

--- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-07-30 19:02:19 +03:00
+++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-07-31 14:53:28 +03:00 @@ -316,121 +316,3 @@ disconnect con3;

 connection con4;
 select get_lock("a",10); # wait for rollback to finish  
Do you need help?X

-#
-# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
-# bug #28960 non-trans temp table changes with insert .. select
-# not binlogged after rollback
-#
-# testing appearence of insert into temp_table in binlog.
-# There are two branches of execution that require different setup.
-
-## send_eof() branch
-
-# prepare
-
-create temporary table tt (a int unique);
-create table ti (a int) engine=innodb;
-reset master;
-show master status;
-
-# action
-
-begin;
-insert into ti values (1);
-insert into ti values (2) ;
-insert into tt select * from ti;
-rollback;
-
-# check
-
-select count(*) from tt /* 2 */;
-show master status;
---replace_column 2 # 5 #
-show binlog events from 98;
-select count(*) from ti /* zero */;
-insert into ti select * from tt;
-select * from ti /* that is what slave would miss - a bug */;
-
-
-## send_error() branch
-delete from ti;
-delete from tt where a=1;
-reset master;
-show master status;
-
-# action
-
-begin;
-insert into ti values (1);
-insert into ti values (2) /* to make the dup error in the following */;
---error ER_DUP_ENTRY
-insert into tt select * from ti /* one affected and error */;
-rollback;
-
-# check
-
-show master status;
---replace_column 2 # 5 #
-show binlog events from 98;
-select count(*) from ti /* zero */;
-insert into ti select * from tt;
-select * from tt /* that is what otherwise slave missed - the bug */;
-
-drop table ti;
-
-
-#
-# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
-#
-# Testing asserts: if there is a side effect of modifying non-transactional
-# table thd->no_trans_update.stmt must be TRUE;
-# the assert is active with debug build
-#
-
---disable_warnings
-drop function if exists bug27417;
-drop table if exists t1,t2;
---enable_warnings
-# side effect table
-CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
-# target tables
-CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a));
-
-delimiter |;
-create function bug27417(n int)
-RETURNS int(11)
-begin

  • insert into t1 values (null);
  • return n;
    -end|
    -delimiter ;|
    -
    -reset master;
    -
    -# execute
    -
    -insert into t2 values (bug27417(1));
    -insert into t2 select bug27417(2);
    -reset master;
    -
    ---error ER_DUP_ENTRY
    -insert into t2 values (bug27417(2));
    -show master status; /* only (!) with fixes for #23333 will show there is the query */;
    -select count(*) from t1 /* must be 3 */;
    -
    -reset master;
    -select count(*) from t2;
    -delete from t2 where a=bug27417(3);
    -select count(*) from t2 /* nothing got deleted */;
    -show master status; /* the query must be in regardless of #23333 */;
    -select count(*) from t1 /* must be 5 */;
    -
    ---enable_info
    -delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */;
    ---disable_info
    -select count(*) from t1 /* must be 7 */;
    -
    -drop function bug27417;
    -drop table t1,t2;
    -
    ---echo end of tests
    diff -Nrup a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
    --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result 2007-07-30 18:33:59 +03:00
    +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result 2007-07-31 14:53:28 +03:00 @@ -380,12 +380,12 @@ select @a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" 1 1 drop table t1, t2;
    -create temporary table tt (a int unique);
    +create table tt (a int unique); create table ti (a int) engine=innodb; reset master; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB
    -master-bin.000001 98
    +master-bin.000001 106 begin; insert into ti values (1); insert into ti values (2) ; @@ -398,8 +398,8 @@ count(*) 2 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB
    -master-bin.000001 507
    -show binlog events from 98;
    +master-bin.000001 515 +show binlog events from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert into ti values (1) @@ -419,19 +419,19 @@ delete from tt where a=1; reset master; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB
    -master-bin.000001 98
    +master-bin.000001 106 begin; insert into ti values (1); insert into ti values (2) /* to make the dup error in the following */; insert into tt select * from ti /* one affected and error */;
    -ERROR 23000: Duplicate entry '2' for key 1
    +ERROR 23000: Duplicate entry '2' for key 'a' rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back show master status; File Position Binlog_Do_DB Binlog_Ignore_DB
    -master-bin.000001 581
    -show binlog events from 98;
    +master-bin.000001 589 +show binlog events from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert into ti values (1) @@ -446,7 +446,7 @@ select * from tt /* that is what otherwi a 1 2
    -drop table ti;
    +drop table ti,tt; drop function if exists bug27417; drop table if exists t1,t2; CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; @@ -462,10 +462,10 @@ insert into t2 values (bug27417(1)); insert into t2 select bug27417(2); reset master; insert into t2 values (bug27417(2));
    -ERROR 23000: Duplicate entry '2' for key 1
    +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show master status; File Position Binlog_Do_DB Binlog_Ignore_DB
    -master-bin.000001 98
    +master-bin.000001 218 /* only (!) with fixes for #23333 will show there is the query */; select count(*) from t1 /* must be 3 */; count(*) @@ -480,7 +480,7 @@ count(*) 2 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB
    -master-bin.000001 195
    +master-bin.000001 223 /* the query must be in regardless of #23333 */; select count(*) from t1 /* must be 5 */; count(*) diff -Nrup a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test
    --- a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test 2007-06-27 15:27:28 +03:00
    +++ b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test 2007-07-31 14:53:28 +03:00 @@ -21,4 +21,124 @@ is not null; eval select @a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", @a not like "%#%error_code=%error_code=%"; + drop table t1, t2; + +# +# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack +# bug #28960 non-trans temp table changes with insert .. select +# not binlogged after rollback +# +# testing appearence of insert into temp_table in binlog. +# There are two branches of execution that require different setup. + +## send_eof() branch + +# prepare + +create table tt (a int unique); +create table ti (a int) engine=innodb; +reset master; +show master status; + +# action + +begin; +insert into ti values (1); +insert into ti values (2) ; +insert into tt select * from ti; +rollback; + +# check + +select count(*) from tt /* 2 */; +show master status; +--replace_column 2 # 5 # +show binlog events from 106; +select count(*) from ti /* zero */; +insert into ti select * from tt; +select * from ti /* that is what slave would miss - a bug */; + + +## send_error() branch +delete from ti; +delete from tt where a=1; +reset master; +show master status; + +# action + +begin; +insert into ti values (1); +insert into ti values (2) /* to make the dup error in the following */; +--error ER_DUP_ENTRY +insert into tt select * from ti /* one affected and error */; +rollback; + +# check + +show master status; +--replace_column 2 # 5 # +show binlog events from 106; +select count(*) from ti /* zero */; +insert into ti select * from tt; +select * from tt /* that is what otherwise slave missed - the bug */; + +drop table ti,tt; + + +# +# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack +# +# Testing asserts: if there is a side effect of modifying non-transactional +# table thd->no_trans_update.stmt must be TRUE; +# the assert is active with debug build +# + +--disable_warnings +drop function if exists bug27417; +drop table if exists t1,t2; +--enable_warnings +# side effect table +CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; +# target tables +CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a)); + +delimiter |; +create function bug27417(n int) +RETURNS int(11) +begin + insert into t1 values (null); + return n; +end| +delimiter ;| + +reset master; + +# execute + +insert into t2 values (bug27417(1)); +insert into t2 select bug27417(2); +reset master; + +--error ER_DUP_ENTRY +insert into t2 values (bug27417(2)); +show master status; /* only (!) with fixes for #23333 will show there is the query */; +select count(*) from t1 /* must be 3 */; + +reset master; +select count(*) from t2; +delete from t2 where a=bug27417(3); +select count(*) from t2 /* nothing got deleted */; +show master status; /* the query must be in regardless of #23333 */; +select count(*) from t1 /* must be 5 */; + +--enable_info +delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */; +--disable_info +select count(*) from t1 /* must be 7 */; + +drop function bug27417; +drop table t1,t2; + +--echo end of tests diff -Nrup a/sql/sql_class.cc b/sql/sql_class.cc
    --- a/sql/sql_class.cc 2007-07-30 18:34:00 +03:00
    +++ b/sql/sql_class.cc 2007-07-31 14:53:28 +03:00 @@ -2573,7 +2573,7 @@ extern "C" int thd_slave_thread(const MY

 extern "C" int thd_non_transactional_update(const MYSQL_THD thd)  {
- return(thd->no_trans_update.all);

+ return(thd->transaction.all.modified_non_trans_table);  }  

 extern "C" int thd_binlog_format(const MYSQL_THD thd) diff -Nrup a/sql/sql_insert.cc b/sql/sql_insert.cc
--- a/sql/sql_insert.cc 2007-07-30 19:02:19 +03:00
+++ b/sql/sql_insert.cc 2007-07-31 14:53:28 +03:00 @@ -3188,7 +3188,7 @@ void select_insert::abort() {

                             table->file->has_transactions(), FALSE);
         if (!thd->current_stmt_binlog_row_based && !table->s->tmp_table &&
             !can_rollback_data())

- thd->no_trans_update.all= TRUE;
+ thd->transaction.all.modified_non_trans_table= TRUE; query_cache_invalidate3(thd, table, 1); } } diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc 2007-07-30 19:02:19 +03:00
+++ b/sql/sql_parse.cc 2007-07-31 14:53:28 +03:00
@@ -5176,7 +5176,7 @@ void mysql_reset_thd_for_next_command(TH

   if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))    {

     thd->options&= ~OPTION_KEEP_LOG;

- thd->no_trans_update.all= FALSE;

+ thd->transaction.all.modified_non_trans_table= FALSE;

   }
   DBUG_ASSERT(thd->security_ctx== &thd->main_security_ctx);    thd->tmp_table_used= 0;

--

MySQL Code Commits Mailing List
For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.com Received on Tue Jul 31 07:58:22 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:19:44 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library