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
9ce928de
Commit
9ce928de
authored
May 21, 2009
by
Alfranio Correia
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge 5.1-bugteam (local) --> 5.1-bugteam
parents
60955e54
f6eb9426
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
9 deletions
+23
-9
mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
...l-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
+1
-1
mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test
mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test
+2
-2
mysys/mf_format.c
mysys/mf_format.c
+1
-1
sql/rpl_rli.cc
sql/rpl_rli.cc
+10
-3
sql/slave.cc
sql/slave.cc
+9
-2
No files found.
mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
View file @
9ce928de
...
@@ -3,4 +3,4 @@ MASTER_CONNECT_RETRY=1,
...
@@ -3,4 +3,4 @@ MASTER_CONNECT_RETRY=1,
MASTER_HOST='127.0.0.1',
MASTER_HOST='127.0.0.1',
MASTER_PORT=MASTER_MYPORT;
MASTER_PORT=MASTER_MYPORT;
START SLAVE;
START SLAVE;
Unable to use slave's temporary directory ../../../error - Can't read dir of '../../../error' (Errcode: 2)
12
mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test
View file @
9ce928de
...
@@ -20,5 +20,5 @@ eval CHANGE MASTER TO MASTER_USER='root',
...
@@ -20,5 +20,5 @@ eval CHANGE MASTER TO MASTER_USER='root',
START
SLAVE
;
START
SLAVE
;
source
include
/
wait_for_slave_sql_to_stop
.
inc
;
source
include
/
wait_for_slave_sql_to_stop
.
inc
;
let
$err
or
=
query_get_value
(
"show slave status"
,
Last_SQL_Error
,
1
);
let
$err
no
=
query_get_value
(
"show slave status"
,
Last_SQL_Errno
,
1
);
echo
$err
or
;
echo
$err
no
;
mysys/mf_format.c
View file @
9ce928de
...
@@ -79,7 +79,7 @@ char * fn_format(char * to, const char *name, const char *dir,
...
@@ -79,7 +79,7 @@ char * fn_format(char * to, const char *name, const char *dir,
/* To long path, return original or NULL */
/* To long path, return original or NULL */
size_t
tmp_length
;
size_t
tmp_length
;
if
(
flag
&
MY_SAFE_PATH
)
if
(
flag
&
MY_SAFE_PATH
)
return
NullS
;
DBUG_RETURN
(
NullS
)
;
tmp_length
=
strlength
(
startpos
);
tmp_length
=
strlength
(
startpos
);
DBUG_PRINT
(
"error"
,(
"dev: '%s' ext: '%s' length: %u"
,
dev
,
ext
,
DBUG_PRINT
(
"error"
,(
"dev: '%s' ext: '%s' length: %u"
,
dev
,
ext
,
(
uint
)
length
));
(
uint
)
length
));
...
...
sql/rpl_rli.cc
View file @
9ce928de
...
@@ -104,9 +104,16 @@ int init_relay_log_info(Relay_log_info* rli,
...
@@ -104,9 +104,16 @@ int init_relay_log_info(Relay_log_info* rli,
rli
->
tables_to_lock
=
0
;
rli
->
tables_to_lock
=
0
;
rli
->
tables_to_lock_count
=
0
;
rli
->
tables_to_lock_count
=
0
;
fn_format
(
rli
->
slave_patternload_file
,
PREFIX_SQL_LOAD
,
slave_load_tmpdir
,
""
,
char
pattern
[
FN_REFLEN
];
MY_PACK_FILENAME
|
MY_UNPACK_FILENAME
|
if
(
fn_format
(
pattern
,
PREFIX_SQL_LOAD
,
slave_load_tmpdir
,
""
,
MY_RETURN_REAL_PATH
);
MY_SAFE_PATH
|
MY_RETURN_REAL_PATH
)
==
NullS
)
{
pthread_mutex_unlock
(
&
rli
->
data_lock
);
sql_print_error
(
"Unable to use slave's temporary directory %s"
,
slave_load_tmpdir
);
DBUG_RETURN
(
1
);
}
unpack_filename
(
rli
->
slave_patternload_file
,
pattern
);
rli
->
slave_patternload_file_size
=
strlen
(
rli
->
slave_patternload_file
);
rli
->
slave_patternload_file_size
=
strlen
(
rli
->
slave_patternload_file
);
/*
/*
...
...
sql/slave.cc
View file @
9ce928de
...
@@ -2668,13 +2668,20 @@ err:
...
@@ -2668,13 +2668,20 @@ err:
LOAD DATA INFILE.
LOAD DATA INFILE.
*/
*/
static
static
int
check_temp_dir
(
char
*
tmp_
dir
,
char
*
tmp_
file
)
int
check_temp_dir
(
char
*
tmp_file
)
{
{
int
fd
;
int
fd
;
MY_DIR
*
dirp
;
MY_DIR
*
dirp
;
char
tmp_dir
[
FN_REFLEN
];
size_t
tmp_dir_size
;
DBUG_ENTER
(
"check_temp_dir"
);
DBUG_ENTER
(
"check_temp_dir"
);
/*
Get the directory from the temporary file.
*/
dirname_part
(
tmp_dir
,
tmp_file
,
&
tmp_dir_size
);
/*
/*
Check if the directory exists.
Check if the directory exists.
*/
*/
...
@@ -2830,7 +2837,7 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME,
...
@@ -2830,7 +2837,7 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME,
llstr
(
rli
->
group_master_log_pos
,
llbuff
),
rli
->
group_relay_log_name
,
llstr
(
rli
->
group_master_log_pos
,
llbuff
),
rli
->
group_relay_log_name
,
llstr
(
rli
->
group_relay_log_pos
,
llbuff1
));
llstr
(
rli
->
group_relay_log_pos
,
llbuff1
));
if
(
check_temp_dir
(
slave_load_tmpdir
,
rli
->
slave_patternload_file
))
if
(
check_temp_dir
(
rli
->
slave_patternload_file
))
{
{
rli
->
report
(
ERROR_LEVEL
,
thd
->
main_da
.
sql_errno
(),
rli
->
report
(
ERROR_LEVEL
,
thd
->
main_da
.
sql_errno
(),
"Unable to use slave's temporary directory %s - %s"
,
"Unable to use slave's temporary directory %s - %s"
,
...
...
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