1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Backport of DTrace patches from 6.0

This commit is contained in:
Mikael Ronstrom
2008-12-20 11:01:41 +01:00
parent 8d162b444a
commit 16a024c486
46 changed files with 1521 additions and 74 deletions

View File

@ -48,5 +48,22 @@ libexample_a_SOURCES= ha_example.cc
EXTRA_DIST = CMakeLists.txt plug.in
if HAVE_DTRACE_DASH_G
libexample_a_LIBADD = probes_mysql.o
libexample_a_DEPENDENCIES = probes_mysql.o
CLEANFILES =
BUILT_SOURCES =
DTRACEFILES = libexample_a-ha_example.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
dtrace_providers:
echo $(DTRACEPROVIDER) > $@
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES) -o $@
endif
# Don't update the files from bitkeeper
%::SCCS/s.%

View File

@ -94,6 +94,7 @@
#define MYSQL_SERVER 1
#include "mysql_priv.h"
#include "ha_example.h"
#include "probes_mysql.h"
#include <mysql/plugin.h>
static handler *example_create_handler(handlerton *hton,
@ -428,8 +429,12 @@ int ha_example::index_read_map(uchar *buf, const uchar *key,
enum ha_rkey_function find_flag
__attribute__((unused)))
{
int rc;
DBUG_ENTER("ha_example::index_read");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
MYSQL_INDEX_READ_ROW_START(table_share->db.str, table_share->table_name.str);
rc= HA_ERR_WRONG_COMMAND;
MYSQL_INDEX_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}
@ -440,8 +445,12 @@ int ha_example::index_read_map(uchar *buf, const uchar *key,
int ha_example::index_next(uchar *buf)
{
int rc;
DBUG_ENTER("ha_example::index_next");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
MYSQL_INDEX_READ_ROW_START(table_share->db.str, table_share->table_name.str);
rc= HA_ERR_WRONG_COMMAND;
MYSQL_INDEX_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}
@ -452,8 +461,12 @@ int ha_example::index_next(uchar *buf)
int ha_example::index_prev(uchar *buf)
{
int rc;
DBUG_ENTER("ha_example::index_prev");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
MYSQL_INDEX_READ_ROW_START(table_share->db.str, table_share->table_name.str);
rc= HA_ERR_WRONG_COMMAND;
MYSQL_INDEX_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}
@ -469,8 +482,12 @@ int ha_example::index_prev(uchar *buf)
*/
int ha_example::index_first(uchar *buf)
{
int rc;
DBUG_ENTER("ha_example::index_first");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
MYSQL_INDEX_READ_ROW_START(table_share->db.str, table_share->table_name.str);
rc= HA_ERR_WRONG_COMMAND;
MYSQL_INDEX_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}
@ -486,8 +503,12 @@ int ha_example::index_first(uchar *buf)
*/
int ha_example::index_last(uchar *buf)
{
int rc;
DBUG_ENTER("ha_example::index_last");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
MYSQL_INDEX_READ_ROW_START(table_share->db.str, table_share->table_name.str);
rc= HA_ERR_WRONG_COMMAND;
MYSQL_INDEX_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}
@ -533,8 +554,13 @@ int ha_example::rnd_end()
*/
int ha_example::rnd_next(uchar *buf)
{
int rc;
DBUG_ENTER("ha_example::rnd_next");
DBUG_RETURN(HA_ERR_END_OF_FILE);
MYSQL_READ_ROW_START(table_share->db.str, table_share->table_name.str,
TRUE);
rc= HA_ERR_END_OF_FILE;
MYSQL_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}
@ -581,8 +607,13 @@ void ha_example::position(const uchar *record)
*/
int ha_example::rnd_pos(uchar *buf, uchar *pos)
{
int rc;
DBUG_ENTER("ha_example::rnd_pos");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
MYSQL_READ_ROW_START(table_share->db.str, table_share->table_name.str,
TRUE);
rc= HA_ERR_WRONG_COMMAND;
MYSQL_READ_ROW_DONE(rc);
DBUG_RETURN(rc);
}