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
22af54a9
Commit
22af54a9
authored
Oct 17, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/emurphy/src/bk-clean/mysql-5.0
parents
dddc50f2
955798d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
innobase/include/rem0rec.h
innobase/include/rem0rec.h
+9
-0
innobase/include/rem0rec.ic
innobase/include/rem0rec.ic
+16
-0
innobase/row/row0upd.c
innobase/row/row0upd.c
+12
-0
No files found.
innobase/include/rem0rec.h
View file @
22af54a9
...
@@ -312,6 +312,15 @@ rec_offs_nth_extern(
...
@@ -312,6 +312,15 @@ rec_offs_nth_extern(
const
ulint
*
offsets
,
/* in: array returned by rec_get_offsets() */
const
ulint
*
offsets
,
/* in: array returned by rec_get_offsets() */
ulint
n
);
/* in: nth field */
ulint
n
);
/* in: nth field */
/**********************************************************
/**********************************************************
Returns nonzero if the SQL NULL bit is set in nth field of rec. */
UNIV_INLINE
ulint
rec_offs_nth_sql_null
(
/*==================*/
/* out: nonzero if SQL NULL */
const
ulint
*
offsets
,
/* in: array returned by rec_get_offsets() */
ulint
n
);
/* in: nth field */
/**********************************************************
Gets the physical size of a field. */
Gets the physical size of a field. */
UNIV_INLINE
UNIV_INLINE
ulint
ulint
...
...
innobase/include/rem0rec.ic
View file @
22af54a9
...
@@ -954,6 +954,22 @@ rec_offs_nth_extern(
...
@@ -954,6 +954,22 @@ rec_offs_nth_extern(
& REC_OFFS_EXTERNAL));
& REC_OFFS_EXTERNAL));
}
}
/**********************************************************
Returns nonzero if the SQL NULL bit is set in nth field of rec. */
UNIV_INLINE
ulint
rec_offs_nth_sql_null(
/*==================*/
/* out: nonzero if SQL NULL */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n) /* in: nth field */
{
ut_ad(rec_offs_validate(NULL, NULL, offsets));
ut_ad(n < rec_offs_n_fields(offsets));
return(UNIV_UNLIKELY(rec_offs_base(offsets)[1 + n]
& REC_OFFS_SQL_NULL));
}
/**********************************************************
/**********************************************************
Gets the physical size of a field. */
Gets the physical size of a field. */
UNIV_INLINE
UNIV_INLINE
...
...
innobase/row/row0upd.c
View file @
22af54a9
...
@@ -395,6 +395,18 @@ row_upd_changes_field_size_or_external(
...
@@ -395,6 +395,18 @@ row_upd_changes_field_size_or_external(
old_len
=
rec_offs_nth_size
(
offsets
,
upd_field
->
field_no
);
old_len
=
rec_offs_nth_size
(
offsets
,
upd_field
->
field_no
);
if
(
rec_offs_comp
(
offsets
)
&&
rec_offs_nth_sql_null
(
offsets
,
upd_field
->
field_no
))
{
/* Note that in the compact table format, for a
variable length field, an SQL NULL will use zero
bytes in the offset array at the start of the physical
record, but a zero-length value (empty string) will
use one byte! Thus, we cannot use update-in-place
if we update an SQL NULL varchar to an empty string! */
old_len
=
UNIV_SQL_NULL
;
}
if
(
old_len
!=
new_len
)
{
if
(
old_len
!=
new_len
)
{
return
(
TRUE
);
return
(
TRUE
);
...
...
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