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
cb4db54b
Commit
cb4db54b
authored
Dec 10, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix char(0) to use ndb bit format
parent
bcbbd47d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+18
-11
No files found.
sql/ha_ndbcluster.cc
View file @
cb4db54b
...
...
@@ -90,7 +90,7 @@ static int ndb_get_table_statistics(Ndb*, const char *,
Dummy buffer to read zero pack_length fields
which are mapped to 1 char
*/
static
byte
dummy_buf
[
1
]
;
static
uint32
dummy_buf
;
/*
Error handling functions
...
...
@@ -470,11 +470,15 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
if
(
ndb_supported_type
(
field
->
type
()))
{
// ndb currently does not support size 0
const
byte
*
empty_field
=
""
;
uint32
empty_field
;
if
(
pack_len
==
0
)
{
pack_len
=
1
;
field_ptr
=
empty_field
;
pack_len
=
sizeof
(
empty_field
);
field_ptr
=
(
byte
*
)
&
empty_field
;
if
(
field
->
is_null
())
empty_field
=
0
;
else
empty_field
=
1
;
}
if
(
!
(
field
->
flags
&
BLOB_FLAG
))
{
...
...
@@ -623,7 +627,7 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field,
if
(
field
->
pack_length
()
!=
0
)
field_buf
=
buf
+
(
field
->
ptr
-
table
->
record
[
0
]);
else
field_buf
=
dummy_buf
;
field_buf
=
(
byte
*
)
&
dummy_buf
;
m_value
[
fieldnr
].
rec
=
ndb_op
->
getValue
(
fieldnr
,
field_buf
);
DBUG_RETURN
(
m_value
[
fieldnr
].
rec
==
NULL
);
...
...
@@ -3329,19 +3333,22 @@ static int create_ndb_column(NDBCOL &col,
break
;
// Char types
case
MYSQL_TYPE_STRING
:
if
(
field
->
flags
&
BINARY_FLAG
)
col
.
setType
(
NDBCOL
::
Binary
);
else
{
col
.
setType
(
NDBCOL
::
Char
);
col
.
setCharset
(
cs
);
}
if
(
field
->
pack_length
()
==
0
)
{
col
.
setType
(
NDBCOL
::
Bit
);
col
.
setLength
(
1
);
}
else
if
(
field
->
flags
&
BINARY_FLAG
)
{
col
.
setType
(
NDBCOL
::
Binary
);
col
.
setLength
(
field
->
pack_length
());
}
else
{
col
.
setType
(
NDBCOL
::
Char
);
col
.
setCharset
(
cs
);
col
.
setLength
(
field
->
pack_length
());
}
break
;
case
MYSQL_TYPE_VAR_STRING
:
if
(
field
->
flags
&
BINARY_FLAG
)
...
...
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