Commit 0482b89d authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Fix to get pstack included in distribution

Fix to get libmysqld examples to be included in distribution
parent 21fc5254
......@@ -410,3 +410,5 @@ libmysqld/examples/mysqltest.c
libmysqld/examples/readline.cc
libmysqld/examples/sql_string.cc
libmysqld/examples/sql_string.h
libmysqld/examples/mysql
libmysqld/examples/mysqltest
......@@ -688,7 +688,6 @@ int main()
[USE_PSTACK=yes])
pstack_libs=
pstack_dirs=
pstack_makefile=
if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$MACHINE_TYPE" = "i686"
then
have_libiberty= have_libbfd=
......@@ -704,7 +703,6 @@ dnl I have no idea if this is a good test - can not find docs for libiberty
then
pstack_dirs='$(top_srcdir)'/pstack
pstack_libs="$pstack_dirs/libpstack.a -lbfd -liberty"
pstack_makefile=pstack/Makefile
AC_SUBST([pstack_dirs])
AC_SUBST([pstack_libs])
AC_DEFINE([USE_PSTACK])
......@@ -2222,7 +2220,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \
man/Makefile readline/Makefile vio/Makefile \
libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile \
libmysql/Makefile client/Makefile \
$pstack_makefile sql/Makefile sql/share/Makefile \
pstack/Makefile sql/Makefile sql/share/Makefile \
merge/Makefile dbug/Makefile scripts/Makefile \
include/Makefile sql-bench/Makefile tools/Makefile \
tests/Makefile Docs/Makefile support-files/Makefile \
......
......@@ -32,7 +32,7 @@ INCLUDES = @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include -I../include \
## XXX: should we use client or server LDFLAGS for libmysqld?
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmysqld.la
pkglib_LTLIBRARIES = libmysqld.la
SUBDIRS = examples
SUBDIRS = . examples
libmysqld_la_SOURCES= libmysqld.c lib_sql.cc lib_load.cc
libmysqlsources = errmsg.c get_password.c password.c
......
bin_PROGRAMS = mysqltest mysql
noinst_PROGRAMS = mysqltest mysql
client_sources = $(mysqltest_SOURCES) $(mysql_SOURCES)
link_sources:
for f in $(client_sources); do \
rm -f $(srcdir)/$$f; \
......@@ -8,7 +9,7 @@ link_sources:
DEFS = -DEMBEDDED_SERVER
INCLUDES = -I$(top_srcdir)/include $(openssl_includes) \
-I$(srcdir) -I$(top_srcdir) -I..
-I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/client
LIBS = @LIBS@
LDADD = $(top_builddir)/libmysqld/libmysqld.la \
$(top_builddir)/isam/libnisam.a \
......@@ -20,7 +21,7 @@ LDADD = $(top_builddir)/libmysqld/libmysqld.la \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a
$(top_builddir)/regex/libregex.a @LIBDL@
mysqltest_DEPENDENCIES = ../libmysqld.la
mysqltest_SOURCES = mysqltest.c
......@@ -31,3 +32,6 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
clean:
rm -f $(client_sources)
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -2017,8 +2017,6 @@ mysql_execute_command(void)
case SQLCOM_REVOKE:
case SQLCOM_GRANT:
{
if (tables && !tables->db)
tables->db=thd->db;
if (check_access(thd, lex->grant | lex->grant_tot_col | GRANT_ACL,
tables && tables->db ? tables->db : select_lex->db,
tables ? &tables->grant.privilege : 0,
......@@ -2205,7 +2203,7 @@ check_access(THD *thd,uint want_access,const char *db, uint *save_priv,
else
save_priv= &dummy;
if (!db[0] && !thd->db && !dont_check_global_grants)
if ((!db || !db[0]) && !thd->db && !dont_check_global_grants)
{
send_error(&thd->net,ER_NO_DB_ERROR); /* purecov: tested */
return TRUE; /* purecov: tested */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment