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
13802fef
Commit
13802fef
authored
Jan 24, 2019
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.6.42-84.2
parent
a816eac9
Changes
35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
1778 additions
and
1075 deletions
+1778
-1075
storage/tokudb/PerconaFT/COPYING.APACHEv2
storage/tokudb/PerconaFT/COPYING.APACHEv2
+174
-0
storage/tokudb/PerconaFT/README.md
storage/tokudb/PerconaFT/README.md
+4
-1
storage/tokudb/PerconaFT/ft/txn/txn_manager.h
storage/tokudb/PerconaFT/ft/txn/txn_manager.h
+2
-2
storage/tokudb/PerconaFT/locktree/concurrent_tree.cc
storage/tokudb/PerconaFT/locktree/concurrent_tree.cc
+14
-0
storage/tokudb/PerconaFT/locktree/concurrent_tree.h
storage/tokudb/PerconaFT/locktree/concurrent_tree.h
+14
-0
storage/tokudb/PerconaFT/locktree/keyrange.cc
storage/tokudb/PerconaFT/locktree/keyrange.cc
+13
-0
storage/tokudb/PerconaFT/locktree/keyrange.h
storage/tokudb/PerconaFT/locktree/keyrange.h
+13
-0
storage/tokudb/PerconaFT/locktree/lock_request.cc
storage/tokudb/PerconaFT/locktree/lock_request.cc
+13
-0
storage/tokudb/PerconaFT/locktree/lock_request.h
storage/tokudb/PerconaFT/locktree/lock_request.h
+13
-0
storage/tokudb/PerconaFT/locktree/locktree.cc
storage/tokudb/PerconaFT/locktree/locktree.cc
+13
-0
storage/tokudb/PerconaFT/locktree/locktree.h
storage/tokudb/PerconaFT/locktree/locktree.h
+13
-0
storage/tokudb/PerconaFT/locktree/manager.cc
storage/tokudb/PerconaFT/locktree/manager.cc
+13
-0
storage/tokudb/PerconaFT/locktree/range_buffer.cc
storage/tokudb/PerconaFT/locktree/range_buffer.cc
+13
-0
storage/tokudb/PerconaFT/locktree/range_buffer.h
storage/tokudb/PerconaFT/locktree/range_buffer.h
+13
-0
storage/tokudb/PerconaFT/locktree/treenode.cc
storage/tokudb/PerconaFT/locktree/treenode.cc
+13
-0
storage/tokudb/PerconaFT/locktree/treenode.h
storage/tokudb/PerconaFT/locktree/treenode.h
+13
-0
storage/tokudb/PerconaFT/locktree/txnid_set.cc
storage/tokudb/PerconaFT/locktree/txnid_set.cc
+13
-0
storage/tokudb/PerconaFT/locktree/txnid_set.h
storage/tokudb/PerconaFT/locktree/txnid_set.h
+13
-0
storage/tokudb/PerconaFT/locktree/wfg.cc
storage/tokudb/PerconaFT/locktree/wfg.cc
+13
-0
storage/tokudb/PerconaFT/locktree/wfg.h
storage/tokudb/PerconaFT/locktree/wfg.h
+13
-0
storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc
storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc
+6
-6
storage/tokudb/PerconaFT/portability/toku_instr_mysql.h
storage/tokudb/PerconaFT/portability/toku_instr_mysql.h
+9
-2
storage/tokudb/PerconaFT/portability/toku_pthread.h
storage/tokudb/PerconaFT/portability/toku_pthread.h
+39
-39
storage/tokudb/PerconaFT/tools/CMakeLists.txt
storage/tokudb/PerconaFT/tools/CMakeLists.txt
+2
-6
storage/tokudb/PerconaFT/util/growable_array.h
storage/tokudb/PerconaFT/util/growable_array.h
+13
-0
storage/tokudb/PerconaFT/util/omt.cc
storage/tokudb/PerconaFT/util/omt.cc
+1256
-1005
storage/tokudb/PerconaFT/util/omt.h
storage/tokudb/PerconaFT/util/omt.h
+13
-0
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+10
-0
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+2
-2
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+0
-1
storage/tokudb/mysql-test/tokudb_bugs/r/PS-4979.result
storage/tokudb/mysql-test/tokudb_bugs/r/PS-4979.result
+2
-0
storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test
storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test
+12
-0
storage/tokudb/tokudb_background.cc
storage/tokudb/tokudb_background.cc
+2
-2
storage/tokudb/tokudb_sysvars.cc
storage/tokudb/tokudb_sysvars.cc
+7
-7
storage/tokudb/tokudb_sysvars.h
storage/tokudb/tokudb_sysvars.h
+2
-2
No files found.
storage/tokudb/PerconaFT/COPYING.APACHEv2
0 → 100644
View file @
13802fef
This diff is collapsed.
Click to expand it.
storage/tokudb/PerconaFT/README.md
View file @
13802fef
...
@@ -104,11 +104,14 @@ All source code and test contributions must be provided under a [BSD 2-Clause][b
...
@@ -104,11 +104,14 @@ All source code and test contributions must be provided under a [BSD 2-Clause][b
License
License
-------
-------
Portions of the PerconaFT library (the 'locktree' and 'omt') are available under the Apache version 2 license.
PerconaFT is available under the GPL version 2, and AGPL version 3.
PerconaFT is available under the GPL version 2, and AGPL version 3.
See
[
COPYING.AGPLv3
][
agpllicense
]
,
See
[
COPYING.APACHEv2
][
apachelicense
]
,
[
COPYING.AGPLv3
][
agpllicense
]
,
[
COPYING.GPLv2
][
gpllicense
]
, and
[
COPYING.GPLv2
][
gpllicense
]
, and
[
PATENTS
][
patents
]
.
[
PATENTS
][
patents
]
.
[
apachelicense
]:
http://github.com/Percona/PerconaFT/blob/master/COPYING.APACHEv2
[
agpllicense
]:
http://github.com/Percona/PerconaFT/blob/master/COPYING.AGPLv3
[
agpllicense
]:
http://github.com/Percona/PerconaFT/blob/master/COPYING.AGPLv3
[
gpllicense
]:
http://github.com/Percona/PerconaFT/blob/master/COPYING.GPLv2
[
gpllicense
]:
http://github.com/Percona/PerconaFT/blob/master/COPYING.GPLv2
[
patents
]:
http://github.com/Percona/PerconaFT/blob/master/PATENTS
[
patents
]:
http://github.com/Percona/PerconaFT/blob/master/PATENTS
storage/tokudb/PerconaFT/ft/txn/txn_manager.h
View file @
13802fef
...
@@ -46,11 +46,11 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -46,11 +46,11 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
void
set_test_txn_sync_callback
(
void
(
*
)
(
pthread_t
,
void
*
),
void
*
);
void
set_test_txn_sync_callback
(
void
(
*
)
(
pthread_t
,
void
*
),
void
*
);
#define toku_test_txn_sync_callback(a) ((test_txn_sync_callback)? test_txn_sync_callback( a,test_txn_sync_callback_extra) : (void) 0)
#define toku_test_txn_sync_callback(a) ((test_txn_sync_callback)? test_txn_sync_callback( a,test_txn_sync_callback_extra) : (void) 0)
#if
TOKU_DEBUG_TXN_SYNC
#if
defined(TOKU_DEBUG_TXN_SYNC)
#define toku_debug_txn_sync(a) toku_test_txn_sync_callback(a)
#define toku_debug_txn_sync(a) toku_test_txn_sync_callback(a)
#else
#else
#define toku_debug_txn_sync(a) ((void) 0)
#define toku_debug_txn_sync(a) ((void) 0)
#endif
#endif
// defined(TOKU_DEBUG_TXN_SYNC)
typedef
struct
txn_manager
*
TXN_MANAGER
;
typedef
struct
txn_manager
*
TXN_MANAGER
;
...
...
storage/tokudb/PerconaFT/locktree/concurrent_tree.cc
View file @
13802fef
...
@@ -32,6 +32,20 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,20 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/concurrent_tree.h
View file @
13802fef
...
@@ -32,6 +32,20 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,20 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/keyrange.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/keyrange.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/lock_request.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/lock_request.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/locktree.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/locktree.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/manager.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/range_buffer.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/range_buffer.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/treenode.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/treenode.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/txnid_set.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/txnid_set.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/wfg.cc
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/locktree/wfg.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc
View file @
13802fef
...
@@ -184,9 +184,9 @@ void toku_instr_file_io_end(toku_io_instrumentation &io_instr, ssize_t count) {
...
@@ -184,9 +184,9 @@ void toku_instr_file_io_end(toku_io_instrumentation &io_instr, ssize_t count) {
void
toku_instr_mutex_init
(
const
toku_instr_key
&
key
,
toku_mutex_t
&
mutex
)
{
void
toku_instr_mutex_init
(
const
toku_instr_key
&
key
,
toku_mutex_t
&
mutex
)
{
mutex
.
psi_mutex
=
PSI_MUTEX_CALL
(
init_mutex
)(
key
.
id
(),
&
mutex
.
pmutex
);
mutex
.
psi_mutex
=
PSI_MUTEX_CALL
(
init_mutex
)(
key
.
id
(),
&
mutex
.
pmutex
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
mutex
.
instr_key_id
=
key
.
id
();
mutex
.
instr_key_id
=
key
.
id
();
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
}
}
void
toku_instr_mutex_destroy
(
PSI_mutex
*&
mutex_instr
)
{
void
toku_instr_mutex_destroy
(
PSI_mutex
*&
mutex_instr
)
{
...
@@ -242,9 +242,9 @@ void toku_instr_mutex_unlock(PSI_mutex *mutex_instr) {
...
@@ -242,9 +242,9 @@ void toku_instr_mutex_unlock(PSI_mutex *mutex_instr) {
void
toku_instr_cond_init
(
const
toku_instr_key
&
key
,
toku_cond_t
&
cond
)
{
void
toku_instr_cond_init
(
const
toku_instr_key
&
key
,
toku_cond_t
&
cond
)
{
cond
.
psi_cond
=
PSI_COND_CALL
(
init_cond
)(
key
.
id
(),
&
cond
.
pcond
);
cond
.
psi_cond
=
PSI_COND_CALL
(
init_cond
)(
key
.
id
(),
&
cond
.
pcond
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
cond
.
instr_key_id
=
key
.
id
();
cond
.
instr_key_id
=
key
.
id
();
#endif
#endif
// // defined(TOKU_PTHREAD_DEBUG)
}
}
void
toku_instr_cond_destroy
(
PSI_cond
*&
cond_instr
)
{
void
toku_instr_cond_destroy
(
PSI_cond
*&
cond_instr
)
{
...
@@ -295,9 +295,9 @@ void toku_instr_cond_broadcast(const toku_cond_t &cond) {
...
@@ -295,9 +295,9 @@ void toku_instr_cond_broadcast(const toku_cond_t &cond) {
void
toku_instr_rwlock_init
(
const
toku_instr_key
&
key
,
void
toku_instr_rwlock_init
(
const
toku_instr_key
&
key
,
toku_pthread_rwlock_t
&
rwlock
)
{
toku_pthread_rwlock_t
&
rwlock
)
{
rwlock
.
psi_rwlock
=
PSI_RWLOCK_CALL
(
init_rwlock
)(
key
.
id
(),
&
rwlock
.
rwlock
);
rwlock
.
psi_rwlock
=
PSI_RWLOCK_CALL
(
init_rwlock
)(
key
.
id
(),
&
rwlock
.
rwlock
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
rwlock
.
instr_key_id
=
key
.
id
();
rwlock
.
instr_key_id
=
key
.
id
();
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
}
}
void
toku_instr_rwlock_destroy
(
PSI_rwlock
*&
rwlock_instr
)
{
void
toku_instr_rwlock_destroy
(
PSI_rwlock
*&
rwlock_instr
)
{
...
...
storage/tokudb/PerconaFT/portability/toku_instr_mysql.h
View file @
13802fef
...
@@ -12,8 +12,15 @@
...
@@ -12,8 +12,15 @@
// undefine them here to avoid compilation errors.
// undefine them here to avoid compilation errors.
#undef __STDC_FORMAT_MACROS
#undef __STDC_FORMAT_MACROS
#undef __STDC_LIMIT_MACROS
#undef __STDC_LIMIT_MACROS
#include <mysql/psi/mysql_file.h> // PSI_file
#include "mysql/psi/mysql_file.h" // PSI_file
#include <mysql/psi/mysql_thread.h> // PSI_mutex
#include "mysql/psi/mysql_thread.h" // PSI_mutex
#include "mysql/psi/mysql_stage.h" // PSI_stage
#if (MYSQL_VERSION_ID >= 80000)
#include "mysql/psi/mysql_cond.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysql/psi/mysql_rwlock.h"
#endif // (MYSQL_VERSION_ID >= nn)
#ifndef HAVE_PSI_MUTEX_INTERFACE
#ifndef HAVE_PSI_MUTEX_INTERFACE
#error HAVE_PSI_MUTEX_INTERFACE required
#error HAVE_PSI_MUTEX_INTERFACE required
...
...
storage/tokudb/PerconaFT/portability/toku_pthread.h
View file @
13802fef
...
@@ -64,23 +64,23 @@ struct toku_mutex_t {
...
@@ -64,23 +64,23 @@ struct toku_mutex_t {
pthread_mutex_t
pmutex
;
pthread_mutex_t
pmutex
;
struct
PSI_mutex
struct
PSI_mutex
*
psi_mutex
;
/* The performance schema instrumentation hook */
*
psi_mutex
;
/* The performance schema instrumentation hook */
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
pthread_t
owner
;
// = pthread_self(); // for debugging
pthread_t
owner
;
// = pthread_self(); // for debugging
bool
locked
;
bool
locked
;
bool
valid
;
bool
valid
;
pfs_key_t
instr_key_id
;
pfs_key_t
instr_key_id
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
};
};
struct
toku_cond_t
{
struct
toku_cond_t
{
pthread_cond_t
pcond
;
pthread_cond_t
pcond
;
struct
PSI_cond
*
psi_cond
;
struct
PSI_cond
*
psi_cond
;
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
pfs_key_t
instr_key_id
;
pfs_key_t
instr_key_id
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
};
};
#if
def TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
#define TOKU_COND_INITIALIZER \
#define TOKU_COND_INITIALIZER \
{ \
{ \
.pcond = PTHREAD_COND_INITIALIZER, .psi_cond = nullptr, \
.pcond = PTHREAD_COND_INITIALIZER, .psi_cond = nullptr, \
...
@@ -89,14 +89,14 @@ struct toku_cond_t {
...
@@ -89,14 +89,14 @@ struct toku_cond_t {
#else
#else
#define TOKU_COND_INITIALIZER \
#define TOKU_COND_INITIALIZER \
{ .pcond = PTHREAD_COND_INITIALIZER, .psi_cond = nullptr }
{ .pcond = PTHREAD_COND_INITIALIZER, .psi_cond = nullptr }
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
struct
toku_pthread_rwlock_t
{
struct
toku_pthread_rwlock_t
{
pthread_rwlock_t
rwlock
;
pthread_rwlock_t
rwlock
;
struct
PSI_rwlock
*
psi_rwlock
;
struct
PSI_rwlock
*
psi_rwlock
;
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
pfs_key_t
instr_key_id
;
pfs_key_t
instr_key_id
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
};
};
typedef
struct
toku_mutex_aligned
{
typedef
struct
toku_mutex_aligned
{
...
@@ -117,7 +117,7 @@ typedef struct toku_mutex_aligned {
...
@@ -117,7 +117,7 @@ typedef struct toku_mutex_aligned {
#define ZERO_MUTEX_INITIALIZER \
#define ZERO_MUTEX_INITIALIZER \
{}
{}
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
#define TOKU_MUTEX_INITIALIZER \
#define TOKU_MUTEX_INITIALIZER \
{ \
{ \
.pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr, .owner = 0, \
.pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr, .owner = 0, \
...
@@ -126,12 +126,12 @@ typedef struct toku_mutex_aligned {
...
@@ -126,12 +126,12 @@ typedef struct toku_mutex_aligned {
#else
#else
#define TOKU_MUTEX_INITIALIZER \
#define TOKU_MUTEX_INITIALIZER \
{ .pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr }
{ .pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr }
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
// Darwin doesn't provide adaptive mutexes
// Darwin doesn't provide adaptive mutexes
#if defined(__APPLE__)
#if defined(__APPLE__)
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_DEFAULT
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_DEFAULT
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
{ \
{ \
.pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr, .owner = 0, \
.pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr, .owner = 0, \
...
@@ -140,10 +140,10 @@ typedef struct toku_mutex_aligned {
...
@@ -140,10 +140,10 @@ typedef struct toku_mutex_aligned {
#else
#else
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
{ .pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr }
{ .pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr }
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
#else // __FreeBSD__, __linux__, at least
#else // __FreeBSD__, __linux__, at least
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_ADAPTIVE_NP
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_ADAPTIVE_NP
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
{ \
{ \
.pmutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP, .psi_mutex = nullptr, \
.pmutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP, .psi_mutex = nullptr, \
...
@@ -152,8 +152,8 @@ typedef struct toku_mutex_aligned {
...
@@ -152,8 +152,8 @@ typedef struct toku_mutex_aligned {
#else
#else
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
{ .pmutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP, .psi_mutex = nullptr }
{ .pmutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP, .psi_mutex = nullptr }
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
#endif
#endif
// defined(__APPLE__)
// Different OSes implement mutexes as different amounts of nested structs.
// Different OSes implement mutexes as different amounts of nested structs.
// C++ will fill out all missing values with zeroes if you provide at least one
// C++ will fill out all missing values with zeroes if you provide at least one
...
@@ -188,7 +188,7 @@ toku_mutexattr_destroy(toku_pthread_mutexattr_t *attr) {
...
@@ -188,7 +188,7 @@ toku_mutexattr_destroy(toku_pthread_mutexattr_t *attr) {
assert_zero
(
r
);
assert_zero
(
r
);
}
}
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
static
inline
void
toku_mutex_assert_locked
(
const
toku_mutex_t
*
mutex
)
{
static
inline
void
toku_mutex_assert_locked
(
const
toku_mutex_t
*
mutex
)
{
invariant
(
mutex
->
locked
);
invariant
(
mutex
->
locked
);
invariant
(
mutex
->
owner
==
pthread_self
());
invariant
(
mutex
->
owner
==
pthread_self
());
...
@@ -197,7 +197,7 @@ static inline void toku_mutex_assert_locked(const toku_mutex_t *mutex) {
...
@@ -197,7 +197,7 @@ static inline void toku_mutex_assert_locked(const toku_mutex_t *mutex) {
static
inline
void
static
inline
void
toku_mutex_assert_locked
(
const
toku_mutex_t
*
mutex
__attribute__
((
unused
)))
{
toku_mutex_assert_locked
(
const
toku_mutex_t
*
mutex
__attribute__
((
unused
)))
{
}
}
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
// asserting that a mutex is unlocked only makes sense
// asserting that a mutex is unlocked only makes sense
// if the calling thread can guaruntee that no other threads
// if the calling thread can guaruntee that no other threads
...
@@ -207,7 +207,7 @@ toku_mutex_assert_locked(const toku_mutex_t *mutex __attribute__((unused))) {
...
@@ -207,7 +207,7 @@ toku_mutex_assert_locked(const toku_mutex_t *mutex __attribute__((unused))) {
// when a node is locked the caller knows that no other threads
// when a node is locked the caller knows that no other threads
// can be trying to lock its childrens' mutexes. the children
// can be trying to lock its childrens' mutexes. the children
// are in one of two fixed states: locked or unlocked.
// are in one of two fixed states: locked or unlocked.
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
static
inline
void
static
inline
void
toku_mutex_assert_unlocked
(
toku_mutex_t
*
mutex
)
{
toku_mutex_assert_unlocked
(
toku_mutex_t
*
mutex
)
{
invariant
(
mutex
->
owner
==
0
);
invariant
(
mutex
->
owner
==
0
);
...
@@ -216,7 +216,7 @@ toku_mutex_assert_unlocked(toku_mutex_t *mutex) {
...
@@ -216,7 +216,7 @@ toku_mutex_assert_unlocked(toku_mutex_t *mutex) {
#else
#else
static
inline
void
toku_mutex_assert_unlocked
(
toku_mutex_t
*
mutex
static
inline
void
toku_mutex_assert_unlocked
(
toku_mutex_t
*
mutex
__attribute__
((
unused
)))
{}
__attribute__
((
unused
)))
{}
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
#define toku_mutex_lock(M) \
#define toku_mutex_lock(M) \
toku_mutex_lock_with_source_location(M, __FILE__, __LINE__)
toku_mutex_lock_with_source_location(M, __FILE__, __LINE__)
...
@@ -231,13 +231,13 @@ static inline void toku_cond_init(toku_cond_t *cond,
...
@@ -231,13 +231,13 @@ static inline void toku_cond_init(toku_cond_t *cond,
toku_mutex_trylock_with_source_location(M, __FILE__, __LINE__)
toku_mutex_trylock_with_source_location(M, __FILE__, __LINE__)
inline
void
toku_mutex_unlock
(
toku_mutex_t
*
mutex
)
{
inline
void
toku_mutex_unlock
(
toku_mutex_t
*
mutex
)
{
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
mutex
->
owner
==
pthread_self
());
invariant
(
mutex
->
owner
==
pthread_self
());
invariant
(
mutex
->
valid
);
invariant
(
mutex
->
valid
);
invariant
(
mutex
->
locked
);
invariant
(
mutex
->
locked
);
mutex
->
locked
=
false
;
mutex
->
locked
=
false
;
mutex
->
owner
=
0
;
mutex
->
owner
=
0
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
toku_instr_mutex_unlock
(
mutex
->
psi_mutex
);
toku_instr_mutex_unlock
(
mutex
->
psi_mutex
);
int
r
=
pthread_mutex_unlock
(
&
mutex
->
pmutex
);
int
r
=
pthread_mutex_unlock
(
&
mutex
->
pmutex
);
assert_zero
(
r
);
assert_zero
(
r
);
...
@@ -254,13 +254,13 @@ inline void toku_mutex_lock_with_source_location(toku_mutex_t *mutex,
...
@@ -254,13 +254,13 @@ inline void toku_mutex_lock_with_source_location(toku_mutex_t *mutex,
toku_instr_mutex_lock_end
(
mutex_instr
,
r
);
toku_instr_mutex_lock_end
(
mutex_instr
,
r
);
assert_zero
(
r
);
assert_zero
(
r
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
mutex
->
valid
);
invariant
(
mutex
->
valid
);
invariant
(
!
mutex
->
locked
);
invariant
(
!
mutex
->
locked
);
invariant
(
mutex
->
owner
==
0
);
invariant
(
mutex
->
owner
==
0
);
mutex
->
locked
=
true
;
mutex
->
locked
=
true
;
mutex
->
owner
=
pthread_self
();
mutex
->
owner
=
pthread_self
();
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
}
}
inline
int
toku_mutex_trylock_with_source_location
(
toku_mutex_t
*
mutex
,
inline
int
toku_mutex_trylock_with_source_location
(
toku_mutex_t
*
mutex
,
...
@@ -273,7 +273,7 @@ inline int toku_mutex_trylock_with_source_location(toku_mutex_t *mutex,
...
@@ -273,7 +273,7 @@ inline int toku_mutex_trylock_with_source_location(toku_mutex_t *mutex,
const
int
r
=
pthread_mutex_lock
(
&
mutex
->
pmutex
);
const
int
r
=
pthread_mutex_lock
(
&
mutex
->
pmutex
);
toku_instr_mutex_lock_end
(
mutex_instr
,
r
);
toku_instr_mutex_lock_end
(
mutex_instr
,
r
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
if
(
r
==
0
)
{
if
(
r
==
0
)
{
invariant
(
mutex
->
valid
);
invariant
(
mutex
->
valid
);
invariant
(
!
mutex
->
locked
);
invariant
(
!
mutex
->
locked
);
...
@@ -281,7 +281,7 @@ inline int toku_mutex_trylock_with_source_location(toku_mutex_t *mutex,
...
@@ -281,7 +281,7 @@ inline int toku_mutex_trylock_with_source_location(toku_mutex_t *mutex,
mutex
->
locked
=
true
;
mutex
->
locked
=
true
;
mutex
->
owner
=
pthread_self
();
mutex
->
owner
=
pthread_self
();
}
}
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
return
r
;
return
r
;
}
}
...
@@ -310,11 +310,11 @@ inline void toku_cond_wait_with_source_location(toku_cond_t *cond,
...
@@ -310,11 +310,11 @@ inline void toku_cond_wait_with_source_location(toku_cond_t *cond,
const
char
*
src_file
,
const
char
*
src_file
,
uint
src_line
)
{
uint
src_line
)
{
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
mutex
->
locked
);
invariant
(
mutex
->
locked
);
mutex
->
locked
=
false
;
mutex
->
locked
=
false
;
mutex
->
owner
=
0
;
mutex
->
owner
=
0
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
/* Instrumentation start */
/* Instrumentation start */
toku_cond_instrumentation
cond_instr
;
toku_cond_instrumentation
cond_instr
;
...
@@ -332,11 +332,11 @@ inline void toku_cond_wait_with_source_location(toku_cond_t *cond,
...
@@ -332,11 +332,11 @@ inline void toku_cond_wait_with_source_location(toku_cond_t *cond,
toku_instr_cond_wait_end
(
cond_instr
,
r
);
toku_instr_cond_wait_end
(
cond_instr
,
r
);
assert_zero
(
r
);
assert_zero
(
r
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
!
mutex
->
locked
);
invariant
(
!
mutex
->
locked
);
mutex
->
locked
=
true
;
mutex
->
locked
=
true
;
mutex
->
owner
=
pthread_self
();
mutex
->
owner
=
pthread_self
();
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
}
}
inline
int
toku_cond_timedwait_with_source_location
(
toku_cond_t
*
cond
,
inline
int
toku_cond_timedwait_with_source_location
(
toku_cond_t
*
cond
,
...
@@ -344,11 +344,11 @@ inline int toku_cond_timedwait_with_source_location(toku_cond_t *cond,
...
@@ -344,11 +344,11 @@ inline int toku_cond_timedwait_with_source_location(toku_cond_t *cond,
toku_timespec_t
*
wakeup_at
,
toku_timespec_t
*
wakeup_at
,
const
char
*
src_file
,
const
char
*
src_file
,
uint
src_line
)
{
uint
src_line
)
{
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
mutex
->
locked
);
invariant
(
mutex
->
locked
);
mutex
->
locked
=
false
;
mutex
->
locked
=
false
;
mutex
->
owner
=
0
;
mutex
->
owner
=
0
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
/* Instrumentation start */
/* Instrumentation start */
toku_cond_instrumentation
cond_instr
;
toku_cond_instrumentation
cond_instr
;
...
@@ -366,11 +366,11 @@ inline int toku_cond_timedwait_with_source_location(toku_cond_t *cond,
...
@@ -366,11 +366,11 @@ inline int toku_cond_timedwait_with_source_location(toku_cond_t *cond,
/* Instrumentation end */
/* Instrumentation end */
toku_instr_cond_wait_end
(
cond_instr
,
r
);
toku_instr_cond_wait_end
(
cond_instr
,
r
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
!
mutex
->
locked
);
invariant
(
!
mutex
->
locked
);
mutex
->
locked
=
true
;
mutex
->
locked
=
true
;
mutex
->
owner
=
pthread_self
();
mutex
->
owner
=
pthread_self
();
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
return
r
;
return
r
;
}
}
...
@@ -389,26 +389,26 @@ inline void toku_cond_broadcast(toku_cond_t *cond) {
...
@@ -389,26 +389,26 @@ inline void toku_cond_broadcast(toku_cond_t *cond) {
inline
void
toku_mutex_init
(
const
toku_instr_key
&
key
,
inline
void
toku_mutex_init
(
const
toku_instr_key
&
key
,
toku_mutex_t
*
mutex
,
toku_mutex_t
*
mutex
,
const
toku_pthread_mutexattr_t
*
attr
)
{
const
toku_pthread_mutexattr_t
*
attr
)
{
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
mutex
->
valid
=
true
;
mutex
->
valid
=
true
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
toku_instr_mutex_init
(
key
,
*
mutex
);
toku_instr_mutex_init
(
key
,
*
mutex
);
const
int
r
=
pthread_mutex_init
(
&
mutex
->
pmutex
,
attr
);
const
int
r
=
pthread_mutex_init
(
&
mutex
->
pmutex
,
attr
);
assert_zero
(
r
);
assert_zero
(
r
);
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
mutex
->
locked
=
false
;
mutex
->
locked
=
false
;
invariant
(
mutex
->
valid
);
invariant
(
mutex
->
valid
);
mutex
->
valid
=
true
;
mutex
->
valid
=
true
;
mutex
->
owner
=
0
;
mutex
->
owner
=
0
;
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
}
}
inline
void
toku_mutex_destroy
(
toku_mutex_t
*
mutex
)
{
inline
void
toku_mutex_destroy
(
toku_mutex_t
*
mutex
)
{
#if
TOKU_PTHREAD_DEBUG
#if
defined(TOKU_PTHREAD_DEBUG)
invariant
(
mutex
->
valid
);
invariant
(
mutex
->
valid
);
mutex
->
valid
=
false
;
mutex
->
valid
=
false
;
invariant
(
!
mutex
->
locked
);
invariant
(
!
mutex
->
locked
);
#endif
#endif
// defined(TOKU_PTHREAD_DEBUG)
toku_instr_mutex_destroy
(
mutex
->
psi_mutex
);
toku_instr_mutex_destroy
(
mutex
->
psi_mutex
);
int
r
=
pthread_mutex_destroy
(
&
mutex
->
pmutex
);
int
r
=
pthread_mutex_destroy
(
&
mutex
->
pmutex
);
assert_zero
(
r
);
assert_zero
(
r
);
...
...
storage/tokudb/PerconaFT/tools/CMakeLists.txt
View file @
13802fef
...
@@ -15,16 +15,12 @@ foreach(tool ${tools})
...
@@ -15,16 +15,12 @@ foreach(tool ${tools})
if
((
CMAKE_BUILD_TYPE MATCHES
"Debug"
)
AND
if
((
CMAKE_BUILD_TYPE MATCHES
"Debug"
)
AND
(
CMAKE_CXX_FLAGS_DEBUG MATCHES
" -DENABLED_DEBUG_SYNC"
))
(
CMAKE_CXX_FLAGS_DEBUG MATCHES
" -DENABLED_DEBUG_SYNC"
))
if
(
MYSQL_BASE_VERSION VERSION_EQUAL
"8.0"
)
if
(
MYSQL_BASE_VERSION VERSION_EQUAL
"8.0"
)
target_link_libraries
(
${
tool
}
sql_main sql_gis sql_main binlog rpl master slave
${
ICU_LIBRARIES
}
)
target_link_libraries
(
${
tool
}
sql_main sql_gis sql_main
sql_dd sql_gis
binlog rpl master slave
${
ICU_LIBRARIES
}
)
else
()
else
()
target_link_libraries
(
${
tool
}
sql binlog rpl master slave
)
target_link_libraries
(
${
tool
}
sql binlog rpl master slave
)
endif
()
endif
()
else
()
else
()
if
(
MYSQL_BASE_VERSION VERSION_EQUAL
"8.0"
)
target_link_libraries
(
${
tool
}
perconaserverclient
)
target_link_libraries
(
${
tool
}
mysqlclient
)
else
()
target_link_libraries
(
${
tool
}
perconaserverclient
)
endif
()
endif
()
endif
()
endif
()
endif
()
...
...
storage/tokudb/PerconaFT/util/growable_array.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/PerconaFT/util/omt.cc
View file @
13802fef
This diff is collapsed.
Click to expand it.
storage/tokudb/PerconaFT/util/omt.h
View file @
13802fef
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
...
@@ -32,6 +32,19 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
======= */
======= */
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
...
...
storage/tokudb/ha_tokudb.cc
View file @
13802fef
...
@@ -7252,6 +7252,16 @@ int ha_tokudb::create(
...
@@ -7252,6 +7252,16 @@ int ha_tokudb::create(
tokudb_trx_data
*
trx
=
NULL
;
tokudb_trx_data
*
trx
=
NULL
;
THD
*
thd
=
ha_thd
();
THD
*
thd
=
ha_thd
();
String
database_name
,
table_name
,
dictionary_name
;
tokudb_split_dname
(
name
,
database_name
,
table_name
,
dictionary_name
);
if
(
database_name
.
is_empty
()
||
table_name
.
is_empty
())
{
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
ER_TABLE_NAME
,
"TokuDB: Table Name or Database Name is empty"
);
DBUG_RETURN
(
ER_TABLE_NAME
);
}
memset
(
&
kc_info
,
0
,
sizeof
(
kc_info
));
memset
(
&
kc_info
,
0
,
sizeof
(
kc_info
));
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100999
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100999
...
...
storage/tokudb/hatoku_hton.cc
View file @
13802fef
...
@@ -575,10 +575,10 @@ static int tokudb_init_func(void *p) {
...
@@ -575,10 +575,10 @@ static int tokudb_init_func(void *p) {
db_env
->
set_update
(
db_env
,
tokudb_update_fun
);
db_env
->
set_update
(
db_env
,
tokudb_update_fun
);
db_env_set_direct_io
(
tokudb
::
sysvars
::
directio
==
TRUE
);
db_env_set_direct_io
(
tokudb
::
sysvars
::
directio
);
db_env_set_compress_buffers_before_eviction
(
db_env_set_compress_buffers_before_eviction
(
tokudb
::
sysvars
::
compress_buffers_before_eviction
==
TRUE
);
tokudb
::
sysvars
::
compress_buffers_before_eviction
);
db_env
->
change_fsync_log_period
(
db_env
,
tokudb
::
sysvars
::
fsync_log_period
);
db_env
->
change_fsync_log_period
(
db_env
,
tokudb
::
sysvars
::
fsync_log_period
);
...
...
storage/tokudb/hatoku_hton.h
View file @
13802fef
...
@@ -190,7 +190,6 @@ inline bool tokudb_killed_thd_callback(void* extra,
...
@@ -190,7 +190,6 @@ inline bool tokudb_killed_thd_callback(void* extra,
return
thd_killed
(
thd
)
!=
0
;
return
thd_killed
(
thd
)
!=
0
;
}
}
extern
HASH
tokudb_open_tables
;
extern
const
char
*
tokudb_hton_name
;
extern
const
char
*
tokudb_hton_name
;
extern
int
tokudb_hton_initialized
;
extern
int
tokudb_hton_initialized
;
extern
tokudb
::
thread
::
rwlock_t
tokudb_hton_initialized_lock
;
extern
tokudb
::
thread
::
rwlock_t
tokudb_hton_initialized_lock
;
...
...
storage/tokudb/mysql-test/tokudb_bugs/r/PS-4979.result
0 → 100644
View file @
13802fef
CREATE TABLE `#mysql50#q.q`(f1 INT KEY) ENGINE=TOKUDB;
ERROR HY000: Got error 1632 from storage engine
storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test
0 → 100644
View file @
13802fef
--
source
include
/
have_tokudb
.
inc
# PS-4979 : Dropping TokuDB table with non-alphanumeric characters could lead
# to a crash
#
# `#mysql50#q.q` is an invalid table name, but the server side doesn't detect it
# and complain. Instead it passes in an empty table name to the engine. The
# engine expects a table name in the form of a relative path like
# "./databasename/tablename". InnoDB detects this in parsing the table name
# during the creation and returns an error.
--
error
ER_GET_ERRNO
CREATE
TABLE
`#mysql50#q.q`
(
f1
INT
KEY
)
ENGINE
=
TOKUDB
;
storage/tokudb/tokudb_background.cc
View file @
13802fef
...
@@ -182,14 +182,14 @@ void* job_manager_t::real_thread_func() {
...
@@ -182,14 +182,14 @@ void* job_manager_t::real_thread_func() {
if
(
res
==
tokudb
::
thread
::
semaphore_t
::
E_INTERRUPTED
||
_shutdown
)
{
if
(
res
==
tokudb
::
thread
::
semaphore_t
::
E_INTERRUPTED
||
_shutdown
)
{
break
;
break
;
}
else
if
(
res
==
tokudb
::
thread
::
semaphore_t
::
E_SIGNALLED
)
{
}
else
if
(
res
==
tokudb
::
thread
::
semaphore_t
::
E_SIGNALLED
)
{
#if
TOKUDB_DEBUG
#if
defined(TOKUDB_DEBUG)
if
(
TOKUDB_UNLIKELY
(
if
(
TOKUDB_UNLIKELY
(
tokudb
::
sysvars
::
debug_pause_background_job_manager
))
{
tokudb
::
sysvars
::
debug_pause_background_job_manager
))
{
_sem
.
signal
();
_sem
.
signal
();
tokudb
::
time
::
sleep_microsec
(
250000
);
tokudb
::
time
::
sleep_microsec
(
250000
);
continue
;
continue
;
}
}
#endif //
TOKUDB_DEBUG
#endif //
defined(TOKUDB_DEBUG)
mutex_t_lock
(
_mutex
);
mutex_t_lock
(
_mutex
);
assert_debug
(
_background_jobs
.
size
()
>
0
);
assert_debug
(
_background_jobs
.
size
()
>
0
);
...
...
storage/tokudb/tokudb_sysvars.cc
View file @
13802fef
...
@@ -662,13 +662,13 @@ static MYSQL_THDVAR_ULONGLONG(
...
@@ -662,13 +662,13 @@ static MYSQL_THDVAR_ULONGLONG(
~
0ULL
,
~
0ULL
,
1
);
1
);
static
MYSQL_THDVAR_STR
(
static
MYSQL_THDVAR_STR
(
last_lock_timeout
,
last_lock_timeout
,
PLUGIN_VAR_MEMALLOC
|
PLUGIN_VAR_NOCMDOPT
|
PLUGIN_VAR_MEMALLOC
,
PLUGIN_VAR_READONLY
,
"last lock timeout"
,
"last lock timeout"
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
NULL
);
static
MYSQL_THDVAR_BOOL
(
static
MYSQL_THDVAR_BOOL
(
load_save_space
,
load_save_space
,
...
...
storage/tokudb/tokudb_sysvars.h
View file @
13802fef
...
@@ -93,10 +93,10 @@ extern my_bool gdb_on_fatal;
...
@@ -93,10 +93,10 @@ extern my_bool gdb_on_fatal;
extern
my_bool
check_jemalloc
;
extern
my_bool
check_jemalloc
;
#if
TOKUDB_DEBUG
#if
defined(TOKUDB_DEBUG)
// used to control background job manager
// used to control background job manager
extern
my_bool
debug_pause_background_job_manager
;
extern
my_bool
debug_pause_background_job_manager
;
#endif //
TOKUDB_DEBUG
#endif //
defined(TOKUDB_DEBUG)
// session/thread
// session/thread
my_bool
alter_print_error
(
THD
*
thd
);
my_bool
alter_print_error
(
THD
*
thd
);
...
...
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