Below is the list of changes that have just been committed into a local
5.0 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.2041 05/10/14 11:28:01 mskold@stripped +1 -0
Merge mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
sql/ha_ndbcluster.cc
1.216 05/10/14 11:27:56 mskold@stripped +1 -6
merge
# 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-5.0/RESYNC
--- 1.215/sql/ha_ndbcluster.cc 2005-10-11 23:59:47 +02:00
+++ 1.216/sql/ha_ndbcluster.cc 2005-10-14 11:27:56 +02:00
@@ -3224,7 +3224,7 @@
if (!thd_ndb->lock_count++)
{
PRINT_OPTION_FLAGS(thd);
- if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN |
OPTION_TABLE_LOCK)))
+ if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
{
// Autocommit transaction
DBUG_ASSERT(!thd_ndb->stmt);
@@ -3398,11 +3398,11 @@
}
/*
- When using LOCK TABLE's external_lock is only called when the actual
- TABLE LOCK is done.
- Under LOCK TABLES, each used tables will force a call to start_stmt.
- Ndb doesn't currently support table locks, and will do ordinary
- startTransaction for each transaction/statement.
+ Start a transaction for running a statement if one is not
+ already running in a transaction. This will be the case in
+ a BEGIN; COMMIT; block
+ When using LOCK TABLE's external_lock will start a transaction
+ since ndb does not currently does not support table locking
*/
int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
@@ -3412,17 +3412,10 @@
PRINT_OPTION_FLAGS(thd);
Thd_ndb *thd_ndb= get_thd_ndb(thd);
- NdbTransaction *trans= thd_ndb->stmt;
+ NdbTransaction *trans= (thd_ndb->stmt)?thd_ndb->stmt:thd_ndb->all;
if (!trans){
Ndb *ndb= thd_ndb->ndb;
DBUG_PRINT("trans",("Starting transaction stmt"));
-
-#if 0
- NdbTransaction *tablock_trans= thd_ndb->all;
- DBUG_PRINT("info", ("tablock_trans: %x", (UintPtr)tablock_trans));
- DBUG_ASSERT(tablock_trans);
-// trans= ndb->hupp(tablock_trans);
-#endif
trans= ndb->startTransaction();
if (trans == NULL)
ERR_RETURN(ndb->getNdbError());
@@ -4187,7 +4180,12 @@
--retries &&
ndb->getNdbError().status == NdbError::TemporaryError);
if (auto_value == NDB_FAILED_AUTO_INCREMENT)
- ERR_RETURN(ndb->getNdbError());
+ {
+ const NdbError err= ndb->getNdbError();
+ sql_print_error("Error %lu in ::get_auto_increment(): %s",
+ (ulong) err.code, err.message);
+ DBUG_RETURN(~(ulonglong) 0);
+ }
DBUG_RETURN((longlong)auto_value);
}
| Thread |
|---|
| • bk commit into 5.0 tree (mskold:1.2041) | Martin Skold | 14 Oct |