Commit ecf707c0 authored by unknown's avatar unknown

ndb: bug#7340 fix


mysql-test/r/ndb_blob.result:
  bug#7340 fix
mysql-test/t/ndb_blob.test:
  bug#7340 fix
ndb/src/ndbapi/NdbConnection.cpp:
  bug#7340 fix
ndb/src/ndbapi/NdbOperationDefine.cpp:
  bug#7340 fix
parent f1aa066d
...@@ -467,3 +467,21 @@ a b ...@@ -467,3 +467,21 @@ a b
1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
drop table t1; drop table t1;
create table t1 (
id int(11) unsigned primary key NOT NULL auto_increment,
msg text NOT NULL
) engine=ndbcluster default charset=utf8;
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
Proper fix: Set inline bytes to multiple of mbmaxlen and
validate it (after the 8 byte length).');
select * from t1;
id msg
1 Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
Proper fix: Set inline bytes to multiple of mbmaxlen and
validate it (after the 8 byte length).
drop table t1;
...@@ -389,3 +389,17 @@ set autocommit=1; ...@@ -389,3 +389,17 @@ set autocommit=1;
alter table t1 engine=myisam; alter table t1 engine=myisam;
select * from t1 order by a; select * from t1 order by a;
drop table t1; drop table t1;
# -- bug #7340 --
create table t1 (
id int(11) unsigned primary key NOT NULL auto_increment,
msg text NOT NULL
) engine=ndbcluster default charset=utf8;
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
Proper fix: Set inline bytes to multiple of mbmaxlen and
validate it (after the 8 byte length).');
select * from t1;
drop table t1;
...@@ -361,11 +361,10 @@ NdbConnection::execute(ExecType aTypeOfExec, ...@@ -361,11 +361,10 @@ NdbConnection::execute(ExecType aTypeOfExec,
if (executeNoBlobs(tExecType, abortOption, forceSend) == -1) if (executeNoBlobs(tExecType, abortOption, forceSend) == -1)
ret = -1; ret = -1;
#ifndef VM_TRACE #ifdef ndb_api_crash_on_complex_blob_abort
// can happen in complex abort cases
theFirstOpInList = theLastOpInList = NULL;
#else
assert(theFirstOpInList == NULL && theLastOpInList == NULL); assert(theFirstOpInList == NULL && theLastOpInList == NULL);
#else
theFirstOpInList = theLastOpInList = NULL;
#endif #endif
{ {
......
...@@ -528,7 +528,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, ...@@ -528,7 +528,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
CHARSET_INFO* cs = tAttrInfo->m_cs; CHARSET_INFO* cs = tAttrInfo->m_cs;
// invalid data can crash kernel // invalid data can crash kernel
if (cs != NULL && if (cs != NULL &&
(*cs->cset->well_formed_len)(cs, // fast fix bug#7340
tAttrInfo->m_type != NdbDictionary::Column::Text &&
(*cs->cset->well_formed_len)(cs,
aValue, aValue,
aValue + sizeInBytes, aValue + sizeInBytes,
sizeInBytes) != sizeInBytes) { sizeInBytes) != sizeInBytes) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment