Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2434 07/02/12 12:44:35 tomas@stripped +8 -0
Merge poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
into poseidon.mysql.com:/home/tomas/mysql-5.1-telco-next
storage/ndb/src/ndbapi/NdbScanOperation.cpp
1.109 07/02/12 12:44:23 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.82 07/02/12 12:44:23 tomas@stripped +0 -5
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp
1.85 07/02/12 12:44:23 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp
1.37 07/02/12 12:44:23 tomas@stripped +0 -0
Auto merged
sql/mysqld.cc
1.616 07/02/12 12:44:23 tomas@stripped +0 -0
Auto merged
sql/item_func.cc
1.354 07/02/12 12:44:22 tomas@stripped +0 -0
Auto merged
sql/ha_ndbcluster.cc
1.409 07/02/12 12:44:22 tomas@stripped +0 -0
Auto merged
configure.in
1.426 07/02/12 12:44:22 tomas@stripped +0 -0
Auto merged
# 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: tomas
# Host: poseidon.mysql.com
# Root: /home/tomas/mysql-5.1-telco-next/RESYNC
--- 1.425/configure.in 2007-02-05 18:29:22 +07:00
+++ 1.426/configure.in 2007-02-12 12:44:22 +07:00
@@ -7,8 +7,13 @@
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.1.16-beta)
+AM_INIT_AUTOMAKE(mysql, 5.1.16-ndb-6.1.2)
AM_CONFIG_HEADER(config.h)
+
+NDB_VERSION_MAJOR=6
+NDB_VERSION_MINOR=1
+NDB_VERSION_BUILD=2
+NDB_VERSION_STATUS="-beta"
PROTOCOL_VERSION=10
DOT_FRM_VERSION=6
--- 1.615/sql/mysqld.cc 2007-02-10 03:04:11 +07:00
+++ 1.616/sql/mysqld.cc 2007-02-12 12:44:23 +07:00
@@ -413,7 +413,7 @@
char opt_ndb_constrbuf[1024];
unsigned opt_ndb_constrbuf_len= 0;
my_bool opt_ndb_shm, opt_ndb_optimized_node_selection;
-ulong opt_ndb_cache_check_time;
+ulong opt_ndb_cache_check_time, opt_ndb_wait_connected;
const char *opt_ndb_mgmd;
ulong opt_ndb_nodeid;
ulong ndb_extra_logging;
@@ -4769,6 +4769,7 @@
OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS,
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
OPT_NDB_SHM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_NDB_CACHE_CHECK_TIME,
+ OPT_NDB_WAIT_CONNECTED,
OPT_NDB_MGMD, OPT_NDB_NODEID,
OPT_NDB_DISTRIBUTION,
OPT_NDB_INDEX_STAT_ENABLE,
@@ -5489,6 +5490,10 @@
(gptr*) &global_system_variables.ndb_use_copying_alter_table,
(gptr*) &global_system_variables.ndb_use_copying_alter_table,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ { "ndb-wait-connected", OPT_NDB_WAIT_CONNECTED,
+ "Time (in seconds) for mysqld to wait for connection to cluster management and data nodes.",
+ (gptr*) &opt_ndb_wait_connected, (gptr*) &opt_ndb_wait_connected,
+ 0, GET_ULONG, REQUIRED_ARG, 0, 0, LONG_TIMEOUT, 0, 0, 0},
{"new", 'n', "Use very new possible 'unsafe' functions.",
(gptr*) &global_system_variables.new_mode,
(gptr*) &max_system_variables.new_mode,
--- 1.36/storage/ndb/src/common/debugger/EventLogger.cpp 2007-02-12 10:38:40 +07:00
+++ 1.37/storage/ndb/src/common/debugger/EventLogger.cpp 2007-02-12 12:44:23 +07:00
@@ -626,16 +626,18 @@
if(theData[2] == TransporterErrorString[i].errorNum)
{
BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error: %s",
+ "Transporter to node %d reported error 0x%x: %s",
theData[1],
+ theData[2],
TransporterErrorString[i].errorString);
break;
}
}
if(i == lenth)
BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error: no such error",
- theData[1]);
+ "Transporter to node %d reported error 0x%x: unknown error",
+ theData[1],
+ theData[2]);
}
void getTextTransporterWarning(QQQQ) {
getTextTransporterError(m_text, m_text_len, theData, len);
--- 1.108/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2007-02-06 04:13:44 +07:00
+++ 1.109/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2007-02-12 12:44:23 +07:00
@@ -1225,7 +1225,7 @@
* so it's safe to use [tIndexAttrId]
* (instead of looping as is NdbOperation::equal_impl)
*/
- if(type == BoundEQ && tDistrKey)
+ if(type == BoundEQ && tDistrKey && !m_multi_range)
{
theNoOfTupKeyLeft--;
return handle_distribution_key(valPtr, sizeInWords);
@@ -1311,7 +1311,8 @@
const bool order_by = scan_flags & SF_OrderBy;
const bool order_desc = scan_flags & SF_Descending;
const bool read_range_no = scan_flags & SF_ReadRangeNo;
-
+ m_multi_range = scan_flags & SF_MultiRange;
+
int res = NdbScanOperation::readTuples(lm, scan_flags, parallel, batch);
if(!res && read_range_no)
{
@@ -1792,6 +1793,12 @@
int
NdbIndexScanOperation::end_of_bound(Uint32 no)
{
+ DBUG_ENTER("end_of_bound");
+ DBUG_PRINT("info", ("Range number %u", no));
+ /* Check that SF_MultiRange has been specified if more
+ than one range is specified */
+ if (no > 0 && !m_multi_range)
+ DBUG_RETURN(-1);
if(no < (1 << 13)) // Only 12-bits no of ranges
{
Uint32 bound_head = * m_first_bound_word;
@@ -1800,9 +1807,9 @@
m_first_bound_word = theKEYINFOptr + theTotalNrOfKeyWordInSignal;;
m_this_bound_start = theTupKeyLen;
- return 0;
+ DBUG_RETURN(0);
}
- return -1;
+ DBUG_RETURN(-1);
}
int
--- 1.408/sql/ha_ndbcluster.cc 2007-02-09 23:01:21 +07:00
+++ 1.409/sql/ha_ndbcluster.cc 2007-02-12 12:44:22 +07:00
@@ -47,6 +47,7 @@
extern my_bool opt_ndb_optimized_node_selection;
extern const char *opt_ndbcluster_connectstring;
extern ulong opt_ndb_cache_check_time;
+extern ulong opt_ndb_wait_connected;
// ndb interface initialization/cleanup
#ifdef __cplusplus
@@ -192,9 +193,15 @@
static int update_status_variables(Ndb_cluster_connection *c)
{
- ndb_cluster_node_id= c->node_id();
- ndb_connected_port= c->get_connected_port();
- ndb_connected_host= c->get_connected_host();
+ ndb_connected_port= c->get_connected_port();
+ ndb_connected_host= c->get_connected_host();
+ if (ndb_cluster_node_id != c->node_id())
+ {
+ ndb_cluster_node_id= c->node_id();
+ sql_print_information("NDB: NodeID is %d, management server '%s:%u'",
+ ndb_cluster_node_id, ndb_connected_host,
+ ndb_connected_port);
+ }
ndb_number_of_replicas= 0;
ndb_number_of_ready_data_nodes= c->get_no_ready();
ndb_number_of_data_nodes= c->no_db_nodes();
@@ -6801,13 +6808,49 @@
goto ndbcluster_init_error;
}
- if ((res= g_ndb_cluster_connection->connect(0,0,0)) == 0)
+ /* Connect to management server */
+
+ struct timeval end_time;
+ gettimeofday(&end_time, 0);
+ end_time.tv_sec+= opt_ndb_wait_connected;
+
+ while ((res= g_ndb_cluster_connection->connect(0,0,0)) == 1)
+ {
+ struct timeval now_time;
+ gettimeofday(&now_time, 0);
+ if (now_time.tv_sec > end_time.tv_sec ||
+ (now_time.tv_sec == end_time.tv_sec &&
+ now_time.tv_usec >= end_time.tv_usec))
+ break;
+ sleep(1);
+ }
+
+ if (res == 0)
{
connect_callback();
DBUG_PRINT("info",("NDBCLUSTER storage engine at %s on port %d",
g_ndb_cluster_connection->get_connected_host(),
g_ndb_cluster_connection->get_connected_port()));
- g_ndb_cluster_connection->wait_until_ready(10,3);
+ {
+ struct timeval now_time;
+ gettimeofday(&now_time, 0);
+ ulong wait_until_ready_time= end_time.tv_sec - now_time.tv_sec;
+ if (wait_until_ready_time < 1)
+ wait_until_ready_time= 1;
+ res= g_ndb_cluster_connection->wait_until_ready(wait_until_ready_time,3);
+ }
+ if (res == 0)
+ {
+ sql_print_information("NDB: all storage nodes connected");
+ }
+ else if (res > 0)
+ {
+ sql_print_information("NDB: some storage nodes connected");
+ }
+ else if (res < 0)
+ {
+ sql_print_information("NDB: no storage nodes connected (timed out)");
+ }
}
else if (res == 1)
{
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2434) | tomas | 12 Feb |