Below is the list of changes that have just been committed into a local
5.0 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-23 23:57:28+10:00, stewart@willster.(none) +3 -0
Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2-merge2
into willster.(none):/home/stewart/Documents/MySQL/5.0/ndb
MERGE: 1.1616.2144.186
sql/ha_ndbcluster.cc@stripped, 2006-10-23 23:57:24+10:00, stewart@willster.(none) +3 -9
merge
MERGE: 1.114.3.77
sql/ha_ndbcluster.h@stripped, 2006-10-23 23:57:25+10:00, stewart@willster.(none) +3 -3
merge
MERGE: 1.40.6.18
sql/sql_select.cc@stripped, 2006-10-23 23:50:55+10:00, stewart@willster.(none) +0 -0
Auto merged
MERGE: 1.216.125.11
# 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/5.0/ndb/RESYNC
--- 1.281/sql/ha_ndbcluster.cc 2006-10-23 23:57:34 +10:00
+++ 1.282/sql/ha_ndbcluster.cc 2006-10-23 23:57:34 +10:00
@@ -114,7 +114,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*, bool, Ndb*, const char *,
struct Ndb_statistics *);
// Util thread variables
@@ -372,7 +372,7 @@
Ndb *ndb= get_ndb();
struct Ndb_statistics stat;
ndb->setDatabaseName(m_dbname);
- if ((result= ndb_get_table_statistics(ndb, m_tabname, &stat)) == 0){
+ if ((result= ndb_get_table_statistics(ndb, true, m_tabname, &stat)) == 0){
mean_rec_length= stat.row_size;
data_file_length= stat.fragment_memory;
info->records= stat.row_count;
@@ -383,7 +383,8 @@
if (get_thd_ndb(thd)->error)
info->no_uncommitted_rows_count= 0;
}
- records= info->records+ info->no_uncommitted_rows_count;
+ if(result==0)
+ records= info->records+ info->no_uncommitted_rows_count;
DBUG_RETURN(result);
}
@@ -3118,7 +3119,7 @@
struct Ndb_statistics stat;
ndb->setDatabaseName(m_dbname);
if (current_thd->variables.ndb_use_exact_count &&
- (result= ndb_get_table_statistics(ndb, m_tabname, &stat)) == 0)
+ (result= ndb_get_table_statistics(ndb, true, m_tabname, &stat)) == 0)
{
mean_rec_length= stat.row_size;
data_file_length= stat.fragment_memory;
@@ -4756,7 +4757,15 @@
res= get_metadata(name);
if (!res)
- info(HA_STATUS_VARIABLE | HA_STATUS_CONST);
+ {
+ Ndb *ndb= get_ndb();
+ ndb->setDatabaseName(m_dbname);
+ Uint64 rows= 0;
+ res= ndb_get_table_statistics(NULL, false, ndb, m_tabname, &rows, 0);
+ records= rows;
+ if(!res)
+ res= info(HA_STATUS_CONST);
+ }
DBUG_RETURN(res);
}
@@ -5899,12 +5908,13 @@
static
int
-ndb_get_table_statistics(Ndb* ndb, const char * table,
+ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb,
struct Ndb_statistics * ndbstat)
{
NdbTransaction* pTrans;
NdbError error;
int retries= 10;
+ int reterr= 0;
int retry_sleep= 30 * 1000; /* 30 milliseconds */
char buff[22], buff2[22], buff3[22], buff4[22];
DBUG_ENTER("ndb_get_table_statistics");
@@ -5995,6 +6005,19 @@
DBUG_RETURN(0);
retry:
+ if(report_error)
+ {
+ 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);
@@ -6007,8 +6030,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.101/sql/ha_ndbcluster.h 2006-10-23 23:57:34 +10:00
+++ 1.102/sql/ha_ndbcluster.h 2006-10-23 23:57:34 +10:00
@@ -583,6 +583,12 @@
void cond_pop();
uint8 table_cache_type();
+
+ /*
+ * Internal to ha_ndbcluster, used by C functions
+ */
+ int ndb_err(NdbTransaction*);
+
my_bool register_query_cache_table(THD *thd, char *table_key,
uint key_length,
qc_engine_callback *engine_callback,
@@ -647,8 +653,8 @@
ulonglong get_auto_increment();
void invalidate_dictionary_cache(bool global);
- int ndb_err(NdbTransaction*);
- bool uses_blob_value(bool all_fields);
+
+bool uses_blob_value(bool all_fields);
char *update_table_comment(const char * comment);
| Thread |
|---|
| • bk commit into 5.0 tree (stewart:1.2267) | Stewart Smith | 23 Oct |