Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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.2200 06/03/01 15:29:38 msvensson@shellback.(none) +2 -0
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into shellback.(none):/home/msvensson/mysql/mysql-5.1
sql/ha_ndbcluster.cc
1.278 06/03/01 15:29:31 msvensson@shellback.(none) +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.77 06/03/01 15:29:31 msvensson@shellback.(none) +0 -0
Auto merged
# 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: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-5.1/RESYNC
--- 1.76/mysql-test/mysql-test-run.pl 2006-02-28 11:03:12 +01:00
+++ 1.77/mysql-test/mysql-test-run.pl 2006-03-01 15:29:31 +01:00
@@ -1508,8 +1508,8 @@
sub rm_ndbcluster_tables ($) {
my $dir= shift;
- foreach my $bin ( glob("$dir/cluster_replication/apply_status*"),
- glob("$dir/cluster_replication/schema*") )
+ foreach my $bin ( glob("$dir/cluster/apply_status*"),
+ glob("$dir/cluster/schema*") )
{
unlink($bin);
}
--- 1.277/sql/ha_ndbcluster.cc 2006-02-28 14:45:25 +01:00
+++ 1.278/sql/ha_ndbcluster.cc 2006-03-01 15:29:31 +01:00
@@ -1684,15 +1684,16 @@
/*
Read one complementing record from NDB using primary key from old_data
+ or hidden key
*/
-int ha_ndbcluster::complemented_pk_read(const byte *old_data, byte *new_data,
- uint32 old_part_id)
+int ha_ndbcluster::complemented_read(const byte *old_data, byte *new_data,
+ uint32 old_part_id)
{
uint no_fields= table_share->fields, i;
NdbTransaction *trans= m_active_trans;
NdbOperation *op;
- DBUG_ENTER("complemented_pk_read");
+ DBUG_ENTER("complemented_read");
m_write_op= FALSE;
if (ha_get_all_bit_in_read_set())
@@ -1706,9 +1707,17 @@
if (!(op= trans->getNdbOperation((const NDBTAB *) m_table)) ||
op->readTuple(lm) != 0)
ERR_RETURN(trans->getNdbError());
- int res;
- if ((res= set_primary_key_from_record(op, old_data)))
- ERR_RETURN(trans->getNdbError());
+ if (table_share->primary_key != MAX_KEY)
+ {
+ if (set_primary_key_from_record(op, old_data))
+ ERR_RETURN(trans->getNdbError());
+ }
+ else
+ {
+ // This table has no primary key, use "hidden" primary key
+ if (set_hidden_key(op, table->s->fields, m_ref))
+ ERR_RETURN(op->getNdbError());
+ }
if (m_use_partition_function)
op->setPartitionId(old_part_id);
@@ -2501,19 +2510,23 @@
DBUG_RETURN(error);
}
- /* Check for update of primary key for special handling */
- if ((table_share->primary_key != MAX_KEY) &&
- (key_cmp(table_share->primary_key, old_data, new_data)) ||
+ /*
+ * Check for update of primary key or partition change
+ * for special handling
+ */
+ if (((table_share->primary_key != MAX_KEY) &&
+ key_cmp(table_share->primary_key, old_data, new_data)) ||
(old_part_id != new_part_id))
{
int read_res, insert_res, delete_res, undo_res;
- DBUG_PRINT("info", ("primary key update, doing pk read+delete+insert"));
+ DBUG_PRINT("info", ("primary key update or partition change, "
+ "doing read+delete+insert"));
// Get all old fields, since we optimize away fields not in query
- read_res= complemented_pk_read(old_data, new_data, old_part_id);
+ read_res= complemented_read(old_data, new_data, old_part_id);
if (read_res)
{
- DBUG_PRINT("info", ("pk read failed"));
+ DBUG_PRINT("info", ("read failed"));
DBUG_RETURN(read_res);
}
// Delete old row
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2200) | msvensson | 1 Mar |