diff options
Diffstat (limited to 'storage/example/ha_example.cc')
-rw-r--r-- | storage/example/ha_example.cc | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 604722c3c8c..30fc82c82d2 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -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); } |