mirror of
https://github.com/MariaDB/server.git
synced 2025-12-12 08:01:43 +03:00
97 lines
3.0 KiB
C
97 lines
3.0 KiB
C
#ifndef HA_INNODB_PROTOTYPES_H
|
|
#define HA_INNODB_PROTOTYPES_H
|
|
|
|
#ifndef UNIV_HOTBACKUP
|
|
|
|
#include "univ.i" /* ulint, uint */
|
|
#include "m_ctype.h" /* CHARSET_INFO */
|
|
|
|
/* Prototypes for global functions in ha_innodb.cc that are called by
|
|
InnoDB's C-code. */
|
|
|
|
/*************************************************************************
|
|
Wrapper around MySQL's copy_and_convert function, see it for
|
|
documentation. */
|
|
|
|
ulint
|
|
innobase_convert_string(
|
|
/*====================*/
|
|
void* to,
|
|
ulint to_length,
|
|
CHARSET_INFO* to_cs,
|
|
const void* from,
|
|
ulint from_length,
|
|
CHARSET_INFO* from_cs,
|
|
uint* errors);
|
|
|
|
/*********************************************************************
|
|
Display an SQL identifier. */
|
|
|
|
void
|
|
innobase_print_identifier(
|
|
/*======================*/
|
|
FILE* f, /* in: output stream */
|
|
trx_t* trx, /* in: transaction */
|
|
ibool table_id,/* in: TRUE=print a table name,
|
|
FALSE=print other identifier */
|
|
const char* name, /* in: name to print */
|
|
ulint namelen);/* in: length of name */
|
|
|
|
/**********************************************************************
|
|
Returns true if the thread is the replication thread on the slave
|
|
server. Used in srv_conc_enter_innodb() to determine if the thread
|
|
should be allowed to enter InnoDB - the replication thread is treated
|
|
differently than other threads. Also used in
|
|
srv_conc_force_exit_innodb(). */
|
|
|
|
ibool
|
|
thd_is_replication_slave_thread(
|
|
/*============================*/
|
|
/* out: true if thd is the replication thread */
|
|
void* thd); /* in: thread handle (THD*) */
|
|
|
|
/**********************************************************************
|
|
Returns true if the transaction this thread is processing has edited
|
|
non-transactional tables. Used by the deadlock detector when deciding
|
|
which transaction to rollback in case of a deadlock - we try to avoid
|
|
rolling back transactions that have edited non-transactional tables. */
|
|
|
|
ibool
|
|
thd_has_edited_nontrans_tables(
|
|
/*===========================*/
|
|
/* out: true if non-transactional tables have
|
|
been edited */
|
|
void* thd); /* in: thread handle (THD*) */
|
|
|
|
/*****************************************************************
|
|
Prints info of a THD object (== user session thread) to the given file. */
|
|
|
|
void
|
|
innobase_mysql_print_thd(
|
|
/*=====================*/
|
|
FILE* f, /* in: output stream */
|
|
void* thd, /* in: pointer to a MySQL THD object */
|
|
uint max_query_len); /* in: max query length to print, or 0 to
|
|
use the default max length */
|
|
|
|
/******************************************************************
|
|
Converts a MySQL type to an InnoDB type. Note that this function returns
|
|
the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1
|
|
VARCHAR and the new true VARCHAR in >= 5.0.3 by the 'prtype'. */
|
|
|
|
ulint
|
|
get_innobase_type_from_mysql_type(
|
|
/*==============================*/
|
|
/* out: DATA_BINARY,
|
|
DATA_VARCHAR, ... */
|
|
ulint* unsigned_flag, /* out: DATA_UNSIGNED if an
|
|
'unsigned type';
|
|
at least ENUM and SET,
|
|
and unsigned integer
|
|
types are 'unsigned types' */
|
|
const void* field) /* in: MySQL Field */
|
|
__attribute__((nonnull));
|
|
|
|
#endif
|
|
#endif
|