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
9d1546fe
Commit
9d1546fe
authored
May 25, 2013
by
Seppo Jaakola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
References: MDEV-4572 - merge with lp:codership-mysql/5.5-23 revisions 3858..3867
parent
48af4be6
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
45 additions
and
27 deletions
+45
-27
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+1
-1
scripts/wsrep_sst_common.sh
scripts/wsrep_sst_common.sh
+1
-1
scripts/wsrep_sst_mysqldump.sh
scripts/wsrep_sst_mysqldump.sh
+7
-7
scripts/wsrep_sst_rsync.sh
scripts/wsrep_sst_rsync.sh
+1
-1
scripts/wsrep_sst_xtrabackup.sh
scripts/wsrep_sst_xtrabackup.sh
+2
-9
sql/sql_admin.cc
sql/sql_admin.cc
+3
-0
sql/sql_insert.cc
sql/sql_insert.cc
+14
-1
sql/wsrep_hton.cc
sql/wsrep_hton.cc
+1
-0
sql/wsrep_sst.cc
sql/wsrep_sst.cc
+1
-1
sql/wsrep_utils.cc
sql/wsrep_utils.cc
+2
-4
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+1
-1
storage/innobase/lock/lock0lock.c
storage/innobase/lock/lock0lock.c
+5
-0
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+1
-1
storage/xtradb/lock/lock0lock.c
storage/xtradb/lock/lock0lock.c
+5
-0
No files found.
scripts/mysqld_safe.sh
View file @
9d1546fe
...
...
@@ -227,7 +227,7 @@ wsrep_recover_position() {
log_notice
"WSREP: Running position recovery with --log_error=
$wr_logfile
"
$mysqld_cmd
--log_error
=
$wr_logfile
--wsrep-recover
eval_log_error
$mysqld_cmd
--log_error
=
$wr_logfile
--wsrep-recover
local
rp
=
"
$(
grep
'WSREP: Recovered position:'
$wr_logfile
)
"
if
[
-z
"
$rp
"
]
;
then
...
...
scripts/wsrep_sst_common.sh
View file @
9d1546fe
...
...
@@ -91,7 +91,7 @@ wsrep_log()
# echo everything to stderr so that it gets into common error log
# deliberately made to look different from the rest of the log
local readonly
tst
=
"
$(
date
+%Y%m%d
\
%H:%M:%S.%N |
cut
-b
-21
)
"
echo
"WSREP_SST:
$*
(
$tst
)"
>
>
/dev/stderr
echo
"WSREP_SST:
$*
(
$tst
)"
>
&2
}
wsrep_log_error
()
...
...
scripts/wsrep_sst_mysqldump.sh
View file @
9d1546fe
...
...
@@ -38,12 +38,12 @@ local_ip()
return
1
}
if
test
-z
"
$WSREP_SST_OPT_USER
"
;
then
er
r
"USER cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_HOST
"
;
then
er
r
"HOST cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_PORT
"
;
then
er
r
"PORT cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_LPORT
"
;
then
er
r
"LPORT cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_SOCKET
"
;
then
er
r
"SOCKET cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_GTID
"
;
then
er
r
"GTID cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_USER
"
;
then
wsrep_log_erro
r
"USER cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_HOST
"
;
then
wsrep_log_erro
r
"HOST cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_PORT
"
;
then
wsrep_log_erro
r
"PORT cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_LPORT
"
;
then
wsrep_log_erro
r
"LPORT cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_SOCKET
"
;
then
wsrep_log_erro
r
"SOCKET cannot be nil"
;
exit
$EINVAL
;
fi
if
test
-z
"
$WSREP_SST_OPT_GTID
"
;
then
wsrep_log_erro
r
"GTID cannot be nil"
;
exit
$EINVAL
;
fi
if
local_ip
$WSREP_SST_OPT_HOST
&&
\
[
"
$WSREP_SST_OPT_PORT
"
=
"
$WSREP_SST_OPT_LPORT
"
]
...
...
@@ -57,7 +57,7 @@ fi
if
!
mysql
--version
|
grep
'Distrib 5.5'
>
/dev/null
then
mysql
--version
>
&2
er
r
"this operation requires MySQL client version 5.5.x"
wsrep_log_erro
r
"this operation requires MySQL client version 5.5.x"
exit
$EINVAL
fi
...
...
scripts/wsrep_sst_rsync.sh
View file @
9d1546fe
...
...
@@ -32,7 +32,7 @@ cleanup_joiner()
rm
-rf
"
$RSYNC_CONF
"
rm
-rf
"
$MAGIC_FILE
"
rm
-rf
"
$RSYNC_PID
"
echo
" done."
>
&2
wsrep_log_info
"Joiner cleanup done."
}
check_pid
()
...
...
scripts/wsrep_sst_xtrabackup.sh
View file @
9d1546fe
...
...
@@ -98,16 +98,9 @@ then
if
[
$WSREP_SST_OPT_BYPASS
-eq
0
]
then
TMPDIR
=
${
TMPDIR
:-
""
}
if
[
-z
"
${
TMPDIR
}
"
]
;
then
# try to get it from my.cnf
TMPDIR
=
$(
grep
-E
'^\s*tmpdir'
$WSREP_SST_OPT_CONF
|
\
awk
-F
=
'{ print $2 }'
|
sed
's/^\s//g'
|
sed
's/\s.*//g'
)
# if failed default to /tmp
[
-z
"
${
TMPDIR
}
"
]
&&
TMPDIR
=
"/tmp"
fi
TMPDIR
=
${
TMPDIR
:-
"/tmp"
}
INNOBACKUPEX_ARGS
=
"--galera-info --
tmpdir=
${
TMPDIR
}
--
stream=tar
INNOBACKUPEX_ARGS
=
"--galera-info --stream=tar
--defaults-file=
${
WSREP_SST_OPT_CONF
}
--socket=
${
WSREP_SST_OPT_SOCKET
}
"
...
...
sql/sql_admin.cc
View file @
9d1546fe
...
...
@@ -1073,6 +1073,8 @@ bool Optimize_table_statement::execute(THD *thd)
FALSE
,
UINT_MAX
,
FALSE
))
goto
error
;
/* purecov: inspected */
thd
->
enable_slow_log
=
opt_log_slow_admin_statements
;
WSREP_TO_ISOLATION_BEGIN
(
first_table
->
db
,
first_table
->
table_name
,
NULL
)
res
=
(
specialflag
&
(
SPECIAL_SAFE_MODE
|
SPECIAL_NO_NEW_FUNC
))
?
mysql_recreate_table
(
thd
,
first_table
)
:
mysql_admin_table
(
thd
,
first_table
,
&
m_lex
->
check_opt
,
...
...
@@ -1104,6 +1106,7 @@ bool Repair_table_statement::execute(THD *thd)
FALSE
,
UINT_MAX
,
FALSE
))
goto
error
;
/* purecov: inspected */
thd
->
enable_slow_log
=
opt_log_slow_admin_statements
;
WSREP_TO_ISOLATION_BEGIN
(
first_table
->
db
,
first_table
->
table_name
,
NULL
)
res
=
mysql_admin_table
(
thd
,
first_table
,
&
m_lex
->
check_opt
,
"repair"
,
TL_WRITE
,
1
,
test
(
m_lex
->
check_opt
.
sql_flags
&
TT_USEFRM
),
...
...
sql/sql_insert.cc
View file @
9d1546fe
...
...
@@ -3658,7 +3658,8 @@ bool select_insert::send_eof()
trans_table
,
table
->
file
->
table_type
()));
#ifdef WITH_WSREP
error
=
(
thd
->
wsrep_conflict_state
==
MUST_ABORT
)
?
-
1
:
error
=
(
thd
->
wsrep_conflict_state
==
MUST_ABORT
||
thd
->
wsrep_conflict_state
==
CERT_FAILURE
)
?
-
1
:
(
thd
->
locked_tables_mode
<=
LTM_LOCK_TABLES
?
table
->
file
->
ha_end_bulk_insert
()
:
0
);
#else
...
...
@@ -4249,6 +4250,18 @@ bool select_create::send_eof()
{
trans_commit_stmt
(
thd
);
trans_commit_implicit
(
thd
);
#ifdef WITH_WSREP
mysql_mutex_lock
(
&
thd
->
LOCK_wsrep_thd
);
if
(
thd
->
wsrep_conflict_state
!=
NO_CONFLICT
)
{
WSREP_DEBUG
(
"select_create commit failed, thd: %lu err: %d %s"
,
thd
->
thread_id
,
thd
->
wsrep_conflict_state
,
thd
->
query
());
mysql_mutex_unlock
(
&
thd
->
LOCK_wsrep_thd
);
abort_result_set
();
return
TRUE
;
}
mysql_mutex_unlock
(
&
thd
->
LOCK_wsrep_thd
);
#endif
/* WITH_WSREP */
}
table
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
...
...
sql/wsrep_hton.cc
View file @
9d1546fe
...
...
@@ -321,6 +321,7 @@ wsrep_run_wsrep_commit(
{
WSREP_DEBUG
(
"empty rbr buffer, query: %s"
,
thd
->
query
());
}
thd
->
wsrep_query_state
=
QUERY_EXEC
;
DBUG_RETURN
(
WSREP_TRX_OK
);
}
if
(
WSREP_UNDEFINED_TRX_ID
==
thd
->
wsrep_trx_handle
.
trx_id
)
...
...
sql/wsrep_sst.cc
View file @
9d1546fe
...
...
@@ -937,7 +937,7 @@ static int sst_donate_other (const char* method,
{
WSREP_ERROR
(
"sst_donate_other(): pthread_create() failed: %d (%s)"
,
ret
,
strerror
(
ret
));
return
ret
;
return
-
ret
;
}
mysql_cond_wait
(
&
arg
.
cond
,
&
arg
.
lock
);
...
...
sql/wsrep_utils.cc
View file @
9d1546fe
...
...
@@ -353,10 +353,8 @@ size_t guess_ip (char* buf, size_t buf_len)
// try to find the address of the first one
#if (TARGET_OS_LINUX == 1)
const
char
cmd
[]
=
"/sbin/ifconfig | "
// "grep -m1 -1 -E '^[a-z]?eth[0-9]' | tail -n 1 | "
"grep -E '^[[:space:]]+inet addr:' | grep -m1 -v 'inet addr:127' | "
"sed 's/:/ /' | awk '{ print $3 }'"
;
const
char
cmd
[]
=
"ip addr show | grep -E '^
\\
s*inet' | grep -m1 global |"
" awk '{ print $2 }' | sed 's/
\\
/.*//'"
;
#elif defined(__sun__)
const
char
cmd
[]
=
"/sbin/ifconfig -a | "
"/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"
;
...
...
storage/innobase/handler/ha_innodb.cc
View file @
9d1546fe
...
...
@@ -4513,7 +4513,7 @@ wsrep_innobase_mysql_sort(
memcpy
(
tmp_str
,
str
,
str_length
);
tmp_length
=
charset
->
coll
->
strnxfrm
(
charset
,
str
,
str_length
,
tmp_str
,
tmp
_length
);
tmp_str
,
str
_length
);
DBUG_ASSERT
(
tmp_length
==
str_length
);
break
;
...
...
storage/innobase/lock/lock0lock.c
View file @
9d1546fe
...
...
@@ -5666,6 +5666,11 @@ lock_rec_convert_impl_to_expl(
implicit lock. Because cannot lock at this moment.*/
if
(
rec_get_deleted_flag
(
rec
,
rec_offs_comp
(
offsets
))
#ifdef WITH_WSREP
&&
!
wsrep_thd_is_brute_force
(
impl_trx
->
mysql_thd
)
/* BF-BF conflict is possible if advancing into
lock_rec_other_has_conflicting*/
#endif
/* WITH_WSREP */
&&
lock_rec_other_has_conflicting
(
LOCK_X
|
LOCK_REC_NOT_GAP
,
block
,
heap_no
,
impl_trx
))
{
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
9d1546fe
...
...
@@ -5176,7 +5176,7 @@ wsrep_innobase_mysql_sort(
memcpy
(
tmp_str
,
str
,
str_length
);
tmp_length
=
charset
->
coll
->
strnxfrm
(
charset
,
str
,
str_length
,
tmp_str
,
tmp
_length
);
tmp_str
,
str
_length
);
DBUG_ASSERT
(
tmp_length
==
str_length
);
break
;
...
...
storage/xtradb/lock/lock0lock.c
View file @
9d1546fe
...
...
@@ -5691,6 +5691,11 @@ lock_rec_convert_impl_to_expl(
implicit lock. Because cannot lock at this moment.*/
if
(
rec_get_deleted_flag
(
rec
,
rec_offs_comp
(
offsets
))
#ifdef WITH_WSREP
&&
!
wsrep_thd_is_brute_force
(
impl_trx
->
mysql_thd
)
/* BF-BF conflict is possible if advancing into
lock_rec_other_has_conflicting*/
#endif
/* WITH_WSREP */
&&
lock_rec_other_has_conflicting
(
LOCK_X
|
LOCK_REC_NOT_GAP
,
block
,
heap_no
,
impl_trx
))
{
...
...
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