Below is the list of changes that have just been committed into a local
5.0 repository of alexi. When alexi 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.1994 05/12/11 17:06:36 aivanov@stripped +3 -0
Fixed BUG #14614: Replication of tables with trigger generates
error message if database is changed.
sql/sql_db.cc
1.121 05/12/11 17:06:27 aivanov@stripped +4 -2
Fixed bug #14614.
Modified mysql_change_db(): The memory where db name resides
is freed by a slave thread.
mysql-test/t/rpl_trigger.test
1.4 05/12/11 17:06:27 aivanov@stripped +29 -0
Added test cases for bug #14614
mysql-test/r/rpl_trigger.result
1.3 05/12/11 17:06:27 aivanov@stripped +12 -0
Fixed results for the added test cases
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: aivanov
# Host: mysql.creware.com
# Root: /home/alexi/dev/mysql-5.0-14614
--- 1.120/sql/sql_db.cc 2005-11-11 21:01:38 +03:00
+++ 1.121/sql/sql_db.cc 2005-12-11 17:06:27 +03:00
@@ -1162,10 +1162,12 @@
DBUG_RETURN(1);
}
end:
- x_free(thd->db);
+ if (!(thd->slave_thread))
+ x_free(thd->db);
if (dbname && dbname[0] == 0)
{
- x_free(dbname);
+ if (!(thd->slave_thread))
+ x_free(dbname);
thd->db= NULL;
thd->db_length= 0;
}
--- 1.2/mysql-test/r/rpl_trigger.result 2005-11-10 22:24:51 +03:00
+++ 1.3/mysql-test/r/rpl_trigger.result 2005-12-11 17:06:27 +03:00
@@ -122,3 +122,15 @@
1
drop function bug12480;
drop table t1;
+create table t1 (i int);
+create table t2 (i int);
+create trigger tr1 before insert on t1 for each row
+begin
+insert into t2 values (1);
+end|
+create database other;
+use other;
+insert into test.t1 values (1);
+use test;
+drop table t1,t2;
+drop database other;
--- 1.3/mysql-test/t/rpl_trigger.test 2005-11-10 22:24:51 +03:00
+++ 1.4/mysql-test/t/rpl_trigger.test 2005-12-11 17:06:27 +03:00
@@ -134,6 +134,35 @@
drop table t1;
#
+# #14614: Replication of tables with trigger generates error message if databases is
changed
+# Note. The error message is emitted by _myfree() using fprintf() to the stderr
+# and because of that does not fall into the .result file.
+#
+
+create table t1 (i int);
+create table t2 (i int);
+
+delimiter |;
+create trigger tr1 before insert on t1 for each row
+begin
+ insert into t2 values (1);
+end|
+delimiter ;|
+
+create database other;
+use other;
+insert into test.t1 values (1);
+
+save_master_pos;
+connection slave;
+sync_with_master;
+
+connection master;
+use test;
+drop table t1,t2;
+drop database other;
+
+#
# End of test
#
save_master_pos;
| Thread |
|---|
| • bk commit into 5.0 tree (aivanov:1.1994) BUG#14614 | Alex Ivanov | 11 Dec |