Commit 15acd75c authored by Mikael Ronstrom's avatar Mikael Ronstrom

Fixing DTrace issue in mysqld.cc

Disabling ndb DTrace probes temporarily
Hacking some DTrace Makefile magic to make it work
All temporary solutions to make it work quickly
parent f9b5640c
......@@ -29,7 +29,6 @@ libexec_PROGRAMS = mysqld
EXTRA_PROGRAMS = gen_lex_hash
bin_PROGRAMS = mysql_tzinfo_to_sql
DTRACEFILES = filesort.o \
libndb_la-ha_ndbcluster.o \
handler.o \
mysqld.o \
net_serv.o \
......@@ -207,8 +206,6 @@ install-exec-hook:
test ! -f mysqld.sym.gz || $(INSTALL_DATA) mysqld.sym.gz $(DESTDIR)$(pkglibdir)
if HAVE_DTRACE_DASH_G
libndb_la_LIBADD = probes_all.o
libndb_la_DEPENDENCIES = probes_all.o dtrace_files dtrace_providers
mysqld_LDADD += probes_all.o
mysqld_DEPENDENCIES += probes_all.o dtrace_files dtrace_providers
CLEANFILES += dtrace_files dtrace_providers probes_all.o
......@@ -223,7 +220,7 @@ DTRACEDIRS = . ../mysys $(patsubst %,$(top_builddir)/storage/%,@mysql_se_dirs@)
probes_all.o: probes_mysql.d $(DTRACEFILES)
providers=`(for i in $(DTRACEDIRS); do cat $$i/dtrace_providers 2>/dev/null; done) | tr " " "\n" | sort | uniq | sed -e '/^$$/d' -e 's/^/-s /'`; \
objects=`for i in $(DTRACEDIRS); do f=\`cat $$i/dtrace_files 2>/dev/null\`; for j in $$f; do test -f $$i/$$j && echo -n "$$i/$$j "; done; done`; \
objects=`for i in $(DTRACEDIRS); do f=\`cat $$i/dtrace_files 2>/dev/null\`; for j in $$f; do test -f $$i/$$j && echo -n "$$i/$$j " | sed -e 's/echo -n//g'; done; done`; \
$(DTRACE) $(DTRACEFLAGS) -G $$providers $$objects -o $@
endif
......
......@@ -41,7 +41,14 @@
#include "ha_ndbcluster_tables.h"
#include <mysql/plugin.h>
#include "probes_mysql.h"
/*
Temporarily disabling DTrace for ndb storage engine
*/
#define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
#define MYSQL_INDEX_READ_ROW_DONE(arg0)
#define MYSQL_READ_ROW_START(arg0, arg1, arg2)
#define MYSQL_READ_ROW_DONE(arg0)
/* #include "probes_mysql.h" */
#ifdef ndb_dynamite
#undef assert
......
......@@ -1758,9 +1758,9 @@ void close_connection(THD *thd, uint errcode, bool lock)
net_send_error(thd, errcode, ER(errcode)); /* purecov: inspected */
vio_close(vio); /* vio is freed in delete thd */
}
MYSQL_CONNECTION_DONE((int) errcode, thd->thread_id);
if (lock)
(void) pthread_mutex_unlock(&LOCK_thread_count);
MYSQL_CONNECTION_DONE((int) errcode, thd->thread_id);
DBUG_VOID_RETURN;
}
#endif /* EMBEDDED_LIBRARY */
......
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