summaryrefslogtreecommitdiff
path: root/storage/xtradb/include/fsp0fsp.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-05-03 20:53:29 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2016-05-03 21:35:41 +0300
commit5dd0c77e9239217457cf795d6380bdd3bf0808ad (patch)
treeaa118e213bd34b417169a1348bdde71056711142 /storage/xtradb/include/fsp0fsp.h
parent80da57cc4f0c717ee3e01ac5abccc859b88a2fbf (diff)
downloadmariadb-git-5dd0c77e9239217457cf795d6380bdd3bf0808ad.tar.gz
MDEV-9362: InnoDB tables using DATA_DIRECTORY created using
MySQL 5.6 do not work with MariaDB 10.1 Analysis: Problem is that tablespace flags bit DATA_DIR is on different position on MySQL 5.6 compared to MariaDB 10.1. Fix: If we detect that there is difference between dictionary flags and tablespace flags we remove DATA_DIR flag and compare again. Remote tablespace is tried to locate even in case when DATA_DIR flag is not set.
Diffstat (limited to 'storage/xtradb/include/fsp0fsp.h')
-rw-r--r--storage/xtradb/include/fsp0fsp.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h
index 8fdacc51277..839aed80418 100644
--- a/storage/xtradb/include/fsp0fsp.h
+++ b/storage/xtradb/include/fsp0fsp.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -99,6 +99,9 @@ dictionary */
/** Zero relative shift position of the start of the DATA DIR bits */
#define FSP_FLAGS_POS_DATA_DIR (FSP_FLAGS_POS_PAGE_SSIZE \
+ FSP_FLAGS_WIDTH_PAGE_SSIZE)
+#define FSP_FLAGS_POS_DATA_DIR_ORACLE (FSP_FLAGS_POS_ATOMIC_BLOBS \
+ + FSP_FLAGS_WIDTH_ATOMIC_BLOBS \
+ + FSP_FLAGS_WIDTH_PAGE_SSIZE)
/** Zero relative shift position of the start of the UNUSED bits */
#define FSP_FLAGS_POS_UNUSED (FSP_FLAGS_POS_DATA_DIR\
+ FSP_FLAGS_WIDTH_DATA_DIR)
@@ -123,6 +126,10 @@ dictionary */
#define FSP_FLAGS_MASK_DATA_DIR \
((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
<< FSP_FLAGS_POS_DATA_DIR)
+/** Bit mask of the DATA_DIR field */
+#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \
+ ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
+ << FSP_FLAGS_POS_DATA_DIR_ORACLE)
/** Bit mask of the PAGE_COMPRESSION field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION \
((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
@@ -156,6 +163,9 @@ dictionary */
#define FSP_FLAGS_HAS_DATA_DIR(flags) \
((flags & FSP_FLAGS_MASK_DATA_DIR) \
>> FSP_FLAGS_POS_DATA_DIR)
+#define FSP_FLAGS_HAS_DATA_DIR_ORACLE(flags) \
+ ((flags & FSP_FLAGS_MASK_DATA_DIR_ORACLE) \
+ >> FSP_FLAGS_POS_DATA_DIR_ORACLE)
/** Return the contents of the UNUSED bits */
#define FSP_FLAGS_GET_UNUSED(flags) \
(flags >> FSP_FLAGS_POS_UNUSED)