Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.1839 05/05/10 17:49:11 tomas@stripped +13 -0
remove error in parallell statement and row logging
bug fix when running statement logging
sql/sql_table.cc
1.242 05/05/10 17:48:56 tomas@stripped +7 -2
remove error in parallell statement and row logging
sql/sql_parse.cc
1.431 05/05/10 17:48:56 tomas@stripped +2 -2
remove error in parallell statement and row logging
sql/sql_insert.cc
1.145 05/05/10 17:48:56 tomas@stripped +2 -2
remove error in parallell statement and row logging
sql/sql_base.cc
1.239 05/05/10 17:48:56 tomas@stripped +3 -0
debug print
sql/sql_acl.cc
1.138 05/05/10 17:48:56 tomas@stripped +13 -10
remove error in parallell statement and row logging
sql/log_event.cc
1.191 05/05/10 17:48:56 tomas@stripped +7 -2
debug print
sql/ha_ndbcluster.cc
1.240 05/05/10 17:48:55 tomas@stripped +10 -7
bug fix when running statement logging
mysql-test/t/rpl000017.test
1.13 05/05/10 17:48:55 tomas@stripped +3 -3
test update for row level logging
mysql-test/t/rpl000012.test
1.17 05/05/10 17:48:55 tomas@stripped +1 -0
test update for row level logging
mysql-test/t/rpl000001.test
1.39 05/05/10 17:48:55 tomas@stripped +1 -0
test update for row level logging
mysql-test/t/multi_update-master.opt
1.3 05/05/10 17:48:55 tomas@stripped +1 -1
test update for row level logging
mysql-test/t/disabled.def
1.14 05/05/10 17:48:55 tomas@stripped +3 -1
test update for row level logging
mysql-test/r/rpl000017.result
1.7 05/05/10 17:48:55 tomas@stripped +6 -0
test update for row level logging
# 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: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/wl2325-test
--- 1.190/sql/log_event.cc 2005-05-06 18:46:58 +02:00
+++ 1.191/sql/log_event.cc 2005-05-10 17:48:56 +02:00
@@ -5589,6 +5589,7 @@
#ifndef MYSQL_CLIENT
static int record_compare(TABLE* table, byte const *a, byte const *b)
{
+ DBUG_ENTER("record_compare(TABLE*, byte const*, byte const*)");
for (size_t i = 0 ; i < table->s->fields ; ++i)
{
int const off = table->field[i]->offset();
@@ -5596,9 +5597,9 @@
a[off], a[off], b[off], b[off]));
int const res = table->field[i]->cmp_binary(a + off, b + off);
if (res != 0)
- return res;
+ DBUG_RETURN(res);
}
- return 0;
+ DBUG_RETURN(0);
}
@@ -5633,6 +5634,10 @@
if (table->s->keys > 0)
{
DBUG_PRINT("info", ("Fetching row using index"));
+ DBUG_PRINT("info", ("table->key_info=%p, table->key_info->key_length=%u",
+ table->key_info,
+ table->key_info ? table->key_info->key_length : 0));
+ DBUG_PRINT("info", ("record_buf=%p, key=%p", record_buf, key));
if (int error= table->file->index_read(record_buf, key,
table->key_info->key_length,
HA_READ_KEY_EXACT))
--- 1.137/sql/sql_acl.cc 2005-04-14 14:19:45 +02:00
+++ 1.138/sql/sql_acl.cc 2005-05-10 17:48:56 +02:00
@@ -1361,16 +1361,19 @@
acl_cache->clear(1); // Clear locked hostname cache
VOID(pthread_mutex_unlock(&acl_cache->lock));
- char buff[512]; /* Extend with extended password length*/
- ulong query_length=
- my_sprintf(buff,
- (buff,"SET PASSWORD FOR \"%-.120s\"@\"%-.120s\"=\"%-.120s\"",
- acl_user->user ? acl_user->user : "",
- acl_user->host.hostname ? acl_user->host.hostname : "",
- new_password));
- thd->clear_error();
- Query_log_event qinfo(thd, buff, query_length, 0, FALSE);
- mysql_bin_log.write(&qinfo);
+ if (!opt_binlog_row_level && mysql_bin_log.is_open())
+ {
+ char buff[512]; /* Extend with extended password length*/
+ ulong query_length=
+ my_sprintf(buff,
+ (buff,"SET PASSWORD FOR \"%-.120s\"@\"%-.120s\"=\"%-.120s\"",
+ acl_user->user ? acl_user->user : "",
+ acl_user->host.hostname ? acl_user->host.hostname : "",
+ new_password));
+ thd->clear_error();
+ Query_log_event qinfo(thd, buff, query_length, 0, FALSE);
+ mysql_bin_log.write(&qinfo);
+ }
DBUG_RETURN(0);
}
--- 1.238/sql/sql_base.cc 2005-04-30 18:27:18 +02:00
+++ 1.239/sql/sql_base.cc 2005-05-10 17:48:56 +02:00
@@ -566,6 +566,7 @@
table->file->reset();
}
table->in_use=0;
+ DBUG_PRINT("info", ("table->in_use=%p", table->in_use));
if (unused_tables)
{
table->next=unused_tables; /* Link in last */
@@ -954,6 +955,7 @@
share->version=0;
share->flush_version=0;
table->in_use = thd;
+ DBUG_PRINT("info", ("table->in_use=%p", table->in_use));
check_unused();
pthread_mutex_unlock(&LOCK_open);
table->next = thd->open_tables;
@@ -1120,6 +1122,7 @@
table->prev->next=table->next; /* Remove from unused list */
table->next->prev=table->prev;
table->in_use= thd;
+ DBUG_PRINT("info", ("table->in_use=%p", table->in_use));
}
else
{
--- 1.144/sql/sql_insert.cc 2005-05-02 17:06:33 +02:00
+++ 1.145/sql/sql_insert.cc 2005-05-10 17:48:56 +02:00
@@ -2064,7 +2064,7 @@
{
if (last_insert_id)
thd->insert_id(last_insert_id); // For binary log
- if (mysql_bin_log.is_open())
+ if (!opt_binlog_row_level && mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, thd->query, thd->query_length,
table->file->has_transactions(), FALSE);
@@ -2105,7 +2105,7 @@
if (last_insert_id)
thd->insert_id(last_insert_id); // For binary log
/* Write to binlog before commiting transaction */
- if (mysql_bin_log.is_open())
+ if (!opt_binlog_row_level && mysql_bin_log.is_open())
{
if (!error)
thd->clear_error();
--- 1.430/sql/sql_parse.cc 2005-05-09 05:10:43 +02:00
+++ 1.431/sql/sql_parse.cc 2005-05-10 17:48:56 +02:00
@@ -3708,7 +3708,7 @@
lex->columns, lex->grant,
lex->sql_command == SQLCOM_REVOKE);
}
- if (!res && mysql_bin_log.is_open())
+ if (!opt_binlog_row_level && !res && mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
@@ -3728,7 +3728,7 @@
lex->sql_command == SQLCOM_REVOKE);
if (!res)
{
- if (mysql_bin_log.is_open())
+ if (!opt_binlog_row_level && mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
--- 1.241/sql/sql_table.cc 2005-05-03 12:45:08 +02:00
+++ 1.242/sql/sql_table.cc 2005-05-10 17:48:56 +02:00
@@ -1625,7 +1625,9 @@
}
thd->tmp_table_used= 1;
}
- if (!internal_tmp_table && mysql_bin_log.is_open())
+ if (!internal_tmp_table &&
+ !(create_info->options & HA_LEX_CREATE_TMP_TABLE) &&
+ mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
@@ -3543,7 +3545,8 @@
my_free((gptr) new_table,MYF(0));
goto err;
}
- if (mysql_bin_log.is_open())
+ /* We don't replication alter table statement on temporary tables */
+ if (!opt_binlog_row_level && mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
@@ -3679,6 +3682,8 @@
thd->proc_info="end";
if (mysql_bin_log.is_open())
{
+ DBUG_ASSERT(!(opt_binlog_row_level &&
+ (create_info->options & HA_LEX_CREATE_TMP_TABLE)));
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
mysql_bin_log.write(&qinfo);
--- 1.2/mysql-test/t/multi_update-master.opt 2004-03-20 11:29:41 +01:00
+++ 1.3/mysql-test/t/multi_update-master.opt 2005-05-10 17:48:55 +02:00
@@ -1 +1 @@
---set-variable=tmp_table_size=1024
+--set-variable=tmp_table_size=1024 --binlog-format="statement"
--- 1.13/mysql-test/t/disabled.def 2005-05-09 18:30:11 +02:00
+++ 1.14/mysql-test/t/disabled.def 2005-05-10 17:48:55 +02:00
@@ -9,6 +9,7 @@
# Don't use any TAB characters for whitespace.
#
##############################################################################
+federated : row-based allow max 128 cols /Matz
ndb_autodiscover : replication conflict
ndb_autodiscover2 : replication conflict
ndb_cache : replication conflict
@@ -16,9 +17,10 @@
ndb_cache_multi : replication conflict
ndb_cache_multi2 : replication conflict
ndb_insert : Tomas fix sql REPLACE replication conflict
+ps_1general : row-based currently allow max 128 cols /Mats
+rpl000017 : Problem when (re)starting NDB /Matz
rpl_change_master : result mismatch, Mats, Lars check
rpl_deadlock : result mismatch, Mats, Lars check
-ps_1general : row-based currently allow max 128 cols /Mats
myisam : row-based currently allow max 128 cols /Mats
mysql_client_test : row-based currently allow max 128 cols /Mats
range : row-based currently allow max 128 cols /Mats
--- 1.239/sql/ha_ndbcluster.cc 2005-05-09 20:28:56 +02:00
+++ 1.240/sql/ha_ndbcluster.cc 2005-05-10 17:48:55 +02:00
@@ -5045,7 +5045,7 @@
continue;
strxnmov(key, FN_LEN, mysql_data_home,"/",t.database,"/",t.name, NullS);
- const void *data, *pack_data;
+ const void *data= 0, *pack_data= 0;
uint length, pack_length;
int discover= 0;
if (readfrm(key, &data, &length) ||
@@ -5424,14 +5424,17 @@
pthread_mutex_unlock(&ndbcluster_mutex);
}
/* wait for injector thread */
- pthread_mutex_lock(&injector_mutex);
- while (ndb_injector_thread_running > 0)
+ if (ndb_injector_thread_running > 0)
{
- struct timespec abstime;
- set_timespec(abstime, 1);
- pthread_cond_timedwait(&injector_cond,&injector_mutex,&abstime);
+ pthread_mutex_lock(&injector_mutex);
+ while (ndb_injector_thread_running > 0)
+ {
+ struct timespec abstime;
+ set_timespec(abstime, 1);
+ pthread_cond_timedwait(&injector_cond,&injector_mutex,&abstime);
+ }
+ pthread_mutex_unlock(&injector_mutex);
}
- pthread_mutex_unlock(&injector_mutex);
#endif
#if 1
--- 1.6/mysql-test/r/rpl000017.result 2002-10-25 01:46:13 +02:00
+++ 1.7/mysql-test/r/rpl000017.result 2005-05-10 17:48:55 +02:00
@@ -1,4 +1,10 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+stop slave;
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
grant replication slave on *.* to replicate@stripped identified by 'aaaaaaaaaaaaaaab';
start slave;
--- 1.38/mysql-test/t/rpl000001.test 2005-03-02 17:52:26 +01:00
+++ 1.39/mysql-test/t/rpl000001.test 2005-05-10 17:48:55 +02:00
@@ -1,4 +1,5 @@
source include/master-slave.inc;
+source include/have_binlog_format_statement.inc
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
--- 1.16/mysql-test/t/rpl000012.test 2003-01-06 00:48:53 +01:00
+++ 1.17/mysql-test/t/rpl000012.test 2005-05-10 17:48:55 +02:00
@@ -1,4 +1,5 @@
source include/master-slave.inc;
+source include/have_binlog_format_statement.inc
connection master;
create table t2 (n int);
--- 1.12/mysql-test/t/rpl000017.test 2004-07-15 03:18:50 +02:00
+++ 1.13/mysql-test/t/rpl000017.test 2005-05-10 17:48:55 +02:00
@@ -1,7 +1,7 @@
-connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
+source include/master-slave.inc;
+connection slave;
+stop slave;
connection master;
-reset master;
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
grant replication slave on *.* to replicate@stripped identified by 'aaaaaaaaaaaaaaab';
connection slave;
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.1839) | tomas | 10 May |