Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f57153fe
Commit
f57153fe
authored
Dec 22, 2004
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb: bug#7340 fix
parent
5b0e3b13
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
+38
-5
mysql-test/r/ndb_blob.result
mysql-test/r/ndb_blob.result
+18
-0
mysql-test/t/ndb_blob.test
mysql-test/t/ndb_blob.test
+14
-0
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+3
-4
ndb/src/ndbapi/NdbOperationDefine.cpp
ndb/src/ndbapi/NdbOperationDefine.cpp
+3
-1
No files found.
mysql-test/r/ndb_blob.result
View file @
f57153fe
...
...
@@ -467,3 +467,21 @@ a b
1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
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;
mysql-test/t/ndb_blob.test
View file @
f57153fe
...
...
@@ -389,3 +389,17 @@ set autocommit=1;
alter
table
t1
engine
=
myisam
;
select
*
from
t1
order
by
a
;
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
;
ndb/src/ndbapi/NdbConnection.cpp
View file @
f57153fe
...
...
@@ -361,11 +361,10 @@ NdbConnection::execute(ExecType aTypeOfExec,
if
(
executeNoBlobs
(
tExecType
,
abortOption
,
forceSend
)
==
-
1
)
ret
=
-
1
;
#ifndef VM_TRACE
// can happen in complex abort cases
theFirstOpInList
=
theLastOpInList
=
NULL
;
#else
#ifdef ndb_api_crash_on_complex_blob_abort
assert
(
theFirstOpInList
==
NULL
&&
theLastOpInList
==
NULL
);
#else
theFirstOpInList
=
theLastOpInList
=
NULL
;
#endif
{
...
...
ndb/src/ndbapi/NdbOperationDefine.cpp
View file @
f57153fe
...
...
@@ -528,7 +528,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
CHARSET_INFO
*
cs
=
tAttrInfo
->
m_cs
;
// invalid data can crash kernel
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
+
sizeInBytes
,
sizeInBytes
)
!=
sizeInBytes
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment