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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
bafceea1
Commit
bafceea1
authored
Dec 04, 2010
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge
parents
8b4b8c8e
dfefc15d
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
92 additions
and
27 deletions
+92
-27
CMakeLists.txt
CMakeLists.txt
+1
-1
include/my_pthread.h
include/my_pthread.h
+0
-1
mysql-test/extra/rpl_tests/rpl_auto_increment.test
mysql-test/extra/rpl_tests/rpl_auto_increment.test
+1
-0
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
+1
-3
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-2
sql/set_var.cc
sql/set_var.cc
+2
-0
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+16
-7
storage/maria/ma_pagecache.c
storage/maria/ma_pagecache.c
+52
-1
storage/maria/unittest/ma_pagecache_consist.c
storage/maria/unittest/ma_pagecache_consist.c
+1
-0
storage/maria/unittest/ma_pagecache_rwconsist.c
storage/maria/unittest/ma_pagecache_rwconsist.c
+1
-0
storage/maria/unittest/ma_test_loghandler_multithread-t.c
storage/maria/unittest/ma_test_loghandler_multithread-t.c
+0
-5
storage/maria/unittest/ma_test_loghandler_pagecache-t.c
storage/maria/unittest/ma_test_loghandler_pagecache-t.c
+1
-1
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+5
-5
No files found.
CMakeLists.txt
View file @
bafceea1
...
...
@@ -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_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"
)
# remove support for Exception handling
...
...
include/my_pthread.h
View file @
bafceea1
...
...
@@ -128,7 +128,6 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
void
pthread_exit
(
void
*
a
);
/* was #define pthread_exit(A) ExitThread(A)*/
#ifndef ETIMEDOUT
#define ETIMEDOUT 145
/* Win32 doesn't have this */
#endif
...
...
mysql-test/extra/rpl_tests/rpl_auto_increment.test
View file @
bafceea1
...
...
@@ -251,6 +251,7 @@ connection master;
CREATE
TABLE
t1
(
s
VARCHAR
(
10
))
ENGINE
=
myisam
;
# -slave.opt has --replicate-ignore-table=test.t_ignored1
CREATE
TABLE
t_ignored1
(
id
INT
AUTO_INCREMENT
PRIMARY
KEY
)
ENGINE
=
myisam
;
sync_slave_with_master
;
connection
slave
;
...
...
mysql-test/suite/innodb/t/innodb_bug38231.test
View file @
bafceea1
...
...
@@ -76,6 +76,11 @@ UNLOCK TABLES;
UNLOCK
TABLES
;
--
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
UNLOCK
TABLES
;
...
...
mysql-test/suite/innodb_plugin/t/innodb_bug38231.test
View file @
bafceea1
...
...
@@ -72,8 +72,12 @@ UNLOCK TABLES;
# clean up
--
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
--
reap
UNLOCK
TABLES
;
--
connection
con3
...
...
scripts/make_win_bin_dist
View file @
bafceea1
...
...
@@ -163,9 +163,7 @@ if [ -f "storage/pbxt/bin/xtstat.exe" ] ; then
cp
storage/pbxt/bin/xtstat.
{
exe,pdb
}
$DESTDIR
/bin
fi
cp
server-tools/instance-manager/
$TARGET
/
*
.exe
$DESTDIR
/bin/
if
[
x
"
$TARGET
"
!=
x
"release"
]
;
then
cp
server-tools/instance-manager/
$TARGET
/
*
.pdb
$DESTDIR
/bin/
cp
client/
$TARGET
/mysql.pdb
$DESTDIR
/bin/
...
...
sql/CMakeLists.txt
View file @
bafceea1
...
...
@@ -18,7 +18,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi"
)
SET
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi"
)
SET
(
CMAKE_EXE_LINKER_FLAGS_DEBUG
"
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
"
)
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include
...
...
sql/set_var.cc
View file @
bafceea1
...
...
@@ -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_max_join_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
);
#endif
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_relay_log_size
(
THD
*
thd
,
enum_var_type
type
);
...
...
storage/maria/ma_loghandler.c
View file @
bafceea1
/* 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
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)
{
/* some other flush in progress */
translog_wait_for_closing
(
buffer
);
}
if
(
buffer
->
file
!=
file
||
buffer
->
offset
!=
offset
||
buffer
->
ver
!=
ver
)
DBUG_RETURN
(
0
);
/* some the thread flushed the buffer already */
}
if
(
buffer
->
overlay
&&
translog_prev_buffer_flush_wait
(
buffer
))
DBUG_RETURN
(
0
);
/* some the thread flushed the buffer already */
...
...
@@ -7769,6 +7768,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
uint
i
;
uint8
last_buffer_no
,
start_buffer_no
;
DBUG_ENTER
(
"translog_flush_buffers"
);
LINT_INIT
(
last_buffer_no
);
/*
We will recheck information when will lock buffers one by
...
...
@@ -7789,7 +7789,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
(
uint
)
start_buffer_no
,
(
uint
)
log_descriptor
.
bc
.
buffer_no
,
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
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,
struct
st_translog_buffer
*
buffer
=
log_descriptor
.
bc
.
buffer
;
*
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)"
,
LSN_IN_PARTS
(
log_descriptor
.
bc
.
buffer
->
last_
lsn
)));
LSN_IN_PARTS
(
*
lsn
)));
last_buffer_no
=
log_descriptor
.
bc
.
buffer_no
;
log_descriptor
.
is_everything_flushed
=
1
;
translog_force_current_buffer_to_finish
();
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
)
%
TRANSLOG_BUFFERS_NO
);
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 */
*
sent_to_disk
=
translog_get_sent_to_disk
();
...
...
storage/maria/ma_pagecache.c
View file @
bafceea1
...
...
@@ -1025,6 +1025,7 @@ finish:
*/
static
inline
void
inc_counter_for_resize_op
(
PAGECACHE
*
pagecache
)
{
safe_mutex_assert_owner
(
&
pagecache
->
cache_lock
);
pagecache
->
cnt_for_resize_op
++
;
}
...
...
@@ -1037,6 +1038,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
{
#ifdef THREAD
struct
st_my_thread_var
*
last_thread
;
safe_mutex_assert_owner
(
&
pagecache
->
cache_lock
);
if
(
!--
pagecache
->
cnt_for_resize_op
&&
(
last_thread
=
pagecache
->
resize_queue
.
last_thread
))
{
...
...
@@ -1084,6 +1086,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.
...
...
@@ -1106,6 +1139,10 @@ void end_pagecache(PAGECACHE *pagecache, my_bool cleanup)
if
(
pagecache
->
disk_blocks
>
0
)
{
#ifndef DBUG_OFF
check_pagecache_is_cleaned_up
(
pagecache
);
#endif
if
(
pagecache
->
block_mem
)
{
my_large_free
(
pagecache
->
block_mem
,
MYF
(
0
));
...
...
@@ -2250,6 +2287,7 @@ static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
&
pagecache
->
cache_lock
);
}
while
(
thread
->
next
);
inc_counter_for_resize_op
(
pagecache
);
#else
DBUG_ASSERT
(
0
);
#endif
...
...
@@ -3457,7 +3495,7 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
{
/*
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
;
}
...
...
@@ -3527,8 +3565,17 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
page_link
->
requests
--
;
/* See NOTE for pagecache_unlock about registering requests. */
free_block
(
pagecache
,
block
);
dec_counter_for_resize_op
(
pagecache
);
return
0
;
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
);
return
error
;
}
...
...
@@ -3579,6 +3626,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
*/
DBUG_ASSERT
((
block
->
status
&
(
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
block and it can't be evicted (which is cause of lock fail and retry)
...
...
@@ -3695,6 +3744,7 @@ restart:
if
(
!
page_link
)
{
DBUG_PRINT
(
"info"
,
(
"There is no such page in the cache"
));
dec_counter_for_resize_op
(
pagecache
);
pagecache_pthread_mutex_unlock
(
&
pagecache
->
cache_lock
);
DBUG_RETURN
(
0
);
}
...
...
@@ -3707,6 +3757,7 @@ restart:
"reassigned"
:
"in switch"
)));
PCBLOCK_INFO
(
block
);
page_link
->
requests
--
;
dec_counter_for_resize_op
(
pagecache
);
goto
end
;
}
/* See NOTE for pagecache_unlock about registering requests. */
...
...
storage/maria/unittest/ma_pagecache_consist.c
View file @
bafceea1
...
...
@@ -476,6 +476,7 @@ int main(int argc __attribute__((unused)),
pthread_mutex_unlock
(
&
LOCK_thread_count
);
DBUG_PRINT
(
"info"
,
(
"thread ended"
));
flush_pagecache_blocks
(
&
pagecache
,
&
file1
,
FLUSH_IGNORE_CHANGED
);
end_pagecache
(
&
pagecache
,
1
);
DBUG_PRINT
(
"info"
,
(
"Page cache ended"
));
...
...
storage/maria/unittest/ma_pagecache_rwconsist.c
View file @
bafceea1
...
...
@@ -341,6 +341,7 @@ int main(int argc __attribute__((unused)),
pthread_mutex_unlock
(
&
LOCK_thread_count
);
DBUG_PRINT
(
"info"
,
(
"thread ended"
));
flush_pagecache_blocks
(
&
pagecache
,
&
file1
,
FLUSH_IGNORE_CHANGED
);
end_pagecache
(
&
pagecache
,
1
);
DBUG_PRINT
(
"info"
,
(
"Page cache ended"
));
...
...
storage/maria/unittest/ma_test_loghandler_multithread-t.c
View file @
bafceea1
...
...
@@ -269,11 +269,6 @@ int main(int argc __attribute__((unused)),
int
*
param
,
error
;
int
rc
;
/* Disabled until Sanja tests */
plan
(
1
);
ok
(
1
,
"disabled"
);
exit
(
0
);
plan
(
WRITERS
+
FLUSHERS
+
ITERATIONS
*
WRITERS
*
3
+
FLUSH_ITERATIONS
*
FLUSHERS
);
...
...
storage/maria/unittest/ma_test_loghandler_pagecache-t.c
View file @
bafceea1
...
...
@@ -168,7 +168,7 @@ int main(int argc __attribute__((unused)), char *argv[])
PAGECACHE_PIN_LEFT_UNPINNED
,
PAGECACHE_WRITE_DELAY
,
0
,
LSN_IMPOSSIBLE
);
flush_pagecache_blocks
(
&
pagecache
,
&
file1
,
FLUSH_
FORCE_WRIT
E
);
flush_pagecache_blocks
(
&
pagecache
,
&
file1
,
FLUSH_
RELEAS
E
);
}
my_close
(
file1
.
file
,
MYF
(
MY_WME
));
if
((
file1
.
file
=
my_open
(
first_translog_file
,
O_RDONLY
,
MYF
(
MY_WME
)))
<
0
)
...
...
storage/oqgraph/ha_oqgraph.cc
View file @
bafceea1
...
...
@@ -748,19 +748,19 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
if
(
row
.
latch_indicator
)
{
field
[
0
]
->
set_notnull
();
field
[
0
]
->
store
((
longlong
)
row
.
latch
);
field
[
0
]
->
store
((
longlong
)
row
.
latch
,
0
);
}
if
(
row
.
orig_indicator
)
{
field
[
1
]
->
set_notnull
();
field
[
1
]
->
store
((
longlong
)
row
.
orig
);
field
[
1
]
->
store
((
longlong
)
row
.
orig
,
0
);
}
if
(
row
.
dest_indicator
)
{
field
[
2
]
->
set_notnull
();
field
[
2
]
->
store
((
longlong
)
row
.
dest
);
field
[
2
]
->
store
((
longlong
)
row
.
dest
,
0
);
}
if
(
row
.
weight_indicator
)
...
...
@@ -772,13 +772,13 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
if
(
row
.
seq_indicator
)
{
field
[
4
]
->
set_notnull
();
field
[
4
]
->
store
((
longlong
)
row
.
seq
);
field
[
4
]
->
store
((
longlong
)
row
.
seq
,
0
);
}
if
(
row
.
link_indicator
)
{
field
[
5
]
->
set_notnull
();
field
[
5
]
->
store
((
longlong
)
row
.
link
);
field
[
5
]
->
store
((
longlong
)
row
.
link
,
0
);
}
if
(
ptrdiff
)
...
...
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