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
3c29c489
Commit
3c29c489
authored
Jul 21, 2002
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dict0dict.c:
Revert the test changes to wait for a full push of new auto-inc algorithm
parent
51c80fae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
31 deletions
+8
-31
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+8
-31
No files found.
innobase/dict/dict0dict.c
View file @
3c29c489
...
...
@@ -270,7 +270,7 @@ void
dict_table_autoinc_initialize
(
/*==========================*/
dict_table_t
*
table
,
/* in: table */
ib_longlong
value
)
/* in:
next value to assign
to a row */
ib_longlong
value
)
/* in:
value which was assigned
to a row */
{
mutex_enter
(
&
(
table
->
autoinc_mutex
));
...
...
@@ -281,8 +281,8 @@ dict_table_autoinc_initialize(
}
/************************************************************************
Gets the next autoinc value
(== autoinc counter value), 0 if not yet
in
itialized. If initialized, in
crements the counter by 1. */
Gets the next autoinc value
, 0 if not yet initialized. If initialized,
increments the counter by 1. */
ib_longlong
dict_table_autoinc_get
(
...
...
@@ -298,8 +298,8 @@ dict_table_autoinc_get(
value
=
0
;
}
else
{
value
=
table
->
autoinc
;
table
->
autoinc
=
table
->
autoinc
+
1
;
value
=
table
->
autoinc
;
}
mutex_exit
(
&
(
table
->
autoinc_mutex
));
...
...
@@ -334,43 +334,20 @@ dict_table_autoinc_read(
}
/************************************************************************
Peeks the autoinc counter value, 0 if not yet initialized. Does not
increment the counter. The read not protected by any mutex! */
ib_longlong
dict_table_autoinc_peek
(
/*====================*/
/* out: value of the counter */
dict_table_t
*
table
)
/* in: table */
{
ib_longlong
value
;
if
(
!
table
->
autoinc_inited
)
{
value
=
0
;
}
else
{
value
=
table
->
autoinc
;
}
return
(
value
);
}
/************************************************************************
Updates the autoinc counter if the value supplied is equal or bigger than the
Updates the autoinc counter if the value supplied is bigger than the
current value. If not inited, does nothing. */
void
dict_table_autoinc_update
(
/*======================*/
dict_table_t
*
table
,
/* in: table */
ib_longlong
value
)
/* in: value which was assigned to a row */
{
mutex_enter
(
&
(
table
->
autoinc_mutex
));
if
(
table
->
autoinc_inited
)
{
if
(
value
>
=
table
->
autoinc
)
{
table
->
autoinc
=
value
+
1
;
if
(
value
>
table
->
autoinc
)
{
table
->
autoinc
=
value
;
}
}
...
...
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