summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/myisam/ft_parser.c4
-rw-r--r--storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp9
-rw-r--r--storage/ndb/src/mgmapi/mgmapi.cpp8
3 files changed, 18 insertions, 3 deletions
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c
index a348b9fe38f..fb2ace0fa07 100644
--- a/storage/myisam/ft_parser.c
+++ b/storage/myisam/ft_parser.c
@@ -160,8 +160,10 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1))
if (true_word_char(cs,*doc))
mwc=0;
- else if (!misc_word_char(*doc) || mwc++)
+ else if (!misc_word_char(*doc) || mwc)
break;
+ else
+ mwc++;
param->prev='A'; /* be sure *prev is true_word_char */
word->len= (uint)(doc-word->pos) - mwc;
diff --git a/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp
index 1f23bd7543c..3b843b6708b 100644
--- a/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp
+++ b/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp
@@ -342,14 +342,21 @@ ConfigRetriever::setNodeId(Uint32 nodeid)
Uint32
ConfigRetriever::allocNodeId(int no_retries, int retry_delay_in_seconds)
{
+ int res;
_ownNodeId= 0;
if(m_handle != 0)
{
while (1)
{
- int res= ndb_mgm_alloc_nodeid(m_handle, m_version, m_node_type);
+ if(!ndb_mgm_is_connected(m_handle))
+ if(!ndb_mgm_connect(m_handle, 0, 0, 0))
+ goto next;
+
+ res= ndb_mgm_alloc_nodeid(m_handle, m_version, m_node_type);
if(res >= 0)
return _ownNodeId= (Uint32)res;
+
+ next:
if (no_retries == 0)
break;
no_retries--;
diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp
index 2b31f0e638d..79284964186 100644
--- a/storage/ndb/src/mgmapi/mgmapi.cpp
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp
@@ -336,10 +336,16 @@ ndb_mgm_call(NdbMgmHandle handle, const ParserRow<ParserDummy> *command_reply,
const Properties* p = parser.parse(ctx, session);
if (p == NULL){
if(!ndb_mgm_is_connected(handle)) {
- return NULL;
+ DBUG_RETURN(NULL);
}
else
{
+ if(ctx.m_status==Parser_t::Eof
+ || ctx.m_status==Parser_t::NoLine)
+ {
+ ndb_mgm_disconnect(handle);
+ DBUG_RETURN(NULL);
+ }
/**
* Print some info about why the parser returns NULL
*/