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