Below is the list of changes that have just been committed into a local
4.1 repository of stewart. When stewart 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@stripped, 2006-09-20 17:09:53+10:00, stewart@willster.(none) +3 -0
Merge willster.(none):/home/stewart/Documents/MySQL/4.1/ndb
into willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
MERGE: 1.2532.1.32
sql/ha_ndbcluster.cc@stripped, 2006-09-20 17:09:49+10:00, stewart@willster.(none) +0 -0
Auto merged
MERGE: 1.190.1.1
sql/ha_ndbcluster.h@stripped, 2006-09-20 17:09:50+10:00, stewart@willster.(none) +0 -0
Auto merged
MERGE: 1.59.1.1
sql/sql_select.cc@stripped, 2006-09-20 17:09:50+10:00, stewart@willster.(none) +0 -0
Auto merged
MERGE: 1.451.1.14
# 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: stewart
# Host: willster.(none)
# Root: /home/stewart/Documents/MySQL/4.1/bug19914-mk2/RESYNC
--- 1.456/sql/sql_select.cc 2006-09-20 17:09:57 +10:00
+++ 1.457/sql/sql_select.cc 2006-09-20 17:09:58 +10:00
@@ -537,6 +537,8 @@
{
if (res > 1)
{
+ thd->fatal_error();
+ error= res;
DBUG_RETURN(1);
}
if (res < 0)
--- 1.191/sql/ha_ndbcluster.cc 2006-09-20 17:09:58 +10:00
+++ 1.192/sql/ha_ndbcluster.cc 2006-09-20 17:09:58 +10:00
@@ -161,6 +161,7 @@
if (m_batch_execute)
return 0;
#endif
+ h->release_completed_operations(trans);
return trans->execute(NoCommit,AbortOnError,h->m_force_send);
}
@@ -194,6 +195,7 @@
if (m_batch_execute)
return 0;
#endif
+ h->release_completed_operations(trans);
return trans->execute(NoCommit, AO_IgnoreError,h->m_force_send);
}
@@ -2749,6 +2751,25 @@
if (!cursor)
DBUG_RETURN(1);
+ if (m_lock_tuple)
+ {
+ /*
+ Lock level m_lock.type either TL_WRITE_ALLOW_WRITE
+ (SELECT FOR UPDATE) or TL_READ_WITH_SHARED_LOCKS (SELECT
+ LOCK WITH SHARE MODE) and row was not explictly unlocked
+ with unlock_row() call
+ */
+ NdbOperation *op;
+ // Lock row
+ DBUG_PRINT("info", ("Keeping lock on scanned row"));
+
+ if (!(op= m_active_cursor->lockTuple()))
+ {
+ m_lock_tuple= false;
+ ERR_RETURN(trans->getNdbError());
+ }
+ m_ops_pending++;
+ }
m_lock_tuple= false;
if (m_ops_pending)
{
@@ -5355,6 +5376,19 @@
my_close(file,MYF(0));
}
DBUG_RETURN(error);
+}
+
+void
+ha_ndbcluster::release_completed_operations(NdbConnection *trans)
+{
+ if (trans->hasBlobOperation())
+ {
+ /* We are reading/writing BLOB fields,
+ releasing operation records is unsafe
+ */
+ return;
+ }
+ trans->releaseCompletedOperations();
}
int
--- 1.60/sql/ha_ndbcluster.h 2006-09-20 17:09:58 +10:00
+++ 1.61/sql/ha_ndbcluster.h 2006-09-20 17:09:58 +10:00
@@ -262,6 +262,8 @@
void no_uncommitted_rows_init(THD *);
void no_uncommitted_rows_reset(THD *);
+ void release_completed_operations(NdbConnection*);
+
friend int execute_no_commit(ha_ndbcluster*, NdbConnection*);
friend int execute_commit(ha_ndbcluster*, NdbConnection*);
friend int execute_no_commit_ie(ha_ndbcluster*, NdbConnection*);
| Thread |
|---|
| • bk commit into 4.1 tree (stewart:1.2534) | Stewart Smith | 20 Sep |