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
b6862c91
Commit
b6862c91
authored
Feb 18, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove now-unused argument
parent
b27fd90a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
26 deletions
+24
-26
storage/maria/ma_check.c
storage/maria/ma_check.c
+3
-3
storage/maria/ma_open.c
storage/maria/ma_open.c
+6
-6
storage/maria/maria_chk.c
storage/maria/maria_chk.c
+1
-1
storage/maria/maria_def.h
storage/maria/maria_def.h
+1
-1
storage/myisam/mi_check.c
storage/myisam/mi_check.c
+8
-10
storage/myisam/mi_open.c
storage/myisam/mi_open.c
+3
-3
storage/myisam/myisamchk.c
storage/myisam/myisamchk.c
+1
-1
storage/myisam/myisamdef.h
storage/myisam/myisamdef.h
+1
-1
No files found.
storage/maria/ma_check.c
View file @
b6862c91
...
@@ -2839,7 +2839,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
...
@@ -2839,7 +2839,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
(
param
->
testflag
&
T_BACKUP_DATA
?
(
param
->
testflag
&
T_BACKUP_DATA
?
MYF
(
MY_REDEL_MAKE_BACKUP
)
:
MYF
(
0
))
|
MYF
(
MY_REDEL_MAKE_BACKUP
)
:
MYF
(
0
))
|
sync_dir
)
||
sync_dir
)
||
_ma_open_datafile
(
info
,
share
,
NullS
))
_ma_open_datafile
(
info
,
share
))
{
{
goto
err
;
goto
err
;
}
}
...
@@ -3990,7 +3990,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
...
@@ -3990,7 +3990,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
(
param
->
testflag
&
T_BACKUP_DATA
?
(
param
->
testflag
&
T_BACKUP_DATA
?
MYF
(
MY_REDEL_MAKE_BACKUP
)
:
MYF
(
0
))
|
MYF
(
MY_REDEL_MAKE_BACKUP
)
:
MYF
(
0
))
|
sync_dir
)
||
sync_dir
)
||
_ma_open_datafile
(
info
,
share
,
NullS
))
_ma_open_datafile
(
info
,
share
))
{
{
_ma_check_print_error
(
param
,
"Couldn't change to new data file"
);
_ma_check_print_error
(
param
,
"Couldn't change to new data file"
);
goto
err
;
goto
err
;
...
@@ -4622,7 +4622,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
...
@@ -4622,7 +4622,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
MYF
((
param
->
testflag
&
T_BACKUP_DATA
?
MYF
((
param
->
testflag
&
T_BACKUP_DATA
?
MY_REDEL_MAKE_BACKUP
:
0
)
|
MY_REDEL_MAKE_BACKUP
:
0
)
|
sync_dir
))
||
sync_dir
))
||
_ma_open_datafile
(
info
,
share
,
NullS
))
_ma_open_datafile
(
info
,
share
))
got_error
=
1
;
got_error
=
1
;
}
}
}
}
...
...
storage/maria/ma_open.c
View file @
b6862c91
...
@@ -85,7 +85,7 @@ MARIA_HA *_ma_test_if_reopen(const char *filename)
...
@@ -85,7 +85,7 @@ MARIA_HA *_ma_test_if_reopen(const char *filename)
*/
*/
static
MARIA_HA
*
maria_clone_internal
(
MARIA_SHARE
*
share
,
const
char
*
name
,
static
MARIA_HA
*
maria_clone_internal
(
MARIA_SHARE
*
share
,
int
mode
,
File
data_file
)
int
mode
,
File
data_file
)
{
{
int
save_errno
;
int
save_errno
;
...
@@ -104,7 +104,7 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share, const char *name,
...
@@ -104,7 +104,7 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share, const char *name,
}
}
if
(
data_file
>=
0
)
if
(
data_file
>=
0
)
info
.
dfile
.
file
=
data_file
;
info
.
dfile
.
file
=
data_file
;
else
if
(
_ma_open_datafile
(
&
info
,
share
,
name
))
else
if
(
_ma_open_datafile
(
&
info
,
share
))
goto
err
;
goto
err
;
errpos
=
5
;
errpos
=
5
;
...
@@ -242,7 +242,7 @@ MARIA_HA *maria_clone(MARIA_SHARE *share, int mode)
...
@@ -242,7 +242,7 @@ MARIA_HA *maria_clone(MARIA_SHARE *share, int mode)
{
{
MARIA_HA
*
new_info
;
MARIA_HA
*
new_info
;
mysql_mutex_lock
(
&
THR_LOCK_maria
);
mysql_mutex_lock
(
&
THR_LOCK_maria
);
new_info
=
maria_clone_internal
(
share
,
NullS
,
mode
,
new_info
=
maria_clone_internal
(
share
,
mode
,
share
->
data_file_type
==
BLOCK_RECORD
?
share
->
data_file_type
==
BLOCK_RECORD
?
share
->
bitmap
.
file
.
file
:
-
1
);
share
->
bitmap
.
file
.
file
:
-
1
);
mysql_mutex_unlock
(
&
THR_LOCK_maria
);
mysql_mutex_unlock
(
&
THR_LOCK_maria
);
...
@@ -834,7 +834,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
...
@@ -834,7 +834,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
if
((
share
->
data_file_type
==
BLOCK_RECORD
||
if
((
share
->
data_file_type
==
BLOCK_RECORD
||
share
->
data_file_type
==
COMPRESSED_RECORD
))
share
->
data_file_type
==
COMPRESSED_RECORD
))
{
{
if
(
_ma_open_datafile
(
&
info
,
share
,
name
))
if
(
_ma_open_datafile
(
&
info
,
share
))
goto
err
;
goto
err
;
data_file
=
info
.
dfile
.
file
;
data_file
=
info
.
dfile
.
file
;
}
}
...
@@ -1006,7 +1006,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
...
@@ -1006,7 +1006,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
data_file
=
share
->
bitmap
.
file
.
file
;
/* Only opened once */
data_file
=
share
->
bitmap
.
file
.
file
;
/* Only opened once */
}
}
if
(
!
(
m_info
=
maria_clone_internal
(
share
,
name
,
mode
,
data_file
)))
if
(
!
(
m_info
=
maria_clone_internal
(
share
,
mode
,
data_file
)))
goto
err
;
goto
err
;
if
(
maria_is_crashed
(
m_info
))
if
(
maria_is_crashed
(
m_info
))
...
@@ -1879,7 +1879,7 @@ void _ma_set_index_pagecache_callbacks(PAGECACHE_FILE *file,
...
@@ -1879,7 +1879,7 @@ void _ma_set_index_pagecache_callbacks(PAGECACHE_FILE *file,
active seek-positions.
active seek-positions.
*************************************************************************/
*************************************************************************/
int
_ma_open_datafile
(
MARIA_HA
*
info
,
MARIA_SHARE
*
share
,
const
char
*
org_name
)
int
_ma_open_datafile
(
MARIA_HA
*
info
,
MARIA_SHARE
*
share
)
{
{
myf
flags
=
MY_WME
|
(
share
->
mode
&
O_NOFOLLOW
?
MY_NOSYMLINKS
:
0
);
myf
flags
=
MY_WME
|
(
share
->
mode
&
O_NOFOLLOW
?
MY_NOSYMLINKS
:
0
);
DEBUG_SYNC_C
(
"mi_open_datafile"
);
DEBUG_SYNC_C
(
"mi_open_datafile"
);
...
...
storage/maria/maria_chk.c
View file @
b6862c91
...
@@ -1242,7 +1242,7 @@ static int maria_chk(HA_CHECK *param, char *filename)
...
@@ -1242,7 +1242,7 @@ static int maria_chk(HA_CHECK *param, char *filename)
mysql_file_close
(
info
->
dfile
.
file
,
MYF
(
MY_WME
));
/* Close new file */
mysql_file_close
(
info
->
dfile
.
file
,
MYF
(
MY_WME
));
/* Close new file */
error
|=
maria_change_to_newfile
(
filename
,
MARIA_NAME_DEXT
,
DATA_TMP_EXT
,
error
|=
maria_change_to_newfile
(
filename
,
MARIA_NAME_DEXT
,
DATA_TMP_EXT
,
0
,
MYF
(
0
));
0
,
MYF
(
0
));
if
(
_ma_open_datafile
(
info
,
info
->
s
,
NullS
))
if
(
_ma_open_datafile
(
info
,
info
->
s
))
error
=
1
;
error
=
1
;
param
->
out_flag
&=
~
O_NEW_DATA
;
/* We are using new datafile */
param
->
out_flag
&=
~
O_NEW_DATA
;
/* We are using new datafile */
param
->
read_cache
.
file
=
info
->
dfile
.
file
;
param
->
read_cache
.
file
=
info
->
dfile
.
file
;
...
...
storage/maria/maria_def.h
View file @
b6862c91
...
@@ -1302,7 +1302,7 @@ int _ma_def_scan_restore_pos(MARIA_HA *info, MARIA_RECORD_POS lastpos);
...
@@ -1302,7 +1302,7 @@ int _ma_def_scan_restore_pos(MARIA_HA *info, MARIA_RECORD_POS lastpos);
extern
MARIA_HA
*
_ma_test_if_reopen
(
const
char
*
filename
);
extern
MARIA_HA
*
_ma_test_if_reopen
(
const
char
*
filename
);
my_bool
_ma_check_table_is_closed
(
const
char
*
name
,
const
char
*
where
);
my_bool
_ma_check_table_is_closed
(
const
char
*
name
,
const
char
*
where
);
int
_ma_open_datafile
(
MARIA_HA
*
info
,
MARIA_SHARE
*
share
,
const
char
*
org_name
);
int
_ma_open_datafile
(
MARIA_HA
*
info
,
MARIA_SHARE
*
share
);
int
_ma_open_keyfile
(
MARIA_SHARE
*
share
);
int
_ma_open_keyfile
(
MARIA_SHARE
*
share
);
void
_ma_setup_functions
(
register
MARIA_SHARE
*
share
);
void
_ma_setup_functions
(
register
MARIA_SHARE
*
share
);
my_bool
_ma_dynmap_file
(
MARIA_HA
*
info
,
my_off_t
size
);
my_bool
_ma_dynmap_file
(
MARIA_HA
*
info
,
my_off_t
size
);
...
...
storage/myisam/mi_check.c
View file @
b6862c91
...
@@ -80,8 +80,7 @@ static SORT_KEY_BLOCKS *alloc_key_blocks(HA_CHECK *param, uint blocks,
...
@@ -80,8 +80,7 @@ static SORT_KEY_BLOCKS *alloc_key_blocks(HA_CHECK *param, uint blocks,
uint
buffer_length
);
uint
buffer_length
);
static
ha_checksum
mi_byte_checksum
(
const
uchar
*
buf
,
uint
length
);
static
ha_checksum
mi_byte_checksum
(
const
uchar
*
buf
,
uint
length
);
static
void
set_data_file_type
(
MI_SORT_INFO
*
sort_info
,
MYISAM_SHARE
*
share
);
static
void
set_data_file_type
(
MI_SORT_INFO
*
sort_info
,
MYISAM_SHARE
*
share
);
static
int
replace_data_file
(
HA_CHECK
*
param
,
MI_INFO
*
info
,
static
int
replace_data_file
(
HA_CHECK
*
param
,
MI_INFO
*
info
,
File
new_file
);
const
char
*
name
,
File
new_file
);
void
myisamchk_init
(
HA_CHECK
*
param
)
void
myisamchk_init
(
HA_CHECK
*
param
)
{
{
...
@@ -1715,7 +1714,7 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info,
...
@@ -1715,7 +1714,7 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info,
/* Replace the actual file with the temporary file */
/* Replace the actual file with the temporary file */
if
(
new_file
>=
0
)
if
(
new_file
>=
0
)
{
{
got_error
=
replace_data_file
(
param
,
info
,
n
ame
,
n
ew_file
);
got_error
=
replace_data_file
(
param
,
info
,
new_file
);
new_file
=
-
1
;
new_file
=
-
1
;
param
->
retry_repair
=
0
;
param
->
retry_repair
=
0
;
}
}
...
@@ -2524,7 +2523,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
...
@@ -2524,7 +2523,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
/* Replace the actual file with the temporary file */
/* Replace the actual file with the temporary file */
if
(
new_file
>=
0
)
if
(
new_file
>=
0
)
{
{
got_error
=
replace_data_file
(
param
,
info
,
n
ame
,
n
ew_file
);
got_error
=
replace_data_file
(
param
,
info
,
new_file
);
new_file
=
-
1
;
new_file
=
-
1
;
}
}
}
}
...
@@ -2538,7 +2537,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
...
@@ -2538,7 +2537,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
(
void
)
mysql_file_delete
(
mi_key_file_datatmp
,
(
void
)
mysql_file_delete
(
mi_key_file_datatmp
,
param
->
temp_filename
,
MYF
(
MY_WME
));
param
->
temp_filename
,
MYF
(
MY_WME
));
if
(
info
->
dfile
==
new_file
)
/* Retry with key cache */
if
(
info
->
dfile
==
new_file
)
/* Retry with key cache */
if
(
unlikely
(
mi_open_datafile
(
info
,
share
,
name
)))
if
(
unlikely
(
mi_open_datafile
(
info
,
share
)))
param
->
retry_repair
=
0
;
/* Safety */
param
->
retry_repair
=
0
;
/* Safety */
}
}
mi_mark_crashed_on_repair
(
info
);
mi_mark_crashed_on_repair
(
info
);
...
@@ -3058,7 +3057,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
...
@@ -3058,7 +3057,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
/* Replace the actual file with the temporary file */
/* Replace the actual file with the temporary file */
if
(
new_file
>=
0
)
if
(
new_file
>=
0
)
{
{
got_error
=
replace_data_file
(
param
,
info
,
n
ame
,
n
ew_file
);
got_error
=
replace_data_file
(
param
,
info
,
new_file
);
new_file
=
-
1
;
new_file
=
-
1
;
}
}
}
}
...
@@ -3072,7 +3071,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
...
@@ -3072,7 +3071,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
(
void
)
mysql_file_delete
(
mi_key_file_datatmp
,
(
void
)
mysql_file_delete
(
mi_key_file_datatmp
,
param
->
temp_filename
,
MYF
(
MY_WME
));
param
->
temp_filename
,
MYF
(
MY_WME
));
if
(
info
->
dfile
==
new_file
)
/* Retry with key cache */
if
(
info
->
dfile
==
new_file
)
/* Retry with key cache */
if
(
unlikely
(
mi_open_datafile
(
info
,
share
,
name
)))
if
(
unlikely
(
mi_open_datafile
(
info
,
share
)))
param
->
retry_repair
=
0
;
/* Safety */
param
->
retry_repair
=
0
;
/* Safety */
}
}
mi_mark_crashed_on_repair
(
info
);
mi_mark_crashed_on_repair
(
info
);
...
@@ -4749,8 +4748,7 @@ int mi_make_backup_of_index(MI_INFO *info, time_t backup_time, myf flags)
...
@@ -4749,8 +4748,7 @@ int mi_make_backup_of_index(MI_INFO *info, time_t backup_time, myf flags)
}
}
static
int
replace_data_file
(
HA_CHECK
*
param
,
MI_INFO
*
info
,
static
int
replace_data_file
(
HA_CHECK
*
param
,
MI_INFO
*
info
,
File
new_file
)
const
char
*
name
,
File
new_file
)
{
{
MYISAM_SHARE
*
share
=
info
->
s
;
MYISAM_SHARE
*
share
=
info
->
s
;
...
@@ -4785,7 +4783,7 @@ static int replace_data_file(HA_CHECK *param, MI_INFO *info,
...
@@ -4785,7 +4783,7 @@ static int replace_data_file(HA_CHECK *param, MI_INFO *info,
DATA_TMP_EXT
,
param
->
backup_time
,
DATA_TMP_EXT
,
param
->
backup_time
,
(
param
->
testflag
&
T_BACKUP_DATA
?
(
param
->
testflag
&
T_BACKUP_DATA
?
MYF
(
MY_REDEL_MAKE_BACKUP
)
:
MYF
(
0
)))
||
MYF
(
MY_REDEL_MAKE_BACKUP
)
:
MYF
(
0
)))
||
mi_open_datafile
(
info
,
share
,
name
))
mi_open_datafile
(
info
,
share
))
return
1
;
return
1
;
return
0
;
return
0
;
}
}
storage/myisam/mi_open.c
View file @
b6862c91
...
@@ -493,7 +493,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
...
@@ -493,7 +493,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
lock_error
=
1
;
/* Database unlocked */
lock_error
=
1
;
/* Database unlocked */
}
}
if
(
mi_open_datafile
(
&
info
,
share
,
name
))
if
(
mi_open_datafile
(
&
info
,
share
))
goto
err
;
goto
err
;
errpos
=
5
;
errpos
=
5
;
...
@@ -574,7 +574,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
...
@@ -574,7 +574,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
my_errno
=
EACCES
;
/* Can't open in write mode */
my_errno
=
EACCES
;
/* Can't open in write mode */
goto
err
;
goto
err
;
}
}
if
(
mi_open_datafile
(
&
info
,
share
,
name
))
if
(
mi_open_datafile
(
&
info
,
share
))
goto
err
;
goto
err
;
errpos
=
5
;
errpos
=
5
;
have_rtree
=
old_info
->
rtree_recursion_state
!=
NULL
;
have_rtree
=
old_info
->
rtree_recursion_state
!=
NULL
;
...
@@ -1244,7 +1244,7 @@ We can't use dup() here as the data file descriptors need to have different
...
@@ -1244,7 +1244,7 @@ We can't use dup() here as the data file descriptors need to have different
active seek-positions.
active seek-positions.
*************************************************************************/
*************************************************************************/
int
mi_open_datafile
(
MI_INFO
*
info
,
MYISAM_SHARE
*
share
,
const
char
*
org_name
)
int
mi_open_datafile
(
MI_INFO
*
info
,
MYISAM_SHARE
*
share
)
{
{
myf
flags
=
MY_WME
|
(
share
->
mode
&
O_NOFOLLOW
?
MY_NOSYMLINKS
:
0
);
myf
flags
=
MY_WME
|
(
share
->
mode
&
O_NOFOLLOW
?
MY_NOSYMLINKS
:
0
);
DEBUG_SYNC_C
(
"mi_open_datafile"
);
DEBUG_SYNC_C
(
"mi_open_datafile"
);
...
...
storage/myisam/myisamchk.c
View file @
b6862c91
...
@@ -1012,7 +1012,7 @@ static int myisamchk(HA_CHECK *param, char * filename)
...
@@ -1012,7 +1012,7 @@ static int myisamchk(HA_CHECK *param, char * filename)
MYF
(
MY_WME
));
/* Close new file */
MYF
(
MY_WME
));
/* Close new file */
error
|=
change_to_newfile
(
filename
,
MI_NAME_DEXT
,
DATA_TMP_EXT
,
error
|=
change_to_newfile
(
filename
,
MI_NAME_DEXT
,
DATA_TMP_EXT
,
0
,
MYF
(
0
));
0
,
MYF
(
0
));
if
(
mi_open_datafile
(
info
,
info
->
s
,
NULL
))
if
(
mi_open_datafile
(
info
,
info
->
s
))
error
=
1
;
error
=
1
;
param
->
out_flag
&=
~
O_NEW_DATA
;
/* We are using new datafile */
param
->
out_flag
&=
~
O_NEW_DATA
;
/* We are using new datafile */
param
->
read_cache
.
file
=
info
->
dfile
;
param
->
read_cache
.
file
=
info
->
dfile
;
...
...
storage/myisam/myisamdef.h
View file @
b6862c91
...
@@ -708,7 +708,7 @@ void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
...
@@ -708,7 +708,7 @@ void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
extern
MI_INFO
*
test_if_reopen
(
char
*
filename
);
extern
MI_INFO
*
test_if_reopen
(
char
*
filename
);
my_bool
check_table_is_closed
(
const
char
*
name
,
const
char
*
where
);
my_bool
check_table_is_closed
(
const
char
*
name
,
const
char
*
where
);
int
mi_open_datafile
(
MI_INFO
*
info
,
MYISAM_SHARE
*
share
,
const
char
*
orn_name
);
int
mi_open_datafile
(
MI_INFO
*
info
,
MYISAM_SHARE
*
share
);
int
mi_open_keyfile
(
MYISAM_SHARE
*
share
);
int
mi_open_keyfile
(
MYISAM_SHARE
*
share
);
void
mi_setup_functions
(
register
MYISAM_SHARE
*
share
);
void
mi_setup_functions
(
register
MYISAM_SHARE
*
share
);
...
...
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