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
baffd9ad
Commit
baffd9ad
authored
Feb 17, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After review fixes (Bug #5682)
parent
612e0661
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
innobase/include/data0type.ic
innobase/include/data0type.ic
+3
-0
innobase/row/row0sel.c
innobase/row/row0sel.c
+19
-6
No files found.
innobase/include/data0type.ic
View file @
baffd9ad
...
...
@@ -354,6 +354,7 @@ dtype_get_fixed_size(
case DATA_INT:
case DATA_FLOAT:
case DATA_DOUBLE:
return(dtype_get_len(type));
case DATA_MYSQL:
if (type->prtype & DATA_BINARY_TYPE) {
return(dtype_get_len(type));
...
...
@@ -438,6 +439,7 @@ dtype_get_min_size(
case DATA_INT:
case DATA_FLOAT:
case DATA_DOUBLE:
return(type->len);
case DATA_MYSQL:
if ((type->prtype & DATA_BINARY_TYPE)
|| type->mbminlen == type->mbmaxlen) {
...
...
@@ -446,6 +448,7 @@ dtype_get_min_size(
/* this is a variable-length character set */
ut_a(type->mbminlen > 0);
ut_a(type->mbmaxlen > type->mbminlen);
ut_a(type->len % type->mbmaxlen == 0);
return(type->len * type->mbminlen / type->mbmaxlen);
case DATA_VARCHAR:
case DATA_BINARY:
...
...
innobase/row/row0sel.c
View file @
baffd9ad
...
...
@@ -2233,7 +2233,9 @@ row_sel_field_store_in_mysql_format(
are not in themselves stored here: the caller must
allocate and copy the BLOB into buffer before, and pass
the pointer to the BLOB in 'data' */
const
mysql_row_templ_t
*
templ
,
/* in: MySQL column template */
const
mysql_row_templ_t
*
templ
,
/* in: MySQL column template.
Its following fields are referenced:
type, is_unsigned, mysql_col_len, mbminlen, mbmaxlen */
byte
*
data
,
/* in: data to store */
ulint
len
)
/* in: length of the data */
{
...
...
@@ -2280,16 +2282,17 @@ row_sel_field_store_in_mysql_format(
row_mysql_store_blob_ref
(
dest
,
templ
->
mysql_col_len
,
data
,
len
);
}
else
{
}
else
if
(
templ
->
type
==
DATA_MYSQL
)
{
memcpy
(
dest
,
data
,
len
);
ut_a
d
(
templ
->
mysql_col_len
>=
len
);
ut_a
d
(
templ
->
mbmaxlen
>=
templ
->
mbminlen
);
ut_a
(
templ
->
mysql_col_len
>=
len
);
ut_a
(
templ
->
mbmaxlen
>=
templ
->
mbminlen
);
ut_a
d
(
templ
->
mbmaxlen
>
templ
->
mbminlen
ut_a
(
templ
->
mbmaxlen
>
templ
->
mbminlen
||
templ
->
mysql_col_len
==
len
);
ut_a
d
(
!
templ
->
mbmaxlen
ut_a
(
!
templ
->
mbmaxlen
||
!
(
templ
->
mysql_col_len
%
templ
->
mbmaxlen
));
ut_a
(
len
*
templ
->
mbmaxlen
>=
templ
->
mysql_col_len
);
if
(
templ
->
mbminlen
!=
templ
->
mbmaxlen
)
{
/* Pad with spaces. This undoes the stripping
...
...
@@ -2297,6 +2300,16 @@ row_sel_field_store_in_mysql_format(
row_mysql_store_col_in_innobase_format(). */
memset
(
dest
+
len
,
0x20
,
templ
->
mysql_col_len
-
len
);
}
}
else
{
ut_a
(
templ
->
type
==
DATA_CHAR
||
templ
->
type
==
DATA_FIXBINARY
/*|| templ->type == DATA_SYS_CHILD
|| templ->type == DATA_SYS*/
||
templ
->
type
==
DATA_FLOAT
||
templ
->
type
==
DATA_DOUBLE
||
templ
->
type
==
DATA_DECIMAL
);
ut_ad
(
templ
->
mysql_col_len
==
len
);
memcpy
(
dest
,
data
,
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