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
56e2d4ff
Commit
56e2d4ff
authored
Jan 23, 2007
by
pekka@clam.ndb.mysql.com/clam.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#25562 use byte-size max_data_length() when setting blob part size
parent
6825593d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+21
-11
No files found.
sql/ha_ndbcluster.cc
View file @
56e2d4ff
...
@@ -4185,19 +4185,29 @@ static int create_ndb_column(NDBCOL &col,
...
@@ -4185,19 +4185,29 @@ static int create_ndb_column(NDBCOL &col,
col
.
setType
(
NDBCOL
::
Text
);
col
.
setType
(
NDBCOL
::
Text
);
col
.
setCharset
(
cs
);
col
.
setCharset
(
cs
);
}
}
// Use "<=" even if "<" is the exact condition
if
(
field
->
max_length
()
<=
(
1
<<
8
))
goto
mysql_type_tiny_blob
;
else
if
(
field
->
max_length
()
<=
(
1
<<
16
))
{
{
col
.
setInlineSize
(
256
);
Field_blob
*
field_blob
=
(
Field_blob
*
)
field
;
col
.
setPartSize
(
2000
);
/*
col
.
setStripeSize
(
16
);
* max_data_length is 2^8-1, 2^16-1, 2^24-1 for tiny, blob, medium.
* Tinyblob gets no blob parts. The other cases are just a crude
* way to control part size and striping.
*
* In mysql blob(256) is promoted to blob(65535) so it does not
* in fact fit "inline" in NDB.
*/
if
(
field_blob
->
max_data_length
()
<
(
1
<<
8
))
goto
mysql_type_tiny_blob
;
else
if
(
field_blob
->
max_data_length
()
<
(
1
<<
16
))
{
col
.
setInlineSize
(
256
);
col
.
setPartSize
(
2000
);
col
.
setStripeSize
(
16
);
}
else
if
(
field_blob
->
max_data_length
()
<
(
1
<<
24
))
goto
mysql_type_medium_blob
;
else
goto
mysql_type_long_blob
;
}
}
else
if
(
field
->
max_length
()
<=
(
1
<<
24
))
goto
mysql_type_medium_blob
;
else
goto
mysql_type_long_blob
;
break
;
break
;
mysql_type_medium_blob:
mysql_type_medium_blob:
case
MYSQL_TYPE_MEDIUM_BLOB
:
case
MYSQL_TYPE_MEDIUM_BLOB
:
...
...
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