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
02f1a6cb
Commit
02f1a6cb
authored
Oct 28, 2010
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post merge fix
parent
9368f11b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
sql/ha_partition.h
sql/ha_partition.h
+0
-12
sql/sql_partition_admin.cc
sql/sql_partition_admin.cc
+2
-0
No files found.
sql/ha_partition.h
View file @
02f1a6cb
...
...
@@ -935,22 +935,16 @@ class ha_partition :public handler
/* lock already taken */
if
(
auto_increment_safe_stmt_log_lock
)
return
;
#ifdef WITH_PARTITION_STORAGE_ENGINE
DBUG_ASSERT
(
table_share
->
ha_part_data
&&
!
auto_increment_lock
);
#endif
if
(
table_share
->
tmp_table
==
NO_TMP_TABLE
)
{
auto_increment_lock
=
TRUE
;
#ifdef WITH_PARTITION_STORAGE_ENGINE
mysql_mutex_lock
(
&
table_share
->
ha_part_data
->
LOCK_auto_inc
);
#endif
}
}
virtual
void
unlock_auto_increment
()
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
DBUG_ASSERT
(
table_share
->
ha_part_data
);
#endif
/*
If auto_increment_safe_stmt_log_lock is true, we have to keep the lock.
It will be set to false and thus unlocked at the end of the statement by
...
...
@@ -958,25 +952,19 @@ class ha_partition :public handler
*/
if
(
auto_increment_lock
&&
!
auto_increment_safe_stmt_log_lock
)
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
mysql_mutex_unlock
(
&
table_share
->
ha_part_data
->
LOCK_auto_inc
);
#endif
auto_increment_lock
=
FALSE
;
}
}
virtual
void
set_auto_increment_if_higher
(
Field
*
field
)
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
ulonglong
nr
=
(((
Field_num
*
)
field
)
->
unsigned_flag
||
field
->
val_int
()
>
0
)
?
field
->
val_int
()
:
0
;
#endif
lock_auto_increment
();
#ifdef WITH_PARTITION_STORAGE_ENGINE
DBUG_ASSERT
(
table_share
->
ha_part_data
->
auto_inc_initialized
==
TRUE
);
/* must check when the mutex is taken */
if
(
nr
>=
table_share
->
ha_part_data
->
next_auto_inc_val
)
table_share
->
ha_part_data
->
next_auto_inc_val
=
nr
+
1
;
#endif
unlock_auto_increment
();
}
...
...
sql/sql_partition_admin.cc
View file @
02f1a6cb
...
...
@@ -18,7 +18,9 @@
#include "sql_lex.h" // Sql_statement
#include "sql_admin.h" // Analyze/Check/.._table_statement
#include "sql_partition_admin.h" // Alter_table_*_partition
#ifdef WITH_PARTITION_STORAGE_ENGINE
#include "ha_partition.h" // ha_partition
#endif
#include "sql_base.h" // open_and_lock_tables
#ifndef WITH_PARTITION_STORAGE_ENGINE
...
...
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