Below is the list of changes that have just been commited into a local
3.23. repository of sasha. When sasha does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2001-12-18 21:56:36-07:00, sasha@stripped
make replication work correctly if the master logs SELECT RELEASE_LOCK()
instead of DO RELEASE_LOCK()
mysql-test/t/rpl_get_lock.test
1.5 01/12/18 21:56:35 sasha@stripped +3 -4
test for SELECT RELEASE() replication bug
sql/sql_parse.cc
1.140 01/12/18 21:56:35 sasha@stripped +17 -4
make replication work correctly if the master logs SELECT RELEASE_LOCK()
instead of DO RELEASE_LOCK()
# 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: sasha
# Host: mysql.sashanet.com
# Root: /reiser-data/mysql
--- 1.139/sql/sql_parse.cc Mon Dec 17 10:59:20 2001
+++ 1.140/sql/sql_parse.cc Tue Dec 18 21:56:35 2001
@@ -1071,10 +1071,23 @@
TABLE_LIST *tables=(TABLE_LIST*) lex->table_list.first;
DBUG_ENTER("mysql_execute_command");
- if(table_rules_on && thd->slave_thread && tables && !tables_ok(thd,tables))
- DBUG_VOID_RETURN; // skip if we are in the slave thread, some table
- // rules have been given and the table list says the query should not be
- // replicated
+ if (thd->slave_thread)
+ {
+ // skip if we are in the slave thread, some table
+ // rules have been given and the table list says the query should not be
+ // replicated
+ if(table_rules_on && tables && !tables_ok(thd,tables))
+ DBUG_VOID_RETURN;
+ // this is a workaround to deal with the shortcoming
+ // in 3.23.44-3.23.46 masters
+ // in RELEASE_LOCK() logging. We re-write SELECT RELEASE_LOCK() as
+ // DO RELEASE_LOCK()
+ if (lex->sql_command == SQLCOM_SELECT)
+ {
+ lex->sql_command = SQLCOM_DO;
+ lex->insert_list = &lex->item_list;
+ }
+ }
thread_safe_increment(com_stat[lex->sql_command],&LOCK_thread_count);
switch (lex->sql_command) {
--- 1.4/mysql-test/t/rpl_get_lock.test Tue Dec 18 19:53:56 2001
+++ 1.5/mysql-test/t/rpl_get_lock.test Tue Dec 18 21:56:35 2001
@@ -1,17 +1,16 @@
source include/master-slave.inc;
connection master;
create table t1(n int);
-create table t2(n int);
insert into t1 values(get_lock("lock",2));
dirty_close master;
connection master1;
select get_lock("lock",2);
select release_lock("lock");
-let $1=20000;
+let $1=2000;
while ($1)
{
- select get_lock("lock",2);
- select release_lock("lock");
+ do get_lock("lock",2);
+ do release_lock("lock");
dec $1;
}
save_master_pos;
| Thread |
|---|
| • bk commit into 3.23 tree | sasha | 19 Dec |