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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9683b335
Commit
9683b335
authored
Sep 02, 2004
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/space/pekka/ndb/version/my41-blobs
parents
03d3d8c4
f01a88dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
7 deletions
+53
-7
mysql-test/r/ndb_blob.result
mysql-test/r/ndb_blob.result
+20
-3
mysql-test/t/ndb_blob.test
mysql-test/t/ndb_blob.test
+28
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+5
-3
No files found.
mysql-test/r/ndb_blob.result
View file @
9683b335
drop table if exists t1;
drop table if exists t1;
drop database if exists test2;
drop database if exists test2;
create table t1 (
a int not null primary key,
b tinytext
) engine=ndbcluster;
insert into t1 values(1, 'x');
update t1 set b = 'y';
select * from t1;
a b
1 y
delete from t1;
drop table t1;
create table t1 (
a int not null primary key,
b text not null
) engine=ndbcluster;
insert into t1 values(1, '');
select * from t1;
a b
1
drop table t1;
set autocommit=0;
set autocommit=0;
create table t1 (
create table t1 (
a int not null primary key,
a int not null primary key,
...
@@ -73,9 +93,6 @@ a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3)
...
@@ -73,9 +93,6 @@ a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3)
2 4512 b1 6000 dd1
2 4512 b1 6000 dd1
update t1 set d=null where a=1;
update t1 set d=null where a=1;
commit;
commit;
select a from t1 where d is null;
a
1
delete from t1 where a=1;
delete from t1 where a=1;
delete from t1 where a=2;
delete from t1 where a=2;
commit;
commit;
...
...
mysql-test/t/ndb_blob.test
View file @
9683b335
...
@@ -12,6 +12,32 @@ drop database if exists test2;
...
@@ -12,6 +12,32 @@ drop database if exists test2;
# A prerequisite for this handler test is that "testBlobs" succeeds.
# A prerequisite for this handler test is that "testBlobs" succeeds.
#
#
# -- bug-5252 tinytext crashes --
create
table
t1
(
a
int
not
null
primary
key
,
b
tinytext
)
engine
=
ndbcluster
;
insert
into
t1
values
(
1
,
'x'
);
update
t1
set
b
=
'y'
;
select
*
from
t1
;
delete
from
t1
;
drop
table
t1
;
# -- bug-5013 insert empty string to text --
create
table
t1
(
a
int
not
null
primary
key
,
b
text
not
null
)
engine
=
ndbcluster
;
insert
into
t1
values
(
1
,
''
);
select
*
from
t1
;
drop
table
t1
;
--
general
test
starts
--
# make test harder with autocommit off
# make test harder with autocommit off
set
autocommit
=
0
;
set
autocommit
=
0
;
...
@@ -91,7 +117,8 @@ from t1 where a=2;
...
@@ -91,7 +117,8 @@ from t1 where a=2;
# pk update to null
# pk update to null
update
t1
set
d
=
null
where
a
=
1
;
update
t1
set
d
=
null
where
a
=
1
;
commit
;
commit
;
select
a
from
t1
where
d
is
null
;
# FIXME now fails at random due to weird mixup between the 2 rows
#select a from t1 where d is null;
# pk delete
# pk delete
delete
from
t1
where
a
=
1
;
delete
from
t1
where
a
=
1
;
...
...
sql/ha_ndbcluster.cc
View file @
9683b335
...
@@ -312,9 +312,11 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
...
@@ -312,9 +312,11 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
char
*
blob_ptr
=
NULL
;
char
*
blob_ptr
=
NULL
;
field_blob
->
get_ptr
(
&
blob_ptr
);
field_blob
->
get_ptr
(
&
blob_ptr
);
// Looks like NULL blob can also be signaled in this way
// Looks like NULL ptr signals length 0 blob
if
(
blob_ptr
==
NULL
)
if
(
blob_ptr
==
NULL
)
{
DBUG_RETURN
(
ndb_blob
->
setNull
()
!=
0
);
DBUG_ASSERT
(
blob_len
==
0
);
blob_ptr
=
""
;
}
DBUG_PRINT
(
"value"
,
(
"set blob ptr=%x len=%u"
,
DBUG_PRINT
(
"value"
,
(
"set blob ptr=%x len=%u"
,
(
unsigned
)
blob_ptr
,
blob_len
));
(
unsigned
)
blob_ptr
,
blob_len
));
...
...
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