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-10-20 00:10:44+10:00, stewart@willster.(none) +2 -0
post BUG#19914 patch fix to fix failing ndb_a* tests
in autodiscover test, we "select * from t4" where t4 has just been
dropped by ndb_drop_table (so no longer exists in cluster but does on
local disk). The check for this (apart from just returning table doesn't
exist on TC) is in ndb_err (which is called in all error cases in normal
handler operations).
sql/ha_ndbcluster.cc@stripped, 2006-10-20 00:10:40+10:00, stewart@willster.(none) +19 -6
call ndb_err on failure of info call to have correct autodiscover behaviour.
sql/ha_ndbcluster.h@stripped, 2006-10-20 00:10:40+10:00, stewart@willster.(none) +6 -2
mark ndb_err as usable by the C functions in ha_ndbcluster
# 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
--- 1.192/sql/ha_ndbcluster.cc 2006-10-20 00:10:48 +10:00
+++ 1.193/sql/ha_ndbcluster.cc 2006-10-20 00:10:48 +10:00
@@ -85,7 +85,7 @@
static int unpackfrm(const void **data, uint *len,
const void* pack_data);
-static int ndb_get_table_statistics(Ndb*, const char *,
+static int ndb_get_table_statistics(ha_ndbcluster*, Ndb*, const char *,
Uint64* rows, Uint64* commits);
@@ -275,7 +275,8 @@
Ndb *ndb= get_ndb();
Uint64 rows;
ndb->setDatabaseName(m_dbname);
- if((result= ndb_get_table_statistics(ndb, m_tabname, &rows, 0)) == 0){
+ if((result= ndb_get_table_statistics(this, ndb, m_tabname, &rows, 0)) == 0)
+ {
info->records= rows;
}
}
@@ -2911,7 +2912,7 @@
Uint64 rows= 100;
ndb->setDatabaseName(m_dbname);
if (current_thd->variables.ndb_use_exact_count)
- result= ndb_get_table_statistics(ndb, m_tabname, &rows, 0);
+ result= ndb_get_table_statistics(this, ndb, m_tabname, &rows, 0);
records= rows;
}
}
@@ -5261,13 +5262,14 @@
static
int
-ndb_get_table_statistics(Ndb* ndb, const char * table,
+ndb_get_table_statistics(ha_ndbcluster* file, Ndb* ndb, const char * table,
Uint64* row_count, Uint64* commit_count)
{
DBUG_ENTER("ndb_get_table_statistics");
DBUG_PRINT("enter", ("table: %s", table));
NdbConnection* pTrans;
NdbError error;
+ int reterr= 0;
int retries= 10;
int retry_sleep= 30 * 1000; /* 30 milliseconds */
@@ -5336,6 +5338,16 @@
DBUG_RETURN(0);
retry:
+ if (file)
+ {
+ reterr= file->ndb_err(pTrans);
+ }
+ else
+ {
+ const NdbError& tmp= error;
+ ERR_PRINT(tmp);
+ reterr= ndb_to_mysql_error(&tmp);
+ }
if (pTrans)
{
ndb->closeTransaction(pTrans);
@@ -5348,8 +5360,9 @@
}
break;
} while(1);
- DBUG_PRINT("exit", ("failed, error %u(%s)", error.code, error.message));
- ERR_RETURN(error);
+ DBUG_PRINT("exit", ("failed, reterr: %u, NdbError %u(%s)", reterr,
+ error.code, error.message));
+ DBUG_RETURN(reterr);
}
/*
--- 1.61/sql/ha_ndbcluster.h 2006-10-20 00:10:48 +10:00
+++ 1.62/sql/ha_ndbcluster.h 2006-10-20 00:10:48 +10:00
@@ -153,7 +153,12 @@
static void set_dbname(const char *pathname, char *dbname);
static void set_tabname(const char *pathname, char *tabname);
-
+
+ /*
+ * Internal to ha_ndbcluster, used by C functions
+ */
+ int ndb_err(NdbConnection*);
+
private:
int alter_table_name(const char *to);
int drop_table();
@@ -206,7 +211,6 @@
longlong get_auto_increment();
void invalidate_dictionary_cache(bool global);
- int ndb_err(NdbConnection*);
bool uses_blob_value(bool all_fields);
int write_ndb_file();
| Thread |
|---|
| • bk commit into 4.1 tree (stewart:1.2532) BUG#19914 | Stewart Smith | 19 Oct |