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
f1cc6e38
Commit
f1cc6e38
authored
Nov 24, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
6979d204
316f0d8f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
112 additions
and
9 deletions
+112
-9
cmake/dtrace.cmake
cmake/dtrace.cmake
+2
-1
extra/mariabackup/crc/crc_glue.c
extra/mariabackup/crc/crc_glue.c
+1
-1
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+23
-4
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-1
mysql-test/suite/mariabackup/mdev-14447.opt
mysql-test/suite/mariabackup/mdev-14447.opt
+1
-0
mysql-test/suite/mariabackup/mdev-14447.result
mysql-test/suite/mariabackup/mdev-14447.result
+19
-0
mysql-test/suite/mariabackup/mdev-14447.test
mysql-test/suite/mariabackup/mdev-14447.test
+46
-0
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+4
-1
storage/innobase/innodb.cmake
storage/innobase/innodb.cmake
+5
-0
storage/xtradb/CMakeLists.txt
storage/xtradb/CMakeLists.txt
+6
-0
storage/xtradb/buf/buf0buf.cc
storage/xtradb/buf/buf0buf.cc
+4
-1
No files found.
cmake/dtrace.cmake
View file @
f1cc6e38
...
...
@@ -42,7 +42,8 @@ MACRO(CHECK_DTRACE)
# On FreeBSD, dtrace does not handle userland tracing yet
IF
(
DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES
"FreeBSD"
AND NOT BUGGY_GCC_NO_DTRACE_MODULES
AND NOT BUGGY_LINUX_DTRACE
)
AND NOT BUGGY_LINUX_DTRACE
AND NOT CMAKE_SYSTEM_NAME MATCHES
"SunOS"
)
SET
(
ENABLE_DTRACE ON CACHE BOOL
"Enable dtrace"
)
ENDIF
()
SET
(
HAVE_DTRACE
${
ENABLE_DTRACE
}
)
...
...
extra/mariabackup/crc/crc_glue.c
View file @
f1cc6e38
...
...
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include <string.h>
#include <zlib.h>
#if
__GNUC__ >= 4
&& defined(__x86_64__)
#if
defined(__GNUC__)
&& defined(__x86_64__)
static
int
pclmul_enabled
=
0
;
#endif
...
...
extra/mariabackup/xtrabackup.cc
View file @
f1cc6e38
...
...
@@ -4398,10 +4398,29 @@ xtrabackup_apply_delta(
if
(
off
==
0
)
{
/* Read tablespace size from page 0,
and extend the file to specified size.*/
os_offset_t
n_pages
=
mach_read_from_4
(
buf
+
FSP_HEADER_OFFSET
+
FSP_SIZE
);
success
=
os_file_set_size
(
dst_path
,
dst_file
,
n_pages
*
page_size
);
if
(
!
success
)
goto
error
;
os_offset_t
n_pages
=
mach_read_from_4
(
buf
+
FSP_HEADER_OFFSET
+
FSP_SIZE
);
if
(
mach_read_from_4
(
buf
+
FIL_PAGE_SPACE_ID
))
{
if
(
!
os_file_set_size
(
dst_path
,
dst_file
,
n_pages
*
page_size
))
goto
error
;
}
else
if
(
fil_space_t
*
space
=
fil_space_acquire
(
0
))
{
/* The system tablespace can
consist of multiple files. The
first one has full tablespace
size in page 0, but only the last
file should be extended. */
fil_node_t
*
n
=
UT_LIST_GET_FIRST
(
space
->
chain
);
bool
fail
=
!
strcmp
(
n
->
name
,
dst_path
)
&&
!
fil_space_extend
(
space
,
n_pages
);
fil_space_release
(
space
);
if
(
fail
)
goto
error
;
}
}
success
=
os_file_write
(
IORequestWrite
,
...
...
mysql-test/mysql-test-run.pl
View file @
f1cc6e38
...
...
@@ -2802,7 +2802,7 @@ sub mysql_server_start($) {
# Some InnoDB options are incompatible with the default bootstrap.
# If they are used, re-bootstrap
if
(
$extra_opts
and
"
@
$extra_opts
"
=~
/--innodb[-_](?:page[-_]size|checksum[-_]algorithm|undo[-_]tablespaces|log[-_]group[-_]home[-_]dir|data[-_]home[-_]dir)/
)
"
@
$extra_opts
"
=~
/--innodb[-_](?:page[-_]size|checksum[-_]algorithm|undo[-_]tablespaces|log[-_]group[-_]home[-_]dir|data[-_]home[-_]dir)
|data[-_]file[-_]path
/
)
{
mysql_install_db
(
$mysqld
,
undef
,
$extra_opts
);
}
...
...
mysql-test/suite/mariabackup/mdev-14447.opt
0 → 100644
View file @
f1cc6e38
--sequence --innodb-data-file-path=ibdata_first:3M;ibdata_second:1M:autoextend
\ No newline at end of file
mysql-test/suite/mariabackup/mdev-14447.result
0 → 100644
View file @
f1cc6e38
call mtr.add_suppression("InnoDB: New log files created");
CREATE TABLE t(a varchar(40) PRIMARY KEY, b varchar(40), c varchar(40), d varchar(40), index(b,c,d)) ENGINE INNODB;
# Create full backup , modify table, then create incremental/differential backup
BEGIN;
INSERT INTO t select uuid(), uuid(), uuid(), uuid() from seq_1_to_100000;
COMMIT;
SELECT count(*) FROM t;
count(*)
100000
# Prepare full backup, apply incremental one
# Restore and check results
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
SELECT count(*) FROM t;
count(*)
100000
DROP TABLE t;
mysql-test/suite/mariabackup/mdev-14447.test
0 → 100644
View file @
f1cc6e38
call
mtr
.
add_suppression
(
"InnoDB: New log files created"
);
let
$basedir
=
$MYSQLTEST_VARDIR
/
tmp
/
backup
;
let
$incremental_dir
=
$MYSQLTEST_VARDIR
/
tmp
/
backup_inc1
;
CREATE
TABLE
t
(
a
varchar
(
40
)
PRIMARY
KEY
,
b
varchar
(
40
),
c
varchar
(
40
),
d
varchar
(
40
),
index
(
b
,
c
,
d
))
ENGINE
INNODB
;
echo
# Create full backup , modify table, then create incremental/differential backup;
--
disable_result_log
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
target
-
dir
=
$basedir
;
--
enable_result_log
BEGIN
;
INSERT
INTO
t
select
uuid
(),
uuid
(),
uuid
(),
uuid
()
from
seq_1_to_100000
;
COMMIT
;
SELECT
count
(
*
)
FROM
t
;
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
target
-
dir
=
$incremental_dir
--
incremental
-
basedir
=
$basedir
;
--
disable_result_log
echo
# Prepare full backup, apply incremental one;
exec
$XTRABACKUP
--
prepare
--
apply
-
log
-
only
--
target
-
dir
=
$basedir
;
exec
$XTRABACKUP
--
prepare
--
apply
-
log
-
only
--
target
-
dir
=
$basedir
--
incremental
-
dir
=
$incremental_dir
;
echo
# Restore and check results;
let
$targetdir
=
$basedir
;
#-- source include/restart_and_restore.inc
let
$_datadir
=
`SELECT @@datadir`
;
let
$innodb_data_file_path
=
`SELECT @@innodb_data_file_path`
;
echo
# shutdown server;
--
source
include
/
shutdown_mysqld
.
inc
echo
# remove datadir;
rmdir
$_datadir
;
echo
# xtrabackup move back;
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
copy
-
back
--
datadir
=
$_datadir
"--innodb_data_file_path=
$innodb_data_file_path
"
--
target
-
dir
=
$targetdir
;
echo
# restart server;
--
source
include
/
start_mysqld
.
inc
--
enable_result_log
SELECT
count
(
*
)
FROM
t
;
DROP
TABLE
t
;
# Cleanup
rmdir
$basedir
;
rmdir
$incremental_dir
;
storage/innobase/buf/buf0buf.cc
View file @
f1cc6e38
...
...
@@ -138,10 +138,13 @@ inline void* aligned_malloc(size_t size, size_t align) {
void
*
result
;
#ifdef _MSC_VER
result
=
_aligned_malloc
(
size
,
align
);
#el
se
#el
if defined (HAVE_POSIX_MEMALIGN)
if
(
posix_memalign
(
&
result
,
align
,
size
))
{
result
=
0
;
}
#else
/* Use unaligned malloc as fallback */
result
=
malloc
(
size
);
#endif
return
result
;
}
...
...
storage/innobase/innodb.cmake
View file @
f1cc6e38
...
...
@@ -163,6 +163,11 @@ IF(NOT MSVC)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-march=i686"
)
ENDIF
()
CHECK_FUNCTION_EXISTS
(
posix_memalign HAVE_POSIX_MEMALIGN
)
IF
(
HAVE_POSIX_MEMALIGN
)
ADD_DEFINITIONS
(
-DHAVE_POSIX_MEMALIGN
)
ENDIF
()
# Only use futexes on Linux if GCC atomics are available
IF
(
NOT MSVC AND NOT CMAKE_CROSSCOMPILING
)
CHECK_C_SOURCE_RUNS
(
...
...
storage/xtradb/CMakeLists.txt
View file @
f1cc6e38
...
...
@@ -99,6 +99,12 @@ IF(HAVE_SCHED_GETCPU)
ENDIF
()
IF
(
NOT MSVC
)
CHECK_FUNCTION_EXISTS
(
posix_memalign HAVE_POSIX_MEMALIGN
)
IF
(
HAVE_POSIX_MEMALIGN
)
ADD_DEFINITIONS
(
-DHAVE_POSIX_MEMALIGN
)
ENDIF
()
# either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
# workaround for old gcc on x86, gcc atomic ops only work under -march=i686
IF
(
CMAKE_SYSTEM_PROCESSOR STREQUAL
"i686"
AND CMAKE_COMPILER_IS_GNUCC AND
...
...
storage/xtradb/buf/buf0buf.cc
View file @
f1cc6e38
...
...
@@ -102,10 +102,13 @@ inline void* aligned_malloc(size_t size, size_t align) {
void
*
result
;
#ifdef _MSC_VER
result
=
_aligned_malloc
(
size
,
align
);
#el
se
#el
if defined (HAVE_POSIX_MEMALIGN)
if
(
posix_memalign
(
&
result
,
align
,
size
))
{
result
=
0
;
}
#else
/* Use unaligned malloc as fallback */
result
=
malloc
(
size
);
#endif
return
result
;
}
...
...
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