Commit 664ce4c5 authored by Sergei Petrunia's avatar Sergei Petrunia

Fix linking: move the inline functions

parent 4106dfe8
......@@ -43,8 +43,6 @@
#include "debug_sync.h" // DEBUG_SYNC
#include "sql_audit.h"
#include "sql_analyze_stmt.h" // tracker in TABLE_IO_WAIT
#ifdef WITH_PARTITION_STORAGE_ENGINE
#include "ha_partition.h"
#endif
......@@ -56,17 +54,6 @@
#include "wsrep_mysqld.h"
#include "wsrep.h"
#define TABLE_IO_WAIT(TRACKER, PSI, OP, INDEX, FLAGS, PAYLOAD) \
{ \
if (unlikely(tracker)) \
tracker->start_tracking(); \
\
MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD); \
\
if (unlikely(tracker)) \
tracker->stop_tracking(); \
}
/*
While we have legacy_db_type, we have this array to
check for dups and to find handlerton from legacy_db_type.
......@@ -2588,28 +2575,6 @@ int handler::ha_close(void)
DBUG_RETURN(close());
}
inline int handler::ha_write_tmp_row(uchar *buf)
{
int error;
MYSQL_INSERT_ROW_START(table_share->db.str, table_share->table_name.str);
increment_statistics(&SSV::ha_tmp_write_count);
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_WRITE_ROW, MAX_KEY, 0,
{ error= write_row(buf); })
MYSQL_INSERT_ROW_DONE(error);
return error;
}
inline int handler::ha_update_tmp_row(const uchar *old_data, uchar *new_data)
{
int error;
MYSQL_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
increment_statistics(&SSV::ha_tmp_update_count);
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_UPDATE_ROW, active_index, 0,
{ error= update_row(old_data, new_data);})
MYSQL_UPDATE_ROW_DONE(error);
return error;
}
int handler::ha_rnd_next(uchar *buf)
{
......
......@@ -34,6 +34,8 @@
#include "sql_array.h" /* Dynamic_array<> */
#include "mdl.h"
#include "sql_analyze_stmt.h" // for Exec_time_tracker
#include <my_compare.h>
#include <ft_global.h>
#include <keycache.h>
......@@ -1571,7 +1573,6 @@ typedef struct {
#define UNDEF_NODEGROUP 65535
class Item;
class Exec_time_tracker;
struct st_table_log_memory_entry;
class partition_info;
......@@ -4206,6 +4207,18 @@ inline const char *table_case_name(HA_CREATE_INFO *info, const char *name)
return ((lower_case_table_names == 2 && info->alias) ? info->alias : name);
}
#define TABLE_IO_WAIT(TRACKER, PSI, OP, INDEX, FLAGS, PAYLOAD) \
{ \
if (unlikely(tracker)) \
tracker->start_tracking(); \
\
MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD); \
\
if (unlikely(tracker)) \
tracker->stop_tracking(); \
}
void print_keydup_error(TABLE *table, KEY *key, const char *msg, myf errflag);
void print_keydup_error(TABLE *table, KEY *key, myf errflag);
#endif
......@@ -5271,6 +5271,29 @@ inline int handler::ha_read_first_row(uchar *buf, uint primary_key)
return error;
}
inline int handler::ha_write_tmp_row(uchar *buf)
{
int error;
MYSQL_INSERT_ROW_START(table_share->db.str, table_share->table_name.str);
increment_statistics(&SSV::ha_tmp_write_count);
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_WRITE_ROW, MAX_KEY, 0,
{ error= write_row(buf); })
MYSQL_INSERT_ROW_DONE(error);
return error;
}
inline int handler::ha_update_tmp_row(const uchar *old_data, uchar *new_data)
{
int error;
MYSQL_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
increment_statistics(&SSV::ha_tmp_update_count);
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_UPDATE_ROW, active_index, 0,
{ error= update_row(old_data, new_data);})
MYSQL_UPDATE_ROW_DONE(error);
return error;
}
extern pthread_attr_t *get_connection_attrib(void);
/**
......
......@@ -14,8 +14,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "sql_analyze_stmt.h"
/*
== EXPLAIN/ANALYZE architecture ==
......
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