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
00b98264
Commit
00b98264
authored
7 years ago
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IB: removed alloc from row_ins_set_tuple_col_8()
parent
4ecb38d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
24 deletions
+7
-24
storage/innobase/include/row0ins.h
storage/innobase/include/row0ins.h
+4
-21
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+3
-3
No files found.
storage/innobase/include/row0ins.h
View file @
00b98264
...
...
@@ -202,6 +202,8 @@ struct ins_node_t{
trx_id_t
trx_id
;
/*!< trx id or the last trx which executed the
node */
byte
*
trx_id_buf
;
/* buffer for the trx id sys field in row */
byte
vers_start_buf
[
8
];
/* Buffers for System Versioning */
byte
vers_end_buf
[
8
];
/* system fields. */
mem_heap_t
*
entry_sys_heap
;
/* memory heap used as auxiliary storage;
entry_list and sys fields are stored here;
...
...
@@ -233,13 +235,12 @@ void row_ins_set_tuple_col_8(
dtuple_t
*
tuple
,
int
col
,
ib_uint64_t
data
,
mem_heap_t
*
heap
)
byte
*
buf
)
{
static
const
ulint
fsize
=
sizeof
(
data
);
dfield_t
*
dfield
=
dtuple_get_nth_field
(
tuple
,
col
);
ut_ad
(
dfield
->
type
.
len
==
fsize
);
if
(
dfield
->
len
==
UNIV_SQL_NULL
)
{
byte
*
buf
=
reinterpret_cast
<
byte
*>
(
mem_heap_alloc
(
heap
,
fsize
));
dfield_set_data
(
dfield
,
buf
,
fsize
);
}
ut_ad
(
dfield
->
len
==
dfield
->
type
.
len
&&
dfield
->
data
);
...
...
@@ -251,12 +252,11 @@ void row_ins_set_tuple_col_8(
dtuple_t
*
tuple
,
int
col
,
timeval
&
data
,
mem_heap_t
*
heap
)
byte
*
buf
)
{
dfield_t
*
dfield
=
dtuple_get_nth_field
(
tuple
,
col
);
ut_ad
(
dfield
->
type
.
len
==
8
);
if
(
dfield
->
len
==
UNIV_SQL_NULL
)
{
byte
*
buf
=
reinterpret_cast
<
byte
*>
(
mem_heap_alloc
(
heap
,
8
));
dfield_set_data
(
dfield
,
buf
,
8
);
}
ut_ad
(
dfield
->
len
==
dfield
->
type
.
len
&&
dfield
->
data
);
...
...
@@ -264,21 +264,4 @@ void row_ins_set_tuple_col_8(
mach_write_to_4
(
reinterpret_cast
<
byte
*>
(
dfield
->
data
)
+
4
,
(
ulint
)
data
.
tv_usec
);
}
UNIV_INLINE
void
row_ins_set_tuple_col_1
(
dtuple_t
*
tuple
,
int
col
,
byte
data
,
mem_heap_t
*
heap
)
{
dfield_t
*
dfield
=
dtuple_get_nth_field
(
tuple
,
col
);
ut_ad
(
dfield
->
type
.
len
==
1
);
if
(
dfield
->
len
==
UNIV_SQL_NULL
)
{
byte
*
buf
=
reinterpret_cast
<
byte
*>
(
mem_heap_alloc
(
heap
,
1
));
dfield_set_data
(
dfield
,
buf
,
1
);
}
ut_ad
(
dfield
->
len
==
dfield
->
type
.
len
&&
dfield
->
data
);
*
(
byte
*
)(
dfield
->
data
)
=
data
;
}
#endif
This diff is collapsed.
Click to expand it.
storage/innobase/row/row0mysql.cc
View file @
00b98264
...
...
@@ -1504,14 +1504,14 @@ row_insert_for_mysql(
ut_ad
(
t
->
mysql_col_len
==
8
);
if
(
ins_mode
==
ROW_INS_HISTORICAL
)
{
row_ins_set_tuple_col_8
(
node
->
row
,
table
->
vers_end
,
trx
->
id
,
node
->
entry_sys_heap
);
row_ins_set_tuple_col_8
(
node
->
row
,
table
->
vers_end
,
trx
->
id
,
node
->
vers_end_buf
);
}
else
/* ROW_INS_VERSIONED */
{
row_ins_set_tuple_col_8
(
node
->
row
,
table
->
vers_end
,
IB_UINT64_MAX
,
node
->
entry_sys_heap
);
row_ins_set_tuple_col_8
(
node
->
row
,
table
->
vers_end
,
IB_UINT64_MAX
,
node
->
vers_end_buf
);
int8store
(
&
mysql_rec
[
t
->
mysql_col_offset
],
IB_UINT64_MAX
);
t
=
&
prebuilt
->
mysql_template
[
table
->
vers_start
];
ut_ad
(
t
->
mysql_col_len
==
8
);
row_ins_set_tuple_col_8
(
node
->
row
,
table
->
vers_start
,
trx
->
id
,
node
->
entry_sys_heap
);
row_ins_set_tuple_col_8
(
node
->
row
,
table
->
vers_start
,
trx
->
id
,
node
->
vers_start_buf
);
int8store
(
&
mysql_rec
[
t
->
mysql_col_offset
],
trx
->
id
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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