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
52a4ef95
Commit
52a4ef95
authored
Oct 08, 2012
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
Also, add debug check for trx_id sanity to row_upd_rec_sys_fields().
parents
bfba296d
b0662086
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
+24
-4
storage/innobase/dict/dict0dict.c
storage/innobase/dict/dict0dict.c
+15
-3
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+6
-1
storage/innobase/include/row0upd.ic
storage/innobase/include/row0upd.ic
+3
-0
No files found.
storage/innobase/dict/dict0dict.c
View file @
52a4ef95
...
...
@@ -2017,7 +2017,6 @@ dict_index_build_internal_clust(
{
dict_index_t
*
new_index
;
dict_field_t
*
field
;
ulint
fixed_size
;
ulint
trx_id_pos
;
ulint
i
;
ibool
*
indexed
;
...
...
@@ -2094,7 +2093,7 @@ dict_index_build_internal_clust(
for
(
i
=
0
;
i
<
trx_id_pos
;
i
++
)
{
fixed_size
=
dict_col_get_fixed_size
(
ulint
fixed_size
=
dict_col_get_fixed_size
(
dict_index_get_nth_col
(
new_index
,
i
),
dict_table_is_comp
(
table
));
...
...
@@ -2111,7 +2110,20 @@ dict_index_build_internal_clust(
break
;
}
new_index
->
trx_id_offset
+=
(
unsigned
int
)
fixed_size
;
/* Add fixed_size to new_index->trx_id_offset.
Because the latter is a bit-field, an overflow
can theoretically occur. Check for it. */
fixed_size
+=
new_index
->
trx_id_offset
;
new_index
->
trx_id_offset
=
fixed_size
;
if
(
new_index
->
trx_id_offset
!=
fixed_size
)
{
/* Overflow. Pretend that this is a
variable-length PRIMARY KEY. */
ut_ad
(
0
);
new_index
->
trx_id_offset
=
0
;
break
;
}
}
}
...
...
storage/innobase/include/dict0mem.h
View file @
52a4ef95
...
...
@@ -377,10 +377,15 @@ struct dict_index_struct{
unsigned
type
:
DICT_IT_BITS
;
/*!< index type (DICT_CLUSTERED, DICT_UNIQUE,
DICT_UNIVERSAL, DICT_IBUF, DICT_CORRUPT) */
unsigned
trx_id_offset
:
10
;
/*!< position of the trx id column
#define MAX_KEY_LENGTH_BITS 12
unsigned
trx_id_offset
:
MAX_KEY_LENGTH_BITS
;
/*!< position of the trx id column
in a clustered index record, if the fields
before it are known to be of a fixed size,
0 otherwise */
#if (1<<MAX_KEY_LENGTH_BITS) < MAX_KEY_LENGTH
# error (1<<MAX_KEY_LENGTH_BITS) < MAX_KEY_LENGTH
#endif
unsigned
n_user_defined_cols
:
10
;
/*!< number of columns the user defined to
be in the index: in the internal
...
...
storage/innobase/include/row0upd.ic
View file @
52a4ef95
...
...
@@ -28,6 +28,7 @@ Created 12/27/1996 Heikki Tuuri
# include "trx0trx.h"
# include "trx0undo.h"
# include "row0row.h"
# include "lock0lock.h"
#endif /* !UNIV_HOTBACKUP */
#include "page0zip.h"
...
...
@@ -171,6 +172,8 @@ row_upd_rec_sys_fields(
#if DATA_TRX_ID + 1 != DATA_ROLL_PTR
# error "DATA_TRX_ID + 1 != DATA_ROLL_PTR"
#endif
ut_ad(lock_check_trx_id_sanity(trx_read_trx_id(rec + offset),
rec, index, offsets, FALSE));
trx_write_trx_id(rec + offset, trx->id);
trx_write_roll_ptr(rec + offset + DATA_TRX_ID_LEN, roll_ptr);
}
...
...
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