summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <lars@dl145j.mysql.com>2006-06-21 13:51:28 +0200
committerunknown <lars@dl145j.mysql.com>2006-06-21 13:51:28 +0200
commit964ec15c4dbc643a72b3ced7c7a30b303c16322a (patch)
treecdcd9a911a0d89d4193d0522f0ff63c8c6671f9f /storage
parent08240e86ed41a0add5a68cfb5221ccf96df8c796 (diff)
parent7778aa996c45b27b39a56fb3168d4d513afeb5f9 (diff)
downloadmariadb-git-964ec15c4dbc643a72b3ced7c7a30b303c16322a.tar.gz
Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge mysql-test/t/disabled.def: Auto merged sql/sql_insert.cc: Auto merged
Diffstat (limited to 'storage')
-rw-r--r--storage/myisam/ft_parser.c32
-rw-r--r--storage/myisam/ft_update.c5
-rw-r--r--storage/myisam/ftdefs.h5
-rw-r--r--storage/ndb/Makefile.am3
-rw-r--r--storage/ndb/include/mgmapi/ndbd_exit_codes.h4
-rw-r--r--storage/ndb/include/util/ConfigValues.hpp1
-rw-r--r--storage/ndb/src/common/transporter/TransporterRegistry.cpp2
-rw-r--r--storage/ndb/src/common/util/ConfigValues.cpp8
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp5
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp3
-rw-r--r--storage/ndb/src/kernel/blocks/suma/Suma.cpp15
-rw-r--r--storage/ndb/src/kernel/error/ndbd_exit_codes.c12
-rw-r--r--storage/ndb/src/mgmapi/mgmapi.cpp2
-rw-r--r--storage/ndb/src/mgmsrv/ConfigInfo.cpp9
-rw-r--r--storage/ndb/src/ndbapi/ndberror.c2
16 files changed, 78 insertions, 32 deletions
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c
index 38ac744d4a8..adc3f351dc8 100644
--- a/storage/myisam/ft_parser.c
+++ b/storage/myisam/ft_parser.c
@@ -111,6 +111,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
FT_WORD *word, MYSQL_FTPARSER_BOOLEAN_INFO *param)
{
byte *doc=*start;
+ int ctype;
uint mwc, length, mbl;
param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0);
@@ -119,9 +120,11 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
while (doc<end)
{
- for (;doc<end;doc++)
+ for (; doc < end; doc+= (mbl > 0 ? mbl : 1))
{
- if (true_word_char(cs,*doc)) break;
+ mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
+ if (true_word_char(ctype, *doc))
+ break;
if (*doc == FTB_RQUOT && param->quot)
{
param->quot=doc;
@@ -155,14 +158,16 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
}
mwc=length=0;
- for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1))
- if (true_word_char(cs,*doc))
+ for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : 1))
+ {
+ mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
+ if (true_word_char(ctype, *doc))
mwc=0;
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;
if ((param->trunc=(doc<end && *doc == FTB_TRUNC)))
@@ -197,24 +202,31 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end,
{
byte *doc= *start;
uint mwc, length, mbl;
+ int ctype;
DBUG_ENTER("ft_simple_get_word");
do
{
- for (;; doc++)
+ for (;; doc+= (mbl > 0 ? mbl : 1))
{
- if (doc >= end) DBUG_RETURN(0);
- if (true_word_char(cs, *doc)) break;
+ if (doc >= end)
+ DBUG_RETURN(0);
+ mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
+ if (true_word_char(ctype, *doc))
+ break;
}
mwc= length= 0;
- for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1))
- if (true_word_char(cs,*doc))
+ for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : 1))
+ {
+ mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
+ if (true_word_char(ctype, *doc))
mwc= 0;
else if (!misc_word_char(*doc) || mwc)
break;
else
mwc++;
+ }
word->len= (uint)(doc-word->pos) - mwc;
diff --git a/storage/myisam/ft_update.c b/storage/myisam/ft_update.c
index 08d605dbcc2..7a0876ce5a4 100644
--- a/storage/myisam/ft_update.c
+++ b/storage/myisam/ft_update.c
@@ -174,11 +174,6 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2)
FT_SEG_ITERATOR ftsi1, ftsi2;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
DBUG_ENTER("_mi_ft_cmp");
-#ifndef MYSQL_HAS_TRUE_CTYPE_IMPLEMENTATION
- if (cs->mbmaxlen > 1)
- DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
-#endif
-
_mi_ft_segiterator_init(info, keynr, rec1, &ftsi1);
_mi_ft_segiterator_init(info, keynr, rec2, &ftsi2);
diff --git a/storage/myisam/ftdefs.h b/storage/myisam/ftdefs.h
index 108faf4f1a3..3c5b9d9e608 100644
--- a/storage/myisam/ftdefs.h
+++ b/storage/myisam/ftdefs.h
@@ -24,9 +24,10 @@
#include <queues.h>
#include <mysql/plugin.h>
-#define true_word_char(s,X) (my_isalnum(s,X) || (X)=='_')
+#define true_word_char(ctype, character) \
+ ((ctype) & (_MY_U | _MY_L | _MY_NMR) || \
+ (character) == '_')
#define misc_word_char(X) 0
-#define word_char(s,X) (true_word_char(s,X) || misc_word_char(X))
#define FT_MAX_WORD_LEN_FOR_SORT 31
diff --git a/storage/ndb/Makefile.am b/storage/ndb/Makefile.am
index 287368c5ae7..0b99ca39114 100644
--- a/storage/ndb/Makefile.am
+++ b/storage/ndb/Makefile.am
@@ -20,7 +20,8 @@ dist-hook:
done
windoze:
- for i in `find . -name 'Makefile.am'`; do make -C `dirname $$i` windoze-dsp; done
+ for i in `find . -name 'old_dirs' -prune -o -name 'Makefile.am' -print`; \
+ do make -C `dirname $$i` windoze-dsp; done
windoze-dsp:
diff --git a/storage/ndb/include/mgmapi/ndbd_exit_codes.h b/storage/ndb/include/mgmapi/ndbd_exit_codes.h
index 686641ebef5..b16f1a63a8d 100644
--- a/storage/ndb/include/mgmapi/ndbd_exit_codes.h
+++ b/storage/ndb/include/mgmapi/ndbd_exit_codes.h
@@ -77,6 +77,7 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#define NDBD_EXIT_SR_RESTARTCONFLICT 2311
#define NDBD_EXIT_NO_MORE_UNDOLOG 2312
#define NDBD_EXIT_SR_UNDOLOG 2313
+#define NDBD_EXIT_SR_SCHEMAFILE 2310
#define NDBD_EXIT_MEMALLOC 2327
#define NDBD_EXIT_BLOCK_JBUFCONGESTION 2334
#define NDBD_EXIT_TIME_QUEUE_SHORT 2335
@@ -91,6 +92,9 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#define NDBD_EXIT_INVALID_CONFIG 2350
#define NDBD_EXIT_OUT_OF_LONG_SIGNAL_MEMORY 2351
+/* Errorcodes for fatal resource errors */
+#define NDBD_EXIT_RESOURCE_ALLOC_ERROR 2500
+
#define NDBD_EXIT_OS_SIGNAL_RECEIVED 6000
/* VM 6050-> */
diff --git a/storage/ndb/include/util/ConfigValues.hpp b/storage/ndb/include/util/ConfigValues.hpp
index 457488e3c42..8dfb3c83df3 100644
--- a/storage/ndb/include/util/ConfigValues.hpp
+++ b/storage/ndb/include/util/ConfigValues.hpp
@@ -96,6 +96,7 @@ public:
public:
ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial
ConfigValuesFactory(ConfigValues * m_cfg); //
+ ~ConfigValuesFactory();
ConfigValues * m_cfg;
ConfigValues * getConfigValues();
diff --git a/storage/ndb/src/common/transporter/TransporterRegistry.cpp b/storage/ndb/src/common/transporter/TransporterRegistry.cpp
index 633cfeb0ac2..458f7c4f47e 100644
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp
@@ -1319,7 +1319,7 @@ TransporterRegistry::start_clients_thread()
else
{
ndbout_c("Management server closed connection early. "
- "It is probably being shut down (or has crashed). "
+ "It is probably being shut down (or has problems). "
"We will retry the connection.");
}
}
diff --git a/storage/ndb/src/common/util/ConfigValues.cpp b/storage/ndb/src/common/util/ConfigValues.cpp
index 5c4b17c73ca..ae4fbfd2f71 100644
--- a/storage/ndb/src/common/util/ConfigValues.cpp
+++ b/storage/ndb/src/common/util/ConfigValues.cpp
@@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){
}
}
+ConfigValuesFactory::~ConfigValuesFactory()
+{
+ if(m_cfg)
+ free(m_cfg);
+}
+
ConfigValues *
ConfigValuesFactory::create(Uint32 keys, Uint32 data){
Uint32 sz = sizeof(ConfigValues);
@@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c
}
}
- ConfigValues * ret = fac->m_cfg;
+ ConfigValues * ret = fac->getConfigValues();
delete fac;
return ret;
}
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index ef08c06822f..e9d2fce5e18 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -1355,10 +1355,11 @@ void Dbdict::readSchemaConf(Signal* signal,
sf->FileSize == sf0->FileSize &&
sf->PageNumber == n &&
computeChecksum((Uint32*)sf, NDB_SF_PAGE_SIZE_IN_WORDS) == 0;
- ndbrequire(ok || !crashInd);
+ ndbrequireErr(ok || !crashInd, NDBD_EXIT_SR_SCHEMAFILE);
if (! ok) {
jam();
- ndbrequire(fsPtr.p->fsState == FsConnectRecord::READ_SCHEMA1);
+ ndbrequireErr(fsPtr.p->fsState == FsConnectRecord::READ_SCHEMA1,
+ NDBD_EXIT_SR_SCHEMAFILE);
readSchemaRef(signal, fsPtr);
return;
}
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index bb4c2ed197e..dc93dca4e46 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -8606,7 +8606,7 @@ Dbdih::resetReplicaSr(TabRecordPtr tabPtr){
*--------_----------------------------------------------------- */
const Uint32 nextCrashed = noCrashedReplicas + 1;
replicaPtr.p->noCrashedReplicas = nextCrashed;
- arrGuard(nextCrashed, 8);
+ arrGuardErr(nextCrashed, 8, NDBD_EXIT_MAX_CRASHED_REPLICAS);
replicaPtr.p->createGci[nextCrashed] = newestRestorableGCI + 1;
ndbrequire(newestRestorableGCI + 1 != 0xF1F1F1F1);
replicaPtr.p->replicaLastGci[nextCrashed] = (Uint32)-1;
diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index 53cf5c06fe4..bdd19839a02 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -17839,7 +17839,8 @@ void Dblqh::stepAhead(Signal* signal, Uint32 stepAheadWords)
logFilePtr.p->currentLogpage = logPagePtr.p->logPageWord[ZNEXT_PAGE];
logPagePtr.i = logPagePtr.p->logPageWord[ZNEXT_PAGE];
logFilePtr.p->currentFilepage++;
- ptrCheckGuard(logPagePtr, clogPageFileSize, logPageRecord);
+ ptrCheckGuardErr(logPagePtr, clogPageFileSize, logPageRecord,
+ NDBD_EXIT_SR_REDOLOG);
logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX] = ZPAGE_HEADER_SIZE;
logPartPtr.p->execSrPagesRead--;
logPartPtr.p->execSrPagesExecuted++;
diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.cpp b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
index 91f0fab06f8..686ae476879 100644
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
@@ -410,7 +410,22 @@ Suma::createSequenceReply(Signal* signal,
jam();
if (ref != NULL)
+ {
+ switch ((UtilSequenceRef::ErrorCode)ref->errorCode)
+ {
+ case UtilSequenceRef::NoSuchSequence:
+ ndbrequire(false);
+ case UtilSequenceRef::TCError:
+ {
+ char buf[128];
+ snprintf(buf, sizeof(buf),
+ "Startup failed during sequence creation. TC error %d",
+ ref->TCErrorCode);
+ progError(__LINE__, NDBD_EXIT_RESOURCE_ALLOC_ERROR, buf);
+ }
+ }
ndbrequire(false);
+ }
sendSTTORRY(signal);
}
diff --git a/storage/ndb/src/kernel/error/ndbd_exit_codes.c b/storage/ndb/src/kernel/error/ndbd_exit_codes.c
index 6a14d8b7ffd..172125c35a1 100644
--- a/storage/ndb/src/kernel/error/ndbd_exit_codes.c
+++ b/storage/ndb/src/kernel/error/ndbd_exit_codes.c
@@ -51,14 +51,16 @@ static const ErrStruct errArray[] =
{NDBD_EXIT_SYSTEM_ERROR, XIE,
"System error, node killed during node restart by other node"},
{NDBD_EXIT_INDEX_NOTINRANGE, XIE, "Array index out of range"},
- {NDBD_EXIT_ARBIT_SHUTDOWN, XAE, "Arbitrator shutdown, "
- "please investigate error(s) on other node(s)"},
+ {NDBD_EXIT_ARBIT_SHUTDOWN, XAE, "Node lost connection to other nodes and "
+ "can not form a unpartitioned cluster, please investigate if there are "
+ "error(s) on other node(s)"},
{NDBD_EXIT_POINTER_NOTINRANGE, XIE, "Pointer too large"},
{NDBD_EXIT_SR_OTHERNODEFAILED, XRE, "Another node failed during system "
"restart, please investigate error(s) on other node(s)"},
{NDBD_EXIT_NODE_NOT_DEAD, XRE, "Internal node state conflict, "
"most probably resolved by restarting node again"},
{NDBD_EXIT_SR_REDOLOG, XFI, "Error while reading the REDO log"},
+ {NDBD_EXIT_SR_SCHEMAFILE, XFI, "Error while reading the schema file"},
/* Currently unused? */
{2311, XIE, "Conflict when selecting restart type"},
{NDBD_EXIT_NO_MORE_UNDOLOG, XCR,
@@ -80,6 +82,10 @@ static const ErrStruct errArray[] =
/* this error message is complemented by additional info when generated */
{NDBD_EXIT_INVALID_CONFIG, XCE,
"Invalid configuration received from Management Server"},
+
+ {NDBD_EXIT_RESOURCE_ALLOC_ERROR, XCE,
+ "Resource allocation error, please review the configuration"},
+
/* this error message is complemented by additional info when
generated, such as signal, and text
*/
@@ -94,7 +100,7 @@ static const ErrStruct errArray[] =
{NDBD_EXIT_WATCHDOG_TERMINATE, XIE, "WatchDog terminate, internal error "
"or massive overload on the machine running this node"},
{NDBD_EXIT_SIGNAL_LOST_SEND_BUFFER_FULL, XCR,
- "Signal lost, out of send buffer memory, please increase SendBufferMemory"},
+ "Signal lost, out of send buffer memory, please increase SendBufferMemory or lower the load"},
{NDBD_EXIT_SIGNAL_LOST, XIE, "Signal lost (unknown reason)"},
{NDBD_EXIT_ILLEGAL_SIGNAL, XIE,
"Illegal signal (version mismatch a possibility)"},
diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp
index f184f089f2d..43021a8d669 100644
--- a/storage/ndb/src/mgmapi/mgmapi.cpp
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp
@@ -1924,7 +1924,7 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) {
}
delete prop;
- return (ndb_mgm_configuration*)cvf.m_cfg;
+ return (ndb_mgm_configuration*)cvf.getConfigValues();
} while(0);
delete prop;
diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp
index 8705b640809..42776798385 100644
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -2289,11 +2289,11 @@ ConfigInfo::ConfigInfo()
if (!m_info.getCopy(param._section, &section)) {
Properties newsection(true);
m_info.put(param._section, &newsection);
+
+ // Get copy of section
+ m_info.getCopy(param._section, &section);
}
-
- // Get copy of section
- m_info.getCopy(param._section, &section);
-
+
// Create pinfo (parameter info) entry
Properties pinfo(true);
pinfo.put("Id", param._paramId);
@@ -2347,6 +2347,7 @@ ConfigInfo::ConfigInfo()
// Replace section with modified section
m_info.put(param._section, section, true);
+ delete section;
if(param._type != ConfigInfo::CI_SECTION){
Properties * p;
diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c
index a867ad7315b..b72ce4bd3c6 100644
--- a/storage/ndb/src/ndbapi/ndberror.c
+++ b/storage/ndb/src/ndbapi/ndberror.c
@@ -284,6 +284,7 @@ ErrorBundle ErrorCodes[] = {
/**
* Application error
*/
+ { 763, DMEC, AE, "Alter table requires cluster nodes to have exact same version" },
{ 823, DMEC, AE, "Too much attrinfo from application in tuple manager" },
{ 831, DMEC, AE, "Too many nullable/bitfields in table definition" },
{ 876, DMEC, AE, "876" },
@@ -344,6 +345,7 @@ ErrorBundle ErrorCodes[] = {
/**
* SchemaError
*/
+ { 311, DMEC, AE, "Undefined partition used in setPartitionId" },
{ 703, DMEC, SE, "Invalid table format" },
{ 704, DMEC, SE, "Attribute name too long" },
{ 705, DMEC, SE, "Table name too long" },