Bug #32679: mysqld_safe looks for errmsg.sys in wrong path
The fix for bug 28544 moved our package data from ./share/mysql to ./share. mysqld_safe had the old directory hard-coded. The fix is to use the @pkgdatadir@ and @prefix@ values, to adapt to different ways of building the package.
This commit is contained in:
parent
4530750499
commit
95b791c7af
35
mysql-test/r/bdb_notembedded.result
Normal file
35
mysql-test/r/bdb_notembedded.result
Normal file
@ -0,0 +1,35 @@
|
||||
set autocommit=1;
|
||||
reset master;
|
||||
create table bug16206 (a int);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
|
||||
f n Query 1 n use `test`; create table bug16206 (a int)
|
||||
f n Query 1 n use `test`; insert into bug16206 values(1)
|
||||
f n Query 1 n use `test`; insert into bug16206 values(2)
|
||||
drop table bug16206;
|
||||
reset master;
|
||||
create table bug16206 (a int) engine= bdb;
|
||||
insert into bug16206 values(0);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
insert into bug16206 values(3);
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
|
||||
f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
|
||||
f n Query 1 n use `test`; insert into bug16206 values(0)
|
||||
f n Query 1 n use `test`; insert into bug16206 values(1)
|
||||
f n Query 1 n use `test`; BEGIN
|
||||
f n Query 1 n use `test`; insert into bug16206 values(2)
|
||||
f n Query 1 n use `test`; COMMIT
|
||||
f n Query 1 n use `test`; insert into bug16206 values(3)
|
||||
drop table bug16206;
|
||||
set autocommit=0;
|
||||
End of 5.0 tests
|
38
mysql-test/t/bdb_notembedded.test
Normal file
38
mysql-test/t/bdb_notembedded.test
Normal file
@ -0,0 +1,38 @@
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
#
|
||||
# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
|
||||
#
|
||||
set autocommit=1;
|
||||
|
||||
let $VERSION=`select version()`;
|
||||
|
||||
reset master;
|
||||
create table bug16206 (a int);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 1 f 2 n 5 n
|
||||
show binlog events;
|
||||
drop table bug16206;
|
||||
|
||||
reset master;
|
||||
create table bug16206 (a int) engine= bdb;
|
||||
insert into bug16206 values(0);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
insert into bug16206 values(3);
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 1 f 2 n 5 n
|
||||
show binlog events;
|
||||
drop table bug16206;
|
||||
|
||||
set autocommit=0;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
@ -23,7 +23,8 @@
|
||||
# Note that the structure created by this script is slightly different from
|
||||
# what a normal "make install" would produce. No extra "mysql" sub directory
|
||||
# will be created, i.e. no "$prefix/include/mysql", "$prefix/lib/mysql" or
|
||||
# "$prefix/share/mysql".
|
||||
# "$prefix/share/mysql". This is because the build system explicitly calls
|
||||
# make with pkgdatadir=<datadir>, etc.
|
||||
#
|
||||
# In GNU make/automake terms
|
||||
#
|
||||
|
@ -200,16 +200,24 @@ parse_arguments() {
|
||||
|
||||
#
|
||||
# First, try to find BASEDIR and ledir (where mysqld is)
|
||||
#
|
||||
#
|
||||
|
||||
if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null
|
||||
then
|
||||
relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'`
|
||||
else
|
||||
# pkgdatadir is not relative to prefix
|
||||
relpkgdata='@pkgdatadir@'
|
||||
fi
|
||||
|
||||
MY_PWD=`pwd`
|
||||
# Check for the directories we would expect from a binary release install
|
||||
if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
|
||||
if test -f "$relpkgdata"/english/errmsg.sys -a -x ./bin/mysqld
|
||||
then
|
||||
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
|
||||
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
|
||||
# Check for the directories we would expect from a source install
|
||||
elif test -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld
|
||||
elif test -f "$relpkgdata"/english/errmsg.sys -a -x ./libexec/mysqld
|
||||
then
|
||||
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
|
||||
ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
|
||||
@ -219,6 +227,7 @@ else
|
||||
ledir=@libexecdir@
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Second, try to find the data directory
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user