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
e063e3fd
Commit
e063e3fd
authored
Jul 01, 2011
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 5.2
parents
3c78bfe7
5e876bd3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
15 deletions
+46
-15
storage/maria/ma_bitmap.c
storage/maria/ma_bitmap.c
+7
-4
storage/maria/ma_check.c
storage/maria/ma_check.c
+26
-3
storage/maria/ma_pagecache.c
storage/maria/ma_pagecache.c
+2
-2
storage/maria/maria_chk.c
storage/maria/maria_chk.c
+1
-1
storage/maria/maria_read_log.c
storage/maria/maria_read_log.c
+10
-5
No files found.
storage/maria/ma_bitmap.c
View file @
e063e3fd
...
...
@@ -1061,14 +1061,18 @@ static my_bool move_to_next_bitmap(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap)
MARIA_STATE_INFO
*
state
=
&
info
->
s
->
state
;
DBUG_ENTER
(
"move_to_next_bitmap"
);
if
(
state
->
first_bitmap_with_space
!=
~
(
ulonglong
)
0
&&
if
(
state
->
first_bitmap_with_space
!=
~
(
pgcache_page_no_t
)
0
&&
state
->
first_bitmap_with_space
!=
page
)
{
page
=
state
->
first_bitmap_with_space
;
state
->
first_bitmap_with_space
=
~
(
ulonglong
)
0
;
state
->
first_bitmap_with_space
=
~
(
pgcache_page_no_t
)
0
;
DBUG_ASSERT
(
page
%
bitmap
->
pages_covered
==
0
);
}
else
{
page
+=
bitmap
->
pages_covered
;
DBUG_ASSERT
(
page
%
bitmap
->
pages_covered
==
0
);
}
DBUG_RETURN
(
_ma_change_bitmap_page
(
info
,
bitmap
,
page
));
}
...
...
@@ -2039,8 +2043,7 @@ my_bool _ma_bitmap_find_new_place(MARIA_HA *info, MARIA_ROW *row,
goto
abort
;
/* Switch bitmap to current head page */
bitmap_page
=
page
/
share
->
bitmap
.
pages_covered
;
bitmap_page
*=
share
->
bitmap
.
pages_covered
;
bitmap_page
=
page
-
page
%
share
->
bitmap
.
pages_covered
;
if
(
share
->
bitmap
.
page
!=
bitmap_page
&&
_ma_change_bitmap_page
(
info
,
&
share
->
bitmap
,
bitmap_page
))
...
...
storage/maria/ma_check.c
View file @
e063e3fd
...
...
@@ -6568,6 +6568,17 @@ static void copy_data_file_state(MARIA_STATE_INFO *to,
}
/* Return 1 if block is full of zero's */
static
my_bool
zero_filled_block
(
uchar
*
tmp
,
uint
length
)
{
while
(
length
--
)
if
(
*
(
tmp
++
)
!=
0
)
return
0
;
return
1
;
}
/*
Read 'safely' next record while scanning table.
...
...
@@ -6669,9 +6680,21 @@ static int _ma_safe_scan_block_record(MARIA_SORT_INFO *sort_info,
{
if
(
my_errno
==
HA_ERR_WRONG_CRC
)
{
_ma_check_print_info
(
sort_info
->
param
,
"Wrong CRC on datapage at %s"
,
llstr
(
page
,
llbuff
));
/*
Don't give errors for zero filled blocks. These can
sometimes be found at end of a bitmap when we wrote a big
record last that was moved to the next bitmap.
*/
if
(
!
zero_filled_block
(
info
->
scan
.
page_buff
,
share
->
block_size
)
||
_ma_check_bitmap_data
(
info
,
UNALLOCATED_PAGE
,
0
,
_ma_bitmap_get_page_bits
(
info
,
&
share
->
bitmap
,
page
)))
{
_ma_check_print_info
(
sort_info
->
param
,
"Wrong CRC on datapage at %s"
,
llstr
(
page
,
llbuff
));
}
continue
;
}
DBUG_RETURN
(
my_errno
);
...
...
storage/maria/ma_pagecache.c
View file @
e063e3fd
...
...
@@ -3519,7 +3519,7 @@ uchar *pagecache_read(PAGECACHE *pagecache,
}
else
{
if
(
!
(
status
&
PCBLOCK_ERROR
)
)
if
(
status
&
PCBLOCK_READ
)
{
#if !defined(SERIALIZED_READ_FROM_CACHE)
pagecache_pthread_mutex_unlock
(
&
pagecache
->
cache_lock
);
...
...
@@ -3533,7 +3533,7 @@ uchar *pagecache_read(PAGECACHE *pagecache,
pagecache_pthread_mutex_lock
(
&
pagecache
->
cache_lock
);
#endif
}
else
if
(
status
&
PCBLOCK_ERROR
)
my_errno
=
block
->
error
;
}
...
...
storage/maria/maria_chk.c
View file @
e063e3fd
...
...
@@ -878,9 +878,9 @@ static void get_options(register int *argc,register char ***argv)
load_defaults
(
"my"
,
load_default_groups
,
argc
,
argv
);
default_argv
=
*
argv
;
check_param
.
testflag
=
T_UPDATE_STATE
;
if
(
isatty
(
fileno
(
stdout
)))
check_param
.
testflag
|=
T_WRITE_LOOP
;
check_param
.
testflag
=
T_UPDATE_STATE
;
if
((
ho_error
=
handle_options
(
argc
,
argv
,
my_long_options
,
get_one_option
)))
exit
(
ho_error
);
...
...
storage/maria/maria_read_log.c
View file @
e063e3fd
...
...
@@ -32,7 +32,7 @@ const char *default_dbug_option= "d:t:o,/tmp/aria_read_log.trace";
static
my_bool
opt_display_only
,
opt_apply
,
opt_apply_undo
,
opt_silent
;
static
my_bool
opt_check
;
static
const
char
*
opt_tmpdir
;
static
ulong
opt_page_buffer_size
;
static
ulong
opt_page_buffer_size
,
opt_translog_buffer_size
;
static
ulonglong
opt_start_from_lsn
,
opt_end_lsn
,
opt_start_from_checkpoint
;
static
MY_TMPDIR
maria_chk_tmpdir
;
...
...
@@ -80,9 +80,8 @@ int main(int argc, char **argv)
But if it finds a log and this log was crashed, it will create a new log,
which is useless. TODO: start log handler in read-only mode.
*/
if
(
init_pagecache
(
maria_log_pagecache
,
TRANSLOG_PAGECACHE_SIZE
,
0
,
0
,
TRANSLOG_PAGE_SIZE
,
MY_WME
)
==
0
||
if
(
init_pagecache
(
maria_log_pagecache
,
opt_translog_buffer_size
,
0
,
0
,
TRANSLOG_PAGE_SIZE
,
MY_WME
)
==
0
||
translog_init
(
maria_data_root
,
TRANSLOG_FILE_SIZE
,
0
,
0
,
maria_log_pagecache
,
TRANSLOG_DEFAULT_FLAGS
,
opt_display_only
))
...
...
@@ -166,7 +165,7 @@ int main(int argc, char **argv)
#include "ma_check_standalone.h"
enum
options_mc
{
OPT_CHARSETS_DIR
=
256
,
OPT_FORCE_CRASH
OPT_CHARSETS_DIR
=
256
,
OPT_FORCE_CRASH
,
OPT_TRANSLOG_BUFFER_SIZE
};
static
struct
my_option
my_long_options
[]
=
...
...
@@ -228,6 +227,12 @@ static struct my_option my_long_options[] =
"colon (:)"
#endif
,
(
char
**
)
&
opt_tmpdir
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"translog-buffer-size"
,
OPT_TRANSLOG_BUFFER_SIZE
,
"The size of the buffer used for transaction log for Aria tables"
,
&
opt_translog_buffer_size
,
&
opt_translog_buffer_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
(
long
)
TRANSLOG_PAGECACHE_SIZE
,
1024L
*
1024L
,
(
long
)
~
(
ulong
)
0
,
(
long
)
MALLOC_OVERHEAD
,
(
long
)
IO_SIZE
,
0
},
{
"undo"
,
'u'
,
"Apply UNDO records to tables. (disable with --disable-undo)"
,
(
uchar
**
)
&
opt_apply_undo
,
(
uchar
**
)
&
opt_apply_undo
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
...
...
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