From 29e9750ad9be0290e3a1e3e7de7d206518c3e8a8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2001 19:35:28 +0200 Subject: [PATCH 1/3] ha_innobase.cc: Add better instructions on how to specify innodb_data_file_path etc. sql/ha_innobase.cc: Add better instructions on how to specify innodb_data_file_path etc. --- sql/ha_innobase.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 9bd25c67009..50c2a2aef5c 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -557,10 +557,10 @@ innobase_init(void) "skip-innodb\n" "to the [mysqld] section of init parameters in your my.cnf\n" "or my.ini. If you want to use InnoDB tables, add for example,\n" - "innodb_data_file_path = /mysql/data/ibdata1:20M\n" + "innodb_data_file_path = ibdata1:30M\n" "But to get good performance you should adjust for your hardware\n" - "the InnoDB startup options listed in section 7.6 at\n" - "http://www.mysql.com/doc/\n"); + "the InnoDB startup options listed in section 2 at\n" + "http://www.innodb.com/ibman.html\n"); innodb_skip=1; DBUG_RETURN(FALSE); // Continue without innobase From 97ea3b380794d0a91b37e0fee7b4d3b6df615409 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2001 19:53:56 -0700 Subject: [PATCH 2/3] temp commit --- mysql-test/t/rpl_get_lock.test | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mysql-test/t/rpl_get_lock.test b/mysql-test/t/rpl_get_lock.test index 93f911e01d5..8bbeeade468 100644 --- a/mysql-test/t/rpl_get_lock.test +++ b/mysql-test/t/rpl_get_lock.test @@ -1,11 +1,19 @@ 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; +while ($1) +{ + select get_lock("lock",2); + select release_lock("lock"); + dec $1; +} save_master_pos; connection slave; sync_with_master; From 836c5cac840676310a675affd32ff6ff403a9682 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2001 21:56:36 -0700 Subject: [PATCH 3/3] make replication work correctly if the master logs SELECT RELEASE_LOCK() instead of DO RELEASE_LOCK() mysql-test/t/rpl_get_lock.test: test for SELECT RELEASE() replication bug --- mysql-test/t/rpl_get_lock.test | 7 +++---- sql/sql_parse.cc | 21 +++++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/mysql-test/t/rpl_get_lock.test b/mysql-test/t/rpl_get_lock.test index 8bbeeade468..3c33103e4c7 100644 --- a/mysql-test/t/rpl_get_lock.test +++ b/mysql-test/t/rpl_get_lock.test @@ -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; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index dd627017ead..48b48dc77a7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1071,10 +1071,23 @@ mysql_execute_command(void) 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) {