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. scripts/make_binary_distribution.sh: Document that our build system explicitly overrides the @pkgfoo@ (e.g., pkgdatadir, pkglibdir, etc.) variables when 'make' is called. scripts/mysqld_safe.sh: Replace hard-coded "./share/mysql" with something like echo @pkgdatadir@ | sed -e s/^@prefix@//. Since the fix for bug 28544, this has been broken for mysql 5.1+, where the package data dir is "./share" instead of "./share/mysql".
This commit is contained in:
parent
9b6dc66ede
commit
1d772c91e0
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
|
# Note that the structure created by this script is slightly different from
|
||||||
# what a normal "make install" would produce. No extra "mysql" sub directory
|
# 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
|
# 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
|
# In GNU make/automake terms
|
||||||
#
|
#
|
||||||
|
@ -200,16 +200,24 @@ parse_arguments() {
|
|||||||
|
|
||||||
#
|
#
|
||||||
# First, try to find BASEDIR and ledir (where mysqld is)
|
# 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`
|
MY_PWD=`pwd`
|
||||||
# Check for the directories we would expect from a binary release install
|
# 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
|
then
|
||||||
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
|
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
|
||||||
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
|
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
|
||||||
# Check for the directories we would expect from a source install
|
# 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
|
then
|
||||||
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
|
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
|
||||||
ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
|
ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
|
||||||
@ -219,6 +227,7 @@ else
|
|||||||
ledir=@libexecdir@
|
ledir=@libexecdir@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Second, try to find the data directory
|
# Second, try to find the data directory
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user