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
91b435dc
Commit
91b435dc
authored
Jan 03, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge for WL#2290 Add support for bit field in ndbcluster handler
parent
3f005af8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+5
-9
No files found.
sql/ha_ndbcluster.cc
View file @
91b435dc
...
@@ -410,7 +410,6 @@ static inline bool ndb_supported_type(enum_field_types type)
...
@@ -410,7 +410,6 @@ static inline bool ndb_supported_type(enum_field_types type)
case
MYSQL_TYPE_NULL
:
case
MYSQL_TYPE_NULL
:
case
MYSQL_TYPE_GEOMETRY
:
case
MYSQL_TYPE_GEOMETRY
:
case
MYSQL_TYPE_VARCHAR
:
case
MYSQL_TYPE_VARCHAR
:
case
MYSQL_TYPE_BIT
:
break
;
break
;
}
}
return
FALSE
;
return
FALSE
;
...
@@ -498,20 +497,17 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
...
@@ -498,20 +497,17 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
}
}
else
// if (field->type() == MYSQL_TYPE_BIT)
else
// if (field->type() == MYSQL_TYPE_BIT)
{
{
char
buf
[
8
];
longlong
bits
=
field
->
val_int
();
String
str
(
buf
,
(
uint32
)
sizeof
(
buf
),
NULL
);
if
(
pack_len
%
4
)
// Round up bit field length to nearest word boundry
// Round up bit field length to nearest word boundry
pack_len
=
((
pack_len
+
3
)
>>
2
)
<<
2
;
pack_len
+=
4
-
(
pack_len
%
4
);
DBUG_ASSERT
(
pack_len
<=
8
);
DBUG_ASSERT
(
pack_len
<=
8
);
if
(
field
->
is_null
())
if
(
field
->
is_null
())
// Set value to NULL
// Set value to NULL
DBUG_RETURN
((
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
NULL
,
pack_len
)
!=
0
));
DBUG_RETURN
((
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
NULL
,
pack_len
)
!=
0
));
DBUG_PRINT
(
"info"
,
(
"bit field"
));
DBUG_PRINT
(
"info"
,
(
"bit field"
));
DBUG_DUMP
(
"value"
,
(
char
*
)
field
->
val_str
(
&
str
)
->
ptr
(),
pack_len
);
DBUG_DUMP
(
"value"
,
(
char
*
)
&
bits
,
pack_len
);
DBUG_RETURN
(
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
field
->
val_str
(
&
str
)
->
ptr
(),
DBUG_RETURN
(
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
&
bits
,
pack_len
)
!=
0
);
pack_len
)
!=
0
);
}
}
}
}
// Blob type
// Blob type
...
...
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