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
9ec7898f
Commit
9ec7898f
authored
Dec 04, 2010
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 5.1
parents
30ad214c
bbb951cc
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
129 additions
and
38 deletions
+129
-38
CMakeLists.txt
CMakeLists.txt
+1
-1
include/my_pthread.h
include/my_pthread.h
+2
-3
mysql-test/extra/rpl_tests/rpl_auto_increment.test
mysql-test/extra/rpl_tests/rpl_auto_increment.test
+1
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+6
-8
mysql-test/suite/innodb/t/innodb_bug38231.test
mysql-test/suite/innodb/t/innodb_bug38231.test
+5
-0
mysql-test/suite/innodb_plugin/t/innodb_bug38231.test
mysql-test/suite/innodb_plugin/t/innodb_bug38231.test
+5
-1
scripts/make_win_bin_dist
scripts/make_win_bin_dist
+0
-2
server-tools/instance-manager/CMakeLists.txt
server-tools/instance-manager/CMakeLists.txt
+1
-1
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-1
sql/set_var.cc
sql/set_var.cc
+2
-0
storage/innodb_plugin/CMakeLists.txt
storage/innodb_plugin/CMakeLists.txt
+13
-6
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+16
-7
storage/maria/ma_pagecache.c
storage/maria/ma_pagecache.c
+53
-1
storage/xtradb/CMakeLists.txt
storage/xtradb/CMakeLists.txt
+14
-6
storage/xtradb/include/fsp0types.h
storage/xtradb/include/fsp0types.h
+1
-1
win/configure-mariadb.bat
win/configure-mariadb.bat
+8
-0
No files found.
CMakeLists.txt
View file @
9ec7898f
...
@@ -116,7 +116,7 @@ IF(MSVC)
...
@@ -116,7 +116,7 @@ IF(MSVC)
STRING
(
REPLACE
"/MDd"
"/MTd"
CMAKE_CXX_FLAGS_DEBUG
${
CMAKE_CXX_FLAGS_DEBUG
}
)
STRING
(
REPLACE
"/MDd"
"/MTd"
CMAKE_CXX_FLAGS_DEBUG
${
CMAKE_CXX_FLAGS_DEBUG
}
)
STRING
(
REPLACE
"/MDd"
"/MTd"
CMAKE_CXX_FLAGS_DEBUG_INIT
${
CMAKE_CXX_FLAGS_DEBUG_INIT
}
)
STRING
(
REPLACE
"/MDd"
"/MTd"
CMAKE_CXX_FLAGS_DEBUG_INIT
${
CMAKE_CXX_FLAGS_DEBUG_INIT
}
)
# set stack size (see bug#20815)
#
generate map files,
set stack size (see bug#20815)
SET
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
/STACK:1048576"
)
SET
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
/STACK:1048576"
)
# remove support for Exception handling
# remove support for Exception handling
...
...
include/my_pthread.h
View file @
9ec7898f
...
@@ -127,9 +127,8 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
...
@@ -127,9 +127,8 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
void
pthread_exit
(
void
*
a
);
/* was #define pthread_exit(A) ExitThread(A)*/
void
pthread_exit
(
void
*
a
);
/* was #define pthread_exit(A) ExitThread(A)*/
#ifndef ETIMEDOUT
#ifndef ETIMEDOUT
#define ETIMEDOUT 145
#define ETIMEDOUT 145
/* Win32 doesn't have this */
#endif
#endif
#define getpid() GetCurrentThreadId()
#define getpid() GetCurrentThreadId()
#define HAVE_LOCALTIME_R 1
#define HAVE_LOCALTIME_R 1
...
...
mysql-test/extra/rpl_tests/rpl_auto_increment.test
View file @
9ec7898f
...
@@ -251,6 +251,7 @@ connection master;
...
@@ -251,6 +251,7 @@ connection master;
CREATE
TABLE
t1
(
s
VARCHAR
(
10
))
ENGINE
=
myisam
;
CREATE
TABLE
t1
(
s
VARCHAR
(
10
))
ENGINE
=
myisam
;
# -slave.opt has --replicate-ignore-table=test.t_ignored1
# -slave.opt has --replicate-ignore-table=test.t_ignored1
CREATE
TABLE
t_ignored1
(
id
INT
AUTO_INCREMENT
PRIMARY
KEY
)
ENGINE
=
myisam
;
CREATE
TABLE
t_ignored1
(
id
INT
AUTO_INCREMENT
PRIMARY
KEY
)
ENGINE
=
myisam
;
sync_slave_with_master
;
connection
slave
;
connection
slave
;
...
...
mysql-test/mysql-test-run.pl
View file @
9ec7898f
...
@@ -2513,16 +2513,14 @@ sub fix_vs_config_dir () {
...
@@ -2513,16 +2513,14 @@ sub fix_vs_config_dir () {
my
$modified
=
1e30
;
my
$modified
=
1e30
;
$opt_vs_config
=
"";
$opt_vs_config
=
"";
for
my
$dir
(
qw(client/*.dir libmysql/libmysql.dir sql/mysqld.dir
sql/udf_example.dir storage/*/*.dir plugin/*/*.dir)
)
{
for
(
<
$basedir
/sql/
*/
mysqld
.
exe
>
)
{
for
(
<
$basedir
/$dir/
*/
BuildLog
.
htm
>
)
{
if
(
-
M
$_
<
$modified
)
if
(
-
M
$_
<
$modified
)
{
{
$modified
=
-
M
_
;
$modified
=
-
M
_
;
$opt_vs_config
=
basename
(
dirname
(
$_
));
$opt_vs_config
=
basename
(
dirname
(
$_
));
}
}
}
}
}
mtr_report
("
VS config:
$opt_vs_config
");
mtr_report
("
VS config:
$opt_vs_config
");
$opt_vs_config
=
"
/
$opt_vs_config
"
if
$opt_vs_config
;
$opt_vs_config
=
"
/
$opt_vs_config
"
if
$opt_vs_config
;
...
...
mysql-test/suite/innodb/t/innodb_bug38231.test
View file @
9ec7898f
...
@@ -76,6 +76,11 @@ UNLOCK TABLES;
...
@@ -76,6 +76,11 @@ UNLOCK TABLES;
UNLOCK
TABLES
;
UNLOCK
TABLES
;
--
connection
con3
--
connection
con3
#
# We may get a timeout error here if the tables are locked in a different
# order than expected. This is ok as the purpose of this patch is to ensure
# we don't get a crash in the previous unlock tables.
--
error
0
,
1205
--
reap
--
reap
UNLOCK
TABLES
;
UNLOCK
TABLES
;
...
...
mysql-test/suite/innodb_plugin/t/innodb_bug38231.test
View file @
9ec7898f
...
@@ -72,8 +72,12 @@ UNLOCK TABLES;
...
@@ -72,8 +72,12 @@ UNLOCK TABLES;
# clean up
# clean up
--
connection
con2
--
connection
con2
--
reap
#
# We may get a timeout error here if the tables are locked in a different
# order than expected. This is ok as the purpose of this patch is to ensure
# we don't get a crash in the previous unlock tables.
--
error
0
,
1205
--
error
0
,
1205
--
reap
UNLOCK
TABLES
;
UNLOCK
TABLES
;
--
connection
con3
--
connection
con3
...
...
scripts/make_win_bin_dist
View file @
9ec7898f
...
@@ -177,7 +177,6 @@ cp tests/$TARGET/*.exe $DESTDIR/bin/
...
@@ -177,7 +177,6 @@ cp tests/$TARGET/*.exe $DESTDIR/bin/
cp
libmysql/
$TARGET
/libmysql.dll
$DESTDIR
/bin/
cp
libmysql/
$TARGET
/libmysql.dll
$DESTDIR
/bin/
cp
sql/
$TARGET
/mysqld.exe
$DESTDIR
/bin/mysqld
$EXE_SUFFIX
.exe
cp
sql/
$TARGET
/mysqld.exe
$DESTDIR
/bin/mysqld
$EXE_SUFFIX
.exe
cp
sql/
$TARGET
/mysqld.map
$DESTDIR
/bin/mysqld
$EXE_SUFFIX
.map
if
[
x
"
$TARGET
"
!=
x
"release"
]
;
then
if
[
x
"
$TARGET
"
!=
x
"release"
]
;
then
cp
sql/
$TARGET
/mysqld.pdb
$DESTDIR
/bin/mysqld
$EXE_SUFFIX
.pdb
cp
sql/
$TARGET
/mysqld.pdb
$DESTDIR
/bin/mysqld
$EXE_SUFFIX
.pdb
fi
fi
...
@@ -186,7 +185,6 @@ if [ x"$PACK_DEBUG" = x"" -a -f "sql/debug/mysqld.exe" -o \
...
@@ -186,7 +185,6 @@ if [ x"$PACK_DEBUG" = x"" -a -f "sql/debug/mysqld.exe" -o \
x
"
$PACK_DEBUG
"
=
x
"yes"
]
;
then
x
"
$PACK_DEBUG
"
=
x
"yes"
]
;
then
cp
sql/debug/mysqld.exe
$DESTDIR
/bin/mysqld-debug.exe
cp
sql/debug/mysqld.exe
$DESTDIR
/bin/mysqld-debug.exe
cp
sql/debug/mysqld.pdb
$DESTDIR
/bin/mysqld-debug.pdb
cp
sql/debug/mysqld.pdb
$DESTDIR
/bin/mysqld-debug.pdb
cp
sql/debug/mysqld.map
$DESTDIR
/bin/mysqld-debug.map
fi
fi
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
...
server-tools/instance-manager/CMakeLists.txt
View file @
9ec7898f
sql/CMakeLists.txt
View file @
9ec7898f
...
@@ -18,7 +18,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG
...
@@ -18,7 +18,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi"
)
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi"
)
SET
(
CMAKE_C_FLAGS_DEBUG
SET
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi"
)
"
${
CMAKE_C_FLAGS_DEBUG
}
-DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi"
)
SET
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
/MAP /MAPINFO:EXPORTS"
)
SET
(
CMAKE_EXE_LINKER_FLAGS
_DEBUG
"
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
"
)
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
...
...
sql/set_var.cc
View file @
9ec7898f
...
@@ -128,7 +128,9 @@ static void fix_net_write_timeout(THD *thd, enum_var_type type);
...
@@ -128,7 +128,9 @@ static void fix_net_write_timeout(THD *thd, enum_var_type type);
static
void
fix_net_retry_count
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_net_retry_count
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_join_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_join_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_query_cache_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_query_cache_size
(
THD
*
thd
,
enum_var_type
type
);
#ifdef HAVE_QUERY_CACHE
static
void
fix_query_cache_min_res_unit
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_query_cache_min_res_unit
(
THD
*
thd
,
enum_var_type
type
);
#endif
static
void
fix_myisam_max_sort_file_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_myisam_max_sort_file_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_binlog_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_binlog_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_relay_log_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_relay_log_size
(
THD
*
thd
,
enum_var_type
type
);
...
...
storage/innodb_plugin/CMakeLists.txt
View file @
9ec7898f
...
@@ -40,12 +40,19 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
...
@@ -40,12 +40,19 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${
CMAKE_SOURCE_DIR
}
/zlib
${
CMAKE_SOURCE_DIR
}
/zlib
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
)
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
)
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
IF
(
MSVC
)
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
IF
(
MSVC AND $
(
WIN64
))
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
IF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
SET_SOURCE_FILES_PROPERTIES
(
mem/mem0mem.c mem/mem0pool.c
SET_SOURCE_FILES_PROPERTIES
(
mem/mem0mem.c mem/mem0pool.c
PROPERTIES COMPILE_FLAGS -Od
)
PROPERTIES COMPILE_FLAGS -Od
)
ENDIF
(
MSVC AND $
(
WIN64
))
ENDIF
()
# Avoid "unreferenced label" warning in generated file
SET_SOURCE_FILES_PROPERTIES
(
pars/pars0grm.c
PROPERTIES COMPILE_FLAGS
"/wd4102"
)
SET_SOURCE_FILES_PROPERTIES
(
pars/lexyy.c
PROPERTIES COMPILE_FLAGS
"/wd4003"
)
ENDIF
()
SET
(
INNODB_PLUGIN_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
SET
(
INNODB_PLUGIN_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
...
...
storage/maria/ma_loghandler.c
View file @
9ec7898f
/* Copyright (C) 2007 MySQL AB & Sanja Belkin
/* Copyright (C) 2007 MySQL AB & Sanja Belkin
. 2010 Monty Program Ab.
This program is free software; you can redistribute it and/or modify
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
it under the terms of the GNU General Public License as published by
...
@@ -2598,10 +2598,9 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
...
@@ -2598,10 +2598,9 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
{
{
/* some other flush in progress */
/* some other flush in progress */
translog_wait_for_closing
(
buffer
);
translog_wait_for_closing
(
buffer
);
}
if
(
buffer
->
file
!=
file
||
buffer
->
offset
!=
offset
||
buffer
->
ver
!=
ver
)
if
(
buffer
->
file
!=
file
||
buffer
->
offset
!=
offset
||
buffer
->
ver
!=
ver
)
DBUG_RETURN
(
0
);
/* some the thread flushed the buffer already */
DBUG_RETURN
(
0
);
/* some the thread flushed the buffer already */
}
if
(
buffer
->
overlay
&&
translog_prev_buffer_flush_wait
(
buffer
))
if
(
buffer
->
overlay
&&
translog_prev_buffer_flush_wait
(
buffer
))
DBUG_RETURN
(
0
);
/* some the thread flushed the buffer already */
DBUG_RETURN
(
0
);
/* some the thread flushed the buffer already */
...
@@ -7769,6 +7768,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
...
@@ -7769,6 +7768,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
uint
i
;
uint
i
;
uint8
last_buffer_no
,
start_buffer_no
;
uint8
last_buffer_no
,
start_buffer_no
;
DBUG_ENTER
(
"translog_flush_buffers"
);
DBUG_ENTER
(
"translog_flush_buffers"
);
LINT_INIT
(
last_buffer_no
);
/*
/*
We will recheck information when will lock buffers one by
We will recheck information when will lock buffers one by
...
@@ -7789,7 +7789,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
...
@@ -7789,7 +7789,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
(
uint
)
start_buffer_no
,
(
uint
)
log_descriptor
.
bc
.
buffer_no
,
(
uint
)
start_buffer_no
,
(
uint
)
log_descriptor
.
bc
.
buffer_no
,
LSN_IN_PARTS
(
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
)));
LSN_IN_PARTS
(
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
)));
/*
/*
if LSN up to which we have to flush bigger then maximum LSN of previous
if LSN up to which we have to flush bigger then maximum LSN of previous
buffer and at least one LSN was saved in the current buffer (last_lsn !=
buffer and at least one LSN was saved in the current buffer (last_lsn !=
...
@@ -7801,18 +7800,28 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
...
@@ -7801,18 +7800,28 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
struct
st_translog_buffer
*
buffer
=
log_descriptor
.
bc
.
buffer
;
struct
st_translog_buffer
*
buffer
=
log_descriptor
.
bc
.
buffer
;
*
lsn
=
log_descriptor
.
bc
.
buffer
->
last_lsn
;
/* fix lsn if it was horizon */
*
lsn
=
log_descriptor
.
bc
.
buffer
->
last_lsn
;
/* fix lsn if it was horizon */
DBUG_PRINT
(
"info"
,
(
"LSN to flush fixed to last lsn: (%lu,0x%lx)"
,
DBUG_PRINT
(
"info"
,
(
"LSN to flush fixed to last lsn: (%lu,0x%lx)"
,
LSN_IN_PARTS
(
log_descriptor
.
bc
.
buffer
->
last_
lsn
)));
LSN_IN_PARTS
(
*
lsn
)));
last_buffer_no
=
log_descriptor
.
bc
.
buffer_no
;
last_buffer_no
=
log_descriptor
.
bc
.
buffer_no
;
log_descriptor
.
is_everything_flushed
=
1
;
log_descriptor
.
is_everything_flushed
=
1
;
translog_force_current_buffer_to_finish
();
translog_force_current_buffer_to_finish
();
translog_buffer_unlock
(
buffer
);
translog_buffer_unlock
(
buffer
);
}
}
else
else
if
(
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
!=
LSN_IMPOSSIBLE
)
{
{
/* fix lsn if it was horizon */
*
lsn
=
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
;
DBUG_PRINT
(
"info"
,
(
"LSN to flush fixed to prev last lsn: (%lu,0x%lx)"
,
LSN_IN_PARTS
(
*
lsn
)));
last_buffer_no
=
((
log_descriptor
.
bc
.
buffer_no
+
TRANSLOG_BUFFERS_NO
-
1
)
%
last_buffer_no
=
((
log_descriptor
.
bc
.
buffer_no
+
TRANSLOG_BUFFERS_NO
-
1
)
%
TRANSLOG_BUFFERS_NO
);
TRANSLOG_BUFFERS_NO
);
translog_unlock
();
translog_unlock
();
}
}
else
if
(
log_descriptor
.
bc
.
buffer
->
last_lsn
==
LSN_IMPOSSIBLE
)
{
DBUG_PRINT
(
"info"
,
(
"There is no LSNs yet generated => do nothing"
));
translog_unlock
();
DBUG_VOID_RETURN
;
}
/* flush buffers */
/* flush buffers */
*
sent_to_disk
=
translog_get_sent_to_disk
();
*
sent_to_disk
=
translog_get_sent_to_disk
();
...
...
storage/maria/ma_pagecache.c
View file @
9ec7898f
...
@@ -1025,6 +1025,7 @@ ulong resize_pagecache(PAGECACHE *pagecache,
...
@@ -1025,6 +1025,7 @@ ulong resize_pagecache(PAGECACHE *pagecache,
*/
*/
static
inline
void
inc_counter_for_resize_op
(
PAGECACHE
*
pagecache
)
static
inline
void
inc_counter_for_resize_op
(
PAGECACHE
*
pagecache
)
{
{
safe_mutex_assert_owner
(
&
pagecache
->
cache_lock
);
pagecache
->
cnt_for_resize_op
++
;
pagecache
->
cnt_for_resize_op
++
;
}
}
...
@@ -1037,6 +1038,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
...
@@ -1037,6 +1038,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
{
{
#ifdef THREAD
#ifdef THREAD
struct
st_my_thread_var
*
last_thread
;
struct
st_my_thread_var
*
last_thread
;
safe_mutex_assert_owner
(
&
pagecache
->
cache_lock
);
if
(
!--
pagecache
->
cnt_for_resize_op
&&
if
(
!--
pagecache
->
cnt_for_resize_op
&&
(
last_thread
=
pagecache
->
resize_queue
.
last_thread
))
(
last_thread
=
pagecache
->
resize_queue
.
last_thread
))
{
{
...
@@ -1044,6 +1046,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
...
@@ -1044,6 +1046,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
(
"thread %ld"
,
last_thread
->
next
->
id
));
(
"thread %ld"
,
last_thread
->
next
->
id
));
pagecache_pthread_cond_signal
(
&
last_thread
->
next
->
suspend
);
pagecache_pthread_cond_signal
(
&
last_thread
->
next
->
suspend
);
}
}
DBUG_ASSERT
((
longlong
)
pagecache
->
cnt_for_resize_op
>=
0
);
#else
#else
pagecache
->
cnt_for_resize_op
--
;
pagecache
->
cnt_for_resize_op
--
;
#endif
#endif
...
@@ -1084,6 +1087,37 @@ void change_pagecache_param(PAGECACHE *pagecache, uint division_limit,
...
@@ -1084,6 +1087,37 @@ void change_pagecache_param(PAGECACHE *pagecache, uint division_limit,
}
}
/*
Check that pagecache was used and cleaned up properly.
*/
#ifndef DBUG_OFF
void
check_pagecache_is_cleaned_up
(
PAGECACHE
*
pagecache
)
{
DBUG_ENTER
(
"check_pagecache_is_cleaned_up"
);
/*
Ensure we called inc_counter_for_resize_op and dec_counter_for_resize_op
the same number of times. (If not, a resize() could never happen.
*/
DBUG_ASSERT
(
pagecache
->
cnt_for_resize_op
==
0
);
if
(
pagecache
->
disk_blocks
>
0
)
{
if
(
pagecache
->
block_mem
)
{
uint
i
;
for
(
i
=
0
;
i
<
pagecache
->
blocks_used
;
i
++
)
{
DBUG_ASSERT
(
pagecache
->
block_root
[
i
].
status
==
0
);
DBUG_ASSERT
(
pagecache
->
block_root
[
i
].
type
==
PAGECACHE_EMPTY_PAGE
);
}
}
}
DBUG_VOID_RETURN
;
}
#endif
/*
/*
Removes page cache from memory. Does NOT flush pages to disk.
Removes page cache from memory. Does NOT flush pages to disk.
...
@@ -1106,6 +1140,10 @@ void end_pagecache(PAGECACHE *pagecache, my_bool cleanup)
...
@@ -1106,6 +1140,10 @@ void end_pagecache(PAGECACHE *pagecache, my_bool cleanup)
if
(
pagecache
->
disk_blocks
>
0
)
if
(
pagecache
->
disk_blocks
>
0
)
{
{
#ifndef DBUG_OFF
check_pagecache_is_cleaned_up
(
pagecache
);
#endif
if
(
pagecache
->
block_mem
)
if
(
pagecache
->
block_mem
)
{
{
my_large_free
(
pagecache
->
block_mem
,
MYF
(
0
));
my_large_free
(
pagecache
->
block_mem
,
MYF
(
0
));
...
@@ -2250,6 +2288,7 @@ static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
...
@@ -2250,6 +2288,7 @@ static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
&
pagecache
->
cache_lock
);
&
pagecache
->
cache_lock
);
}
}
while
(
thread
->
next
);
while
(
thread
->
next
);
inc_counter_for_resize_op
(
pagecache
);
#else
#else
DBUG_ASSERT
(
0
);
DBUG_ASSERT
(
0
);
#endif
#endif
...
@@ -3457,7 +3496,7 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
...
@@ -3457,7 +3496,7 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
{
{
/*
/*
this call is just 'hint' for the cache to free the page so we will
this call is just 'hint' for the cache to free the page so we will
not interferes with flushing process but
g
ust return success
not interferes with flushing process but
m
ust return success
*/
*/
goto
out
;
goto
out
;
}
}
...
@@ -3527,8 +3566,17 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
...
@@ -3527,8 +3566,17 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
page_link
->
requests
--
;
page_link
->
requests
--
;
/* See NOTE for pagecache_unlock about registering requests. */
/* See NOTE for pagecache_unlock about registering requests. */
free_block
(
pagecache
,
block
);
free_block
(
pagecache
,
block
);
dec_counter_for_resize_op
(
pagecache
);
return
0
;
out:
out:
/* Cache is locked, so we can relese page before freeing it */
if
(
make_lock_and_pin
(
pagecache
,
block
,
PAGECACHE_LOCK_WRITE_UNLOCK
,
PAGECACHE_UNPIN
,
FALSE
))
DBUG_ASSERT
(
0
);
page_link
->
requests
--
;
unreg_request
(
pagecache
,
block
,
1
);
dec_counter_for_resize_op
(
pagecache
);
dec_counter_for_resize_op
(
pagecache
);
return
error
;
return
error
;
}
}
...
@@ -3579,6 +3627,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
...
@@ -3579,6 +3627,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
*/
*/
DBUG_ASSERT
((
block
->
status
&
DBUG_ASSERT
((
block
->
status
&
(
PCBLOCK_IN_SWITCH
|
PCBLOCK_REASSIGNED
))
==
0
);
(
PCBLOCK_IN_SWITCH
|
PCBLOCK_REASSIGNED
))
==
0
);
inc_counter_for_resize_op
(
pagecache
);
/*
/*
make_lock_and_pin() can't fail here, because we are keeping pin on the
make_lock_and_pin() can't fail here, because we are keeping pin on the
block and it can't be evicted (which is cause of lock fail and retry)
block and it can't be evicted (which is cause of lock fail and retry)
...
@@ -3695,6 +3745,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
...
@@ -3695,6 +3745,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
if
(
!
page_link
)
if
(
!
page_link
)
{
{
DBUG_PRINT
(
"info"
,
(
"There is no such page in the cache"
));
DBUG_PRINT
(
"info"
,
(
"There is no such page in the cache"
));
dec_counter_for_resize_op
(
pagecache
);
pagecache_pthread_mutex_unlock
(
&
pagecache
->
cache_lock
);
pagecache_pthread_mutex_unlock
(
&
pagecache
->
cache_lock
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
@@ -3707,6 +3758,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
...
@@ -3707,6 +3758,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
"reassigned"
:
"in switch"
)));
"reassigned"
:
"in switch"
)));
PCBLOCK_INFO
(
block
);
PCBLOCK_INFO
(
block
);
page_link
->
requests
--
;
page_link
->
requests
--
;
dec_counter_for_resize_op
(
pagecache
);
goto
end
;
goto
end
;
}
}
/* See NOTE for pagecache_unlock about registering requests. */
/* See NOTE for pagecache_unlock about registering requests. */
...
...
storage/xtradb/CMakeLists.txt
View file @
9ec7898f
...
@@ -42,12 +42,20 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
...
@@ -42,12 +42,20 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${
CMAKE_SOURCE_DIR
}
/zlib
${
CMAKE_SOURCE_DIR
}
/zlib
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
)
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
)
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
IF
(
MSVC
)
IF
(
MSVC AND $
(
WIN64
))
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
IF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
SET_SOURCE_FILES_PROPERTIES
(
mem/mem0mem.c mem/mem0pool.c
SET_SOURCE_FILES_PROPERTIES
(
mem/mem0mem.c mem/mem0pool.c
PROPERTIES COMPILE_FLAGS -Od
)
PROPERTIES COMPILE_FLAGS -Od
)
ENDIF
(
MSVC AND $
(
WIN64
))
ENDIF
()
# Avoid "unreferenced label" warning in generated file
SET_SOURCE_FILES_PROPERTIES
(
pars/pars0grm.c
PROPERTIES COMPILE_FLAGS
"/wd4102"
)
SET_SOURCE_FILES_PROPERTIES
(
pars/lexyy.c
PROPERTIES COMPILE_FLAGS
"/wd4003"
)
ENDIF
()
SET
(
XTRADB_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
SET
(
XTRADB_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
...
...
storage/xtradb/include/fsp0types.h
View file @
9ec7898f
...
@@ -42,7 +42,7 @@ fseg_alloc_free_page) */
...
@@ -42,7 +42,7 @@ fseg_alloc_free_page) */
/* @} */
/* @} */
/** File space extent size (one megabyte) in pages */
/** File space extent size (one megabyte) in pages */
#define FSP_EXTENT_SIZE (1
u
<< (20 - UNIV_PAGE_SIZE_SHIFT))
#define FSP_EXTENT_SIZE (1
ULL
<< (20 - UNIV_PAGE_SIZE_SHIFT))
/** On a page of any file segment, data may be put starting from this
/** On a page of any file segment, data may be put starting from this
offset */
offset */
...
...
win/configure-mariadb.bat
0 → 100644
View file @
9ec7898f
cscript
win
\configure.js
^
WITH_EXAMPLE_STORAGE_ENGINE
^
WITH_FEDERATEDX_STORAGE_ENGINE
^
WITH_MERGE_STORAGE_ENGINE
^
WITH_PARTITION_STORAGE_ENGINE
^
WITH_MARIA_STORAGE_ENGINE
^
WITH_PBXT_STORAGE_ENGINE
^
WITH_XTRADB_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