[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-internals
Subject:    bk commit into 4.1 tree (mskold:1.2327)
From:       Martin Skold <Martin.Skold () mysql ! com>
Date:       2005-06-29 14:13:59
Message-ID: 200506291413.j5TEDxhK032432 () localhost ! localdomain
[Download RAW message or body]

Below is the list of changes that have just been committed into a local
4.1 repository of marty. When marty 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.2327 05/06/29 16:13:50 mskold@mysql.com +2 -0
  Changed delete_row to always get key from record argument

  sql/ha_ndbcluster.h
    1.55 05/06/29 16:13:22 mskold@mysql.com +2 -3
    Changed delete_row to always get key from record argument

  sql/ha_ndbcluster.cc
    1.164 05/06/29 16:13:22 mskold@mysql.com +12 -16
    Changed delete_row to always get key from record argument

# 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:	mskold
# Host:	blowfish.ndb.mysql.com
# Root:	/usr/local/home/marty/MySQL/mysql-4.1

--- 1.163/sql/ha_ndbcluster.cc	2005-06-27 15:47:38 +02:00
+++ 1.164/sql/ha_ndbcluster.cc	2005-06-29 16:13:22 +02:00
@@ -1113,12 +1113,12 @@
 }
 
 
-int ha_ndbcluster::set_primary_key_from_old_data(NdbOperation *op, const byte *old_data)
+int ha_ndbcluster::set_primary_key_from_record(NdbOperation *op, const byte *old_data)
 {
   KEY* key_info= table->key_info + table->primary_key;
   KEY_PART_INFO* key_part= key_info->key_part;
   KEY_PART_INFO* end= key_part+key_info->key_parts;
-  DBUG_ENTER("set_primary_key_from_old_data");
+  DBUG_ENTER("set_primary_key_from_record");
 
   for (; key_part != end; key_part++) 
   {
@@ -1130,7 +1130,7 @@
   DBUG_RETURN(0);
 }
 
-
+/*
 int ha_ndbcluster::set_primary_key(NdbOperation *op)
 {
   DBUG_ENTER("set_primary_key");
@@ -1147,7 +1147,7 @@
   }
   DBUG_RETURN(0);
 }
-
+*/
 
 /*
   Read one record from NDB using primary key
@@ -1242,7 +1242,7 @@
     ERR_RETURN(trans->getNdbError());
 
     int res;
-    if ((res= set_primary_key_from_old_data(op, old_data)))
+    if ((res= set_primary_key_from_record(op, old_data)))
       ERR_RETURN(trans->getNdbError());
     
   // Read all unreferenced non-key field(s)
@@ -1273,7 +1273,7 @@
   Peek to check if a particular row already exists
 */
 
-int ha_ndbcluster::peek_row()
+int ha_ndbcluster::peek_row(const byte *record)
 {
   NdbConnection *trans= m_active_trans;
   NdbOperation *op;
@@ -1287,7 +1287,7 @@
     ERR_RETURN(trans->getNdbError());
                                                                                 
   int res;
-  if ((res= set_primary_key(op)))
+  if ((res= set_primary_key_from_record(op, record)))
     ERR_RETURN(trans->getNdbError());
                                                                                 
   if (execute_no_commit_ie(this,trans) != 0)
@@ -1841,7 +1841,7 @@
 
   if(m_ignore_dup_key && table->primary_key != MAX_KEY)
   {
-    int peek_res= peek_row();
+    int peek_res= peek_row(record);
     
     if (!peek_res) 
     {
@@ -1891,9 +1891,7 @@
       m_skip_auto_increment= !auto_increment_column_changed;
     }
 
-    if ((res= (m_primary_key_update ?
-               set_primary_key_from_old_data(op, record)
-               : set_primary_key(op))))
+    if ((res= set_primary_key_from_record(op, record)))
       return res;  
   }
 
@@ -2110,7 +2108,7 @@
     else 
     {
       int res;
-      if ((res= set_primary_key_from_old_data(op, old_data)))
+      if ((res= set_primary_key_from_record(op, old_data)))
 	DBUG_RETURN(res);
     }
   }
@@ -2191,10 +2189,8 @@
     else 
     {
       int res;
-      if ((res= (m_primary_key_update ?
-		 set_primary_key_from_old_data(op, record)
-		 : set_primary_key(op))))
-	  return res;  
+      if ((res= set_primary_key_from_record(op, record)))
+        return res;  
     }
   }
   

--- 1.54/sql/ha_ndbcluster.h	2005-06-08 13:31:56 +02:00
+++ 1.55/sql/ha_ndbcluster.h	2005-06-29 16:13:22 +02:00
@@ -168,7 +168,7 @@
 
   int pk_read(const byte *key, uint key_len, byte *buf);
   int complemented_pk_read(const byte *old_data, byte *new_data);
-  int peek_row();
+  int peek_row(const byte *record);
   int unique_index_read(const byte *key, uint key_len, 
 			byte *buf);
   int ordered_index_scan(const key_range *start_key,
@@ -196,8 +196,7 @@
   friend int g_get_ndb_blobs_value(NdbBlob *ndb_blob, void *arg);
   int get_ndb_blobs_value(NdbBlob *last_ndb_blob);
   int set_primary_key(NdbOperation *op, const byte *key);
-  int set_primary_key(NdbOperation *op);
-  int set_primary_key_from_old_data(NdbOperation *op, const byte *old_data);
+  int set_primary_key_from_record(NdbOperation *op, const byte *old_data);
   int set_bounds(NdbIndexScanOperation *ndb_op, const key_range *keys[2]);
   int key_cmp(uint keynr, const byte * old_row, const byte * new_row);
   void print_results();

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals?unsub=mysql-internals@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic