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
61c36b1c
Commit
61c36b1c
authored
Jun 20, 2005
by
tulin@dl145c.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ha_ndbcluster.cc:
remove typecheck in ndb handler not needed
parent
9b3d0b85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+10
-23
No files found.
sql/ha_ndbcluster.cc
View file @
61c36b1c
...
...
@@ -464,13 +464,12 @@ bool ha_ndbcluster::get_error_message(int error,
}
#ifndef DBUG_OFF
/*
Check if type is supported by NDB.
TODO Use this once in open(), not in every operation
*/
static
inline
bool
ndb_supported_type
(
enum_field_types
type
)
static
bool
ndb_supported_type
(
enum_field_types
type
)
{
switch
(
type
)
{
case
MYSQL_TYPE_DECIMAL
:
...
...
@@ -502,6 +501,7 @@ static inline bool ndb_supported_type(enum_field_types type)
}
return
FALSE
;
}
#endif
/* !DBUG_OFF */
/*
...
...
@@ -531,15 +531,10 @@ int ha_ndbcluster::set_ndb_key(NdbOperation *ndb_op, Field *field,
pack_len
));
DBUG_DUMP
(
"key"
,
(
char
*
)
field_ptr
,
pack_len
);
if
(
ndb_supported_type
(
field
->
type
()))
{
if
(
!
(
field
->
flags
&
BLOB_FLAG
))
DBUG_ASSERT
(
ndb_supported_type
(
field
->
type
()));
DBUG_ASSERT
(
!
(
field
->
flags
&
BLOB_FLAG
));
// Common implementation for most field types
DBUG_RETURN
(
ndb_op
->
equal
(
fieldnr
,
(
char
*
)
field_ptr
,
pack_len
)
!=
0
);
}
// Unhandled field types
DBUG_PRINT
(
"error"
,
(
"Field type %d not supported"
,
field
->
type
()));
DBUG_RETURN
(
2
);
}
...
...
@@ -558,7 +553,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
pack_len
,
field
->
is_null
()
?
"Y"
:
"N"
));
DBUG_DUMP
(
"value"
,
(
char
*
)
field_ptr
,
pack_len
);
if
(
ndb_supported_type
(
field
->
type
()))
DBUG_ASSERT
(
ndb_supported_type
(
field
->
type
()));
{
// ndb currently does not support size 0
const
byte
*
empty_field
=
""
;
...
...
@@ -607,9 +602,6 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
}
DBUG_RETURN
(
1
);
}
// Unhandled field types
DBUG_PRINT
(
"error"
,
(
"Field type %d not supported"
,
field
->
type
()));
DBUG_RETURN
(
2
);
}
...
...
@@ -705,8 +697,7 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field,
if
(
field
!=
NULL
)
{
DBUG_ASSERT
(
buf
);
if
(
ndb_supported_type
(
field
->
type
()))
{
DBUG_ASSERT
(
ndb_supported_type
(
field
->
type
()));
DBUG_ASSERT
(
field
->
ptr
!=
NULL
);
if
(
!
(
field
->
flags
&
BLOB_FLAG
))
{
...
...
@@ -731,10 +722,6 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field,
}
DBUG_RETURN
(
1
);
}
// Unhandled field types
DBUG_PRINT
(
"error"
,
(
"Field type %d not supported"
,
field
->
type
()));
DBUG_RETURN
(
2
);
}
// Used for hidden key only
m_value
[
fieldnr
].
rec
=
ndb_op
->
getValue
(
fieldnr
,
NULL
);
...
...
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