MySQL 26.7.0
Source Code Documentation
ha_prototypes.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2006, 2026, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28/** @file include/ha_prototypes.h
29 Prototypes for global functions in ha_innodb.cc that are called by
30 InnoDB C code.
31
32 NOTE: This header is intended to insulate InnoDB from SQL names and functions.
33 Do not include any headers other than univ.i into this unless they are very
34 simple headers.
35 ************************************************************************/
36
37#ifndef HA_INNODB_PROTOTYPES_H
38#define HA_INNODB_PROTOTYPES_H
39
40#include "univ.i"
41
42/* Forward declarations */
43class ha_innobase;
44class THD;
45class MDL_ticket;
46struct CHARSET_INFO;
47struct dict_table_t;
48
49/** Formats the raw data in "data" (in InnoDB on-disk format) that is of
50 type DATA_(CHAR|VARCHAR|MYSQL|VARMYSQL) using "charset_coll" and writes
51 the result to "buf". The result is converted to "system_charset_info".
52 Not more than "buf_size" bytes are written to "buf".
53 The result is always NUL-terminated (provided buf_size > 0) and the
54 number of bytes that were written to "buf" is returned (including the
55 terminating NUL).
56 @return number of bytes that were written */
57ulint innobase_raw_format(const char *data, /*!< in: raw data */
58 ulint data_len, /*!< in: raw data length
59 in bytes */
60 ulint charset_coll, /*!< in: charset collation */
61 char *buf, /*!< out: output buffer */
62 ulint buf_size); /*!< in: output buffer size
63 in bytes */
64
65/** Quote a standard SQL identifier like tablespace, index or column name.
66@param[in] file output stream
67@param[in] trx InnoDB transaction, or NULL
68@param[in] id identifier to quote */
69void innobase_quote_identifier(FILE *file, trx_t *trx, const char *id);
70
71/** Quote an standard SQL identifier like tablespace, index or column name.
72Return the string as an std:string object.
73@param[in] trx InnoDB transaction, or NULL
74@param[in] id identifier to quote
75@return a std::string with id properly quoted. */
76std::string innobase_quote_identifier(trx_t *trx, const char *id);
77
78/** Convert a table name to the MySQL system_charset_info (UTF-8).
79 @return pointer to the end of buf */
81 char *buf, /*!< out: buffer for converted identifier */
82 ulint buflen, /*!< in: length of buf, in bytes */
83 const char *id, /*!< in: table name to convert */
84 ulint idlen, /*!< in: length of id, in bytes */
85 THD *thd); /*!< in: MySQL connection thread, or NULL */
86
87/** Returns true if the thread is the replication thread on the slave
88 server. Used in srv_conc_enter_innodb() to determine if the thread
89 should be allowed to enter InnoDB - the replication thread is treated
90 differently than other threads. Also used in
91 srv_conc_force_exit_innodb().
92 @return true if thd is the replication thread */
93bool thd_is_replication_slave_thread(THD *thd); /*!< in: thread handle */
94
95/** Returns true if the transaction this thread is processing has edited
96 non-transactional tables. Used by the deadlock detector when deciding
97 which transaction to rollback in case of a deadlock - we try to avoid
98 rolling back transactions that have edited non-transactional tables.
99 @return true if non-transactional tables have been edited */
100bool thd_has_edited_nontrans_tables(THD *thd); /*!< in: thread handle */
101
102/** Prints info of a THD object (== user session thread) to the given file.
103@param[in] f Output stream
104@param[in] thd Pointer to a mysql thd object
105@param[in] max_query_len Max query length to print, must be positive */
106void innobase_mysql_print_thd(FILE *f, THD *thd, uint max_query_len);
107
108/** Converts a MySQL type to an InnoDB type. Note that this function returns
109the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1
110VARCHAR and the new true VARCHAR in >= 5.0.3 by the 'prtype'.
111@param[out] unsigned_flag DATA_UNSIGNED if an 'unsigned type';
112at least ENUM and SET, and unsigned integer types are 'unsigned types'
113@param[in] f MySQL Field
114@return DATA_BINARY, DATA_VARCHAR, ... */
115ulint get_innobase_type_from_mysql_type(ulint *unsigned_flag, const void *f);
116
117#include <sql/dd/types/column.h>
118/** Converts a MySQL data-dictionary type to an InnoDB type. Also returns
119a few attributes which are useful for precise type calculation.
120
121@note This function is version of get_innobase_type_from_mysql_type() with
122added knowledge about how additional attributes calculated (e.g. in
123create_table_info_t::create_table_def()) and about behavior of Field
124class and its descendats.
125
126@note It allows to get InnoDB generic and precise types directly from MySQL
127data-dictionary info, bypassing expensive construction of Field objects.
128
129@param[out] unsigned_flag DATA_UNSIGNED if an 'unsigned type'.
130@param[out] binary_type DATA_BINARY_TYPE if a 'binary type'.
131@param[out] charset_no Collation id for string types.
132@param[in] dd_type MySQL data-dictionary type.
133@param[in] field_charset Charset.
134@param[in] is_unsigned MySQL data-dictionary unsigned flag.
135
136@return DATA_BINARY, DATA_VARCHAR, ... */
139 ulint *charset_no,
140 dd::enum_column_types dd_type,
141 const CHARSET_INFO *field_charset,
142 bool is_unsigned);
143
144/** Get the variable length bounds of the given character set.
145@param[in] cset Mysql charset-collation code
146@param[out] mbminlen Minimum length of a char (in bytes)
147@param[out] mbmaxlen Maximum length of a char (in bytes) */
148void innobase_get_cset_width(ulint cset, ulint *mbminlen, ulint *mbmaxlen);
149
150/** Compares NUL-terminated UTF-8 strings case insensitively.
151 @return 0 if a=b, < 0 if a < b, > 1 if a > b */
152int innobase_strcasecmp(const char *a, /*!< in: first string to compare */
153 const char *b); /*!< in: second string to compare */
154
155/** Strip dir name from a full path name and return only the file name
156@param[in] path_name full path name
157@return file name or "null" if no file name */
158const char *innobase_basename(const char *path_name);
159
160/** Returns true if the thread is executing a SELECT statement.
161 @return true if thd is executing SELECT */
162bool thd_is_query_block(const THD *thd); /*!< in: thread handle */
163
164/** Makes all characters in a NUL-terminated UTF-8 string lower case. */
165void innobase_casedn_str(char *a); /*!< in/out: string to put in lower case */
166
167/** Makes all characters in a NUL-terminated UTF-8 path string lower case. */
168void innobase_casedn_path(char *a); /*!< in/out: string to put in lower case */
169
170/** Determines the connection character set.
171 @return connection character set */
173 THD *thd); /*!< in: MySQL thread handle */
174
175/** Determines the current SQL statement.
176Thread unsafe, can only be called from the thread owning the THD.
177@param[in] thd MySQL thread handle
178@param[out] length Length of the SQL statement
179@return SQL statement string */
180const char *innobase_get_stmt_unsafe(THD *thd, size_t *length);
181
182/** Determines the current SQL statement.
183Thread safe, can be called from any thread as the string is copied
184into the provided buffer.
185@param[in] thd MySQL thread handle
186@param[out] buf Buffer containing SQL statement
187@param[in] buflen Length of provided buffer
188@return Length of the SQL statement */
189size_t innobase_get_stmt_safe(THD *thd, char *buf, size_t buflen);
190
191/** This function is used to find the storage length in bytes of the first n
192 characters for prefix indexes using a multibyte character set. The function
193 finds charset information and returns length of prefix_len characters in the
194 index field in bytes.
195 @return number of bytes occupied by the first n characters */
197 ulint charset_id, /*!< in: character set id */
198 ulint prefix_len, /*!< in: prefix length in bytes of the index
199 (this has to be divided by mbmaxlen to get the
200 number of CHARACTERS n in the prefix) */
201 ulint data_len, /*!< in: length of the string in bytes */
202 const char *str); /*!< in: character string */
203
204/** Checks sys_vars and determines if allocator should mark
205large memory segments with MADV_DONTDUMP
206@return true iff @@global.core_file AND
207NOT @@global.innodb_buffer_pool_in_core_file */
209
210/** Make sure that core file will not be generated, as generating a core file
211might violate our promise to not dump buffer pool data, and/or might dump not
212the expected memory pages due to failure in using madvise */
214
215/** Returns the lock wait timeout for the current connection.
216 @return the lock wait timeout */
218 THD *thd); /*!< in: thread handle, or NULL to query
219the global innodb_lock_wait_timeout */
220
221/** Set the time waited for the lock for the current query.
222@param[in,out] thd Thread handle.
223@param[in] value Time waited for the lock. */
225 std::chrono::steady_clock::duration value);
226
227/** Get the value of innodb_tmpdir.
228@param[in] thd thread handle, or nullptr to query the global innodb_tmpdir.
229@return nullptr if innodb_tmpdir="" */
230const char *thd_innodb_tmpdir(THD *thd);
231
232#ifdef UNIV_DEBUG
233/** Obtain the value of the latest output from InnoDB Interpreter/Tester
234module (ib::Tester).
235@param[in] thd thread handle
236@return pointer to the output string. */
238
239/** Obtain the latest command executed by InnoDB Interpreter/Tester
240module (ib::Tester).
241@param[in] thd thread handle
242@return pointer to the output string. */
243char **thd_innodb_interpreter(THD *thd);
244#endif /* UNIV_DEBUG */
245
246/** Get the current setting of the table_cache_size global parameter. We do
247 a dirty read because for one there is no synchronization object and
248 secondly there is little harm in doing so even if we get a torn read.
249 @return SQL statement string */
251
252/** Get the current setting of the lower_case_table_names global parameter from
253 mysqld.cc. We do a dirty read because for one there is no synchronization
254 object and secondly there is little harm in doing so even if we get a torn
255 read.
256 @return value of lower_case_table_names */
258
259/** Returns true if transaction should be flagged as read-only.
260 @return true if the thd is marked as read-only */
261bool thd_trx_is_read_only(THD *thd); /*!< in/out: thread handle */
262
263/**
264Check if the transaction can be rolled back
265@param[in] requestor Session requesting the lock
266@param[in] holder Session that holds the lock
267@return the session that will be rolled back, null don't care */
268
269THD *thd_trx_arbitrate(THD *requestor, THD *holder);
270
271/**
272@param[in] thd Session to check
273@return the priority */
274
275int thd_trx_priority(THD *thd);
276
277/** Check if the transaction is an auto-commit transaction. true also
278 implies that it is a SELECT (read-only) transaction.
279 @return true if the transaction is an auto commit read-only transaction. */
280bool thd_trx_is_auto_commit(THD *thd); /*!< in: thread handle, or NULL */
281
282/** Get the thread start time.
283 @return the thread start time. */
284std::chrono::system_clock::time_point thd_start_time(
285 THD *thd); /*!< in: thread handle, or NULL */
286
287/** A wrapper function of innobase_convert_name(), convert a table name
288to the MySQL system_charset_info (UTF-8) and quote it if needed.
289@param[out] buf Buffer for converted identifier
290@param[in] buflen Length of buf, in bytes
291@param[in] name Table name to format */
292void innobase_format_name(char *buf, ulint buflen, const char *name);
293
294/** Corresponds to Sql_condition:enum_warning_level. */
301
302/** Use this when the args are first converted to a formatted string and then
303 passed to the format string from messages_to_clients.txt. The error message
304 format must be: "Some string ... %s".
305
306 Push a warning message to the client, it is a wrapper around:
307
308 void push_warning_printf(
309 THD *thd, Sql_condition::enum_warning_level level,
310 uint code, const char *format, ...);
311 */
312void ib_errf(THD *thd, /*!< in/out: session */
313 ib_log_level_t level, /*!< in: warning level */
314 uint32_t code, /*!< MySQL error code */
315 const char *format, /*!< printf format */
316 ...) /*!< Args */
317 MY_ATTRIBUTE((format(printf, 4, 5)));
318
319/** Use this when the args are passed to the format string from
320 messages_to_clients.txt directly as is.
321
322 Push a warning message to the client, it is a wrapper around:
323
324 void push_warning_printf(
325 THD *thd, Sql_condition::enum_warning_level level,
326 uint code, const char *format, ...);
327
328 @param[in,out] thd session
329 @param[in] level warning level
330 @param[in] code MySQL error code
331 @param[in] ... Args */
332void ib_senderrf(THD *thd, ib_log_level_t level, uint32_t code, ...);
333
334namespace ib {
335/** Sends an error to the client about low-level `errno` causing high-level
336 `err` in the specified `context`. It is a helper to be used when a low-level
337 IO operation has failed and set `errno`.
338 @param[in] thd The connection thread to which to send the error
339 @param[in] err The high-level error code in InnoDB caused by low-level errno
340 @param[in] context The human-readable string explaining what was going on */
341inline void send_errno_error(THD *thd, int err, const std::string &context) {
342 ib_senderrf(thd, IB_LOG_LEVEL_ERROR, err, errno, strerror(errno),
343 context.c_str());
344}
345
346/** Sends a warning to the client about low-level `errno` causing high-level
347 `err` in the specified `context`. It is a helper to be used when a low-level
348 IO operation has failed and set `errno`.
349 @param[in] thd The connection thread to which to send the warning
350 @param[in] err The high-level error code in InnoDB caused by low-level errno
351 @param[in] context The human-readable string explaining what was going on */
352inline void send_errno_warn(THD *thd, int err, const std::string &context) {
353 ib_senderrf(thd, IB_LOG_LEVEL_WARN, err, errno, strerror(errno),
354 context.c_str());
355}
356
357} // namespace ib
358
359extern const char *TROUBLESHOOTING_MSG;
360extern const char *TROUBLESHOOT_DATADICT_URL;
361extern const char *TROUBLESHOOT_DATADICT_MSG;
362extern const char *FORCE_RECOVERY_MSG;
363extern const char *ERROR_CREATING_MSG;
364extern const char *OPERATING_SYSTEM_ERROR_MSG;
365extern const char *FOREIGN_KEY_CONSTRAINTS_MSG;
366extern const char *INNODB_PARAMETERS_MSG;
367
368/** Returns the NUL terminated value of glob_hostname.
369 @return pointer to glob_hostname. */
370const char *server_get_hostname();
371
372/** Get the error message format string.
373 @return the format string or 0 if not found. */
374const char *innobase_get_err_msg(int error_code); /*!< in: MySQL error code */
375
376/** Compute the next autoinc value.
377
378 For MySQL replication the autoincrement values can be partitioned among
379 the nodes. The offset is the start or origin of the autoincrement value
380 for a particular node. For n nodes the increment will be n and the offset
381 will be in the interval [1, n]. The formula tries to allocate the next
382 value for a particular node.
383
384 Note: This function is also called with increment set to the number of
385 values we want to reserve for multi-value inserts e.g.,
386
387 INSERT INTO T VALUES(), (), ();
388
389 innobase_next_autoinc() will be called with increment set to 3 where
390 autoinc_lock_mode != TRADITIONAL because we want to reserve 3 values for
391 the multi-value INSERT above.
392 @return the next value */
393[[nodiscard]] ulonglong innobase_next_autoinc(
394 ulonglong current, /*!< in: Current value */
395 ulonglong need, /*!< in: count of values needed */
396 ulonglong step, /*!< in: AUTOINC increment step */
397 ulonglong offset, /*!< in: AUTOINC offset */
398 ulonglong max_value); /*!< in: max value for type */
399
400/**********************************************************************
401Check if the length of the identifier exceeds the maximum allowed.
402The input to this function is an identifier in charset my_charset_filename.
403return true when length of identifier is too long. */
405 const char *id); /* in: identifier to check. it must belong
406 to charset my_charset_filename */
407
408/**********************************************************************
409Converts an identifier from my_charset_filename to UTF-8 charset. */
411 char *to, /* out: converted identifier */
412 const char *from, /* in: identifier to convert */
413 ulint len, /* in: length of 'to', in bytes */
414 uint *errors); /* out: error return */
415
416/**********************************************************************
417Converts an identifier from my_charset_filename to UTF-8 charset. */
419 char *to, /* out: converted identifier */
420 const char *from, /* in: identifier to convert */
421 ulint len); /* in: length of 'to', in bytes */
422
423/**********************************************************************
424Issue a warning that the row is too big. */
426
427/** InnoDB index push-down condition check defined in ha_innodb.cc
428 @return ICP_NO_MATCH, ICP_MATCH, or ICP_OUT_OF_RANGE */
429
430#include <my_icp.h>
431
432[[nodiscard]] ICP_RESULT innobase_index_cond(
433 ha_innobase *h); /*!< in/out: pointer to ha_innobase */
434
435/** Gets information on the durability property requested by thread.
436 Used when writing either a prepare or commit record to the log
437 buffer.
438 @return the durability property. */
439
440#include <dur_prop.h>
441
443 const THD *thd); /*!< in: thread handle */
444
445/** Update the system variable with the given value of the InnoDB
446buffer pool size.
447@param[in] buf_pool_size given value of buffer pool size.*/
448void innodb_set_buf_pool_size(long long buf_pool_size);
449
450/** Gets the InnoDB transaction handle for a MySQL handler object, creates
451an InnoDB transaction struct if the corresponding MySQL thread struct still
452lacks one.
453@param[in] thd MySQL thd (connection) object
454@return InnoDB transaction handle */
456
457/** Commits a transaction in an InnoDB database.
458@param[in] trx Transaction handle. */
459void innobase_commit_low(trx_t *trx);
460
461/** Return the number of read threads for this session.
462@param[in] thd Session instance, or nullptr to query the global
463 innodb_parallel_read_threads value. */
465
466/** Return the maximum buffer size to use for DDL.
467@param[in] thd Session instance, or nullptr to query the global
468 innodb_ddl_buffer_size value.
469@return memory upper limit in bytes. */
470[[nodiscard]] ulong thd_ddl_buffer_size(THD *thd);
471
472/** Whether this is a computed virtual column */
473#define innobase_is_v_fld(field) ((field)->gcol_info && !(field)->stored_in_db)
474
475/** @return the number of DDL threads to use (global/session). */
476[[nodiscard]] size_t thd_ddl_threads(THD *thd) noexcept;
477
478#endif /* HA_INNODB_PROTOTYPES_H */
A granted metadata lock.
Definition: mdl.h:988
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
The class defining a handle to an InnoDB table.
Definition: ha_innodb.h:94
static constexpr uint16_t binary_type()
Definition: classic_query_param.cc:36
constexpr DWORD buf_size
Definition: create_def.cc:229
durability_properties
Definition: dur_prop.h:31
void innobase_commit_low(trx_t *trx)
Commits a transaction in an InnoDB database.
Definition: ha_innodb.cc:5930
const char * FORCE_RECOVERY_MSG
Definition: ha_innodb.cc:24528
const char * ERROR_CREATING_MSG
Definition: ha_innodb.cc:24532
size_t thd_ddl_threads(THD *thd) noexcept
Definition: ha_innodb.cc:2058
THD * thd_trx_arbitrate(THD *requestor, THD *holder)
Check if the transaction can be rolled back.
Definition: ha_innodb.cc:1822
bool thd_is_query_block(const THD *thd)
Returns true if the thread is executing a SELECT statement.
Definition: ha_innodb.cc:1957
bool innobase_should_madvise_buf_pool()
Checks sys_vars and determines if allocator should mark large memory segments with MADV_DONTDUMP.
Definition: ha_innodb.cc:1966
void innodb_set_buf_pool_size(long long buf_pool_size)
Update the system variable with the given value of the InnoDB buffer pool size.
Definition: ha_innodb.cc:17219
void innobase_disable_core_dump()
Make sure that core file will not be generated, as generating a core file might violate our promise t...
Definition: ha_innodb.cc:1973
void thd_set_lock_wait_time(THD *thd, std::chrono::steady_clock::duration value)
Set the time waited for the lock for the current query.
Definition: ha_innodb.cc:1996
int thd_trx_priority(THD *thd)
Definition: ha_innodb.cc:1841
std::chrono::system_clock::time_point thd_start_time(THD *thd)
Get the thread start time.
Definition: ha_innodb.cc:1857
void ib_errf(THD *thd, ib_log_level_t level, uint32_t code, const char *format,...)
Use this when the args are first converted to a formatted string and then passed to the format string...
Definition: ha_innodb.cc:24463
uint innobase_convert_to_filename_charset(char *to, const char *from, ulint len)
Definition: ha_innodb.cc:24551
const char * INNODB_PARAMETERS_MSG
Definition: ha_innodb.cc:24544
bool thd_is_replication_slave_thread(THD *thd)
Returns true if the thread is the replication thread on the slave server.
Definition: ha_innodb.cc:1795
ulint innobase_get_at_most_n_mbchars(ulint charset_id, ulint prefix_len, ulint data_len, const char *str)
This function is used to find the storage length in bytes of the first n characters for prefix indexe...
Definition: ha_innodb.cc:20261
const char * OPERATING_SYSTEM_ERROR_MSG
Definition: ha_innodb.cc:24535
const char * TROUBLESHOOT_DATADICT_MSG
Definition: ha_innodb.cc:24524
void innobase_mysql_print_thd(FILE *f, THD *thd, uint max_query_len)
Prints info of a THD object (== user session thread) to the given file.
Definition: ha_innodb.cc:2311
void innobase_casedn_str(char *a)
Makes all characters in a NUL-terminated UTF-8 string lower case.
Definition: ha_innodb.cc:2431
const char * thd_innodb_tmpdir(THD *thd)
Get the value of innodb_tmpdir.
Definition: ha_innodb.cc:2005
ICP_RESULT innobase_index_cond(ha_innobase *h)
InnoDB index push-down condition check defined in ha_innodb.cc.
Definition: ha_innodb.cc:23830
std::chrono::seconds thd_lock_wait_timeout(THD *thd)
Returns the lock wait timeout for the current connection.
Definition: ha_innodb.cc:1990
const char * innobase_get_err_msg(int error_code)
Get the error message format string.
Definition: ha_innodb.cc:2329
const char * TROUBLESHOOTING_MSG
Definition: ha_innodb.cc:24517
bool thd_has_edited_nontrans_tables(THD *thd)
Returns true if the transaction this thread is processing has edited non-transactional tables.
Definition: ha_innodb.cc:1950
void innobase_quote_identifier(FILE *file, trx_t *trx, const char *id)
Quote a standard SQL identifier like tablespace, index or column name.
Definition: ha_innodb.cc:3057
ulint innobase_get_table_cache_size(void)
Get the current setting of the table_cache_size global parameter.
Definition: ha_innodb.cc:2478
const char * server_get_hostname()
Returns the NUL terminated value of glob_hostname.
Definition: ha_innodb.cc:1943
void innobase_casedn_path(char *a)
Makes all characters in a NUL-terminated UTF-8 path string lower case.
Definition: ha_innodb.cc:2437
char ** thd_innodb_interpreter_output(THD *thd)
Obtain the value of the latest output from InnoDB Interpreter/Tester module (ib::Tester).
Definition: ha_innodb.cc:23513
const char * FOREIGN_KEY_CONSTRAINTS_MSG
Definition: ha_innodb.cc:24539
ib_log_level_t
Corresponds to Sql_condition:enum_warning_level.
Definition: ha_prototypes.h:295
@ IB_LOG_LEVEL_ERROR
Definition: ha_prototypes.h:298
@ IB_LOG_LEVEL_FATAL
Definition: ha_prototypes.h:299
@ IB_LOG_LEVEL_INFO
Definition: ha_prototypes.h:296
@ IB_LOG_LEVEL_WARN
Definition: ha_prototypes.h:297
void ib_warn_row_too_big(const dict_table_t *table)
Definition: ha_innodb.cc:24582
enum durability_properties thd_requested_durability(const THD *thd)
Gets information on the durability property requested by thread.
Definition: ha_innodb.cc:1803
ulint innobase_raw_format(const char *data, ulint data_len, ulint charset_coll, char *buf, ulint buf_size)
Formats the raw data in "data" (in InnoDB on-disk format) that is of type DATA_(CHAR|VARCHAR|MYSQL|VA...
Definition: ha_innodb.cc:2576
void innobase_format_name(char *buf, ulint buflen, const char *name)
A wrapper function of innobase_convert_name(), convert a table name to the MySQL system_charset_info ...
Definition: ha_innodb.cc:3146
trx_t * check_trx_exists(THD *thd)
Gets the InnoDB transaction handle for a MySQL handler object, creates an InnoDB transaction struct i...
Definition: ha_innodb.cc:2811
bool innobase_check_identifier_length(const char *id)
Definition: ha_innodb.cc:2370
ulint get_innobase_type_from_mysql_type(ulint *unsigned_flag, const void *f)
Converts a MySQL type to an InnoDB type.
Definition: ha_innodb.cc:8165
char * innobase_convert_name(char *buf, ulint buflen, const char *id, ulint idlen, THD *thd)
Convert a table name to the MySQL system_charset_info (UTF-8).
Definition: ha_innodb.cc:3114
ulint get_innobase_type_from_mysql_dd_type(ulint *unsigned_flag, ulint *binary_type, ulint *charset_no, dd::enum_column_types dd_type, const CHARSET_INFO *field_charset, bool is_unsigned)
Converts a MySQL data-dictionary type to an InnoDB type.
Definition: ha_innodb.cc:8295
void innobase_get_cset_width(ulint cset, ulint *mbminlen, ulint *mbmaxlen)
Get the variable length bounds of the given character set.
Definition: ha_innodb.cc:2338
void ib_senderrf(THD *thd, ib_log_level_t level, uint32_t code,...)
Use this when the args are passed to the format string from messages_to_clients.txt directly as is.
Definition: ha_innodb.cc:24375
char ** thd_innodb_interpreter(THD *thd)
Obtain the latest command executed by InnoDB Interpreter/Tester module (ib::Tester).
Definition: ha_innodb.cc:23518
ulint innobase_get_lower_case_table_names(void)
Get the current setting of the lower_case_table_names global parameter from mysqld....
Definition: ha_innodb.cc:2485
const char * TROUBLESHOOT_DATADICT_URL
Definition: ha_innodb.cc:24523
ulong thd_parallel_read_threads(THD *thd)
Return the number of read threads for this session.
Definition: ha_innodb.cc:2052
ulonglong innobase_next_autoinc(ulonglong current, ulonglong need, ulonglong step, ulonglong offset, ulonglong max_value)
Compute the next autoinc value.
Definition: ha_innodb.cc:2694
const CHARSET_INFO * innobase_get_charset(THD *thd)
Determines the connection character set.
Definition: ha_innodb.cc:2444
bool thd_trx_is_read_only(THD *thd)
Returns true if transaction should be flagged as read-only.
Definition: ha_innodb.cc:1811
uint innobase_convert_to_system_charset(char *to, const char *from, ulint len, uint *errors)
Definition: ha_innodb.cc:24567
int innobase_strcasecmp(const char *a, const char *b)
Compares NUL-terminated UTF-8 strings case insensitively.
Definition: ha_innodb.cc:2391
const char * innobase_get_stmt_unsafe(THD *thd, size_t *length)
Determines the current SQL statement.
Definition: ha_innodb.cc:2455
size_t innobase_get_stmt_safe(THD *thd, char *buf, size_t buflen)
Determines the current SQL statement.
Definition: ha_innodb.cc:2470
const char * innobase_basename(const char *path_name)
Strip dir name from a full path name and return only the file name.
Definition: ha_innodb.cc:2422
ulong thd_ddl_buffer_size(THD *thd)
Return the maximum buffer size to use for DDL.
Definition: ha_innodb.cc:2056
bool thd_trx_is_auto_commit(THD *thd)
Check if the transaction is an auto-commit transaction.
Definition: ha_innodb.cc:1848
enum icp_result ICP_RESULT
Values returned by index_cond_func_xxx functions.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1077
std::string format(const routing_guidelines::Session_info &session_info, bool extended_session_info)
Definition: dest_metadata_cache.cc:170
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:273
const std::string FILE("FILE")
enum_column_types
Definition: column.h:53
Definition: os0file.h:89
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: fil0fil.cc:1392
void send_errno_error(THD *thd, int err, const std::string &context)
Sends an error to the client about low-level errno causing high-level err in the specified context.
Definition: ha_prototypes.h:341
void send_errno_warn(THD *thd, int err, const std::string &context)
Sends a warning to the client about low-level errno causing high-level err in the specified context.
Definition: ha_prototypes.h:352
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:943
std::chrono::seconds seconds
Definition: authorize_manager.cc:70
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
case opt name
Definition: sslopt-case.h:29
Definition: m_ctype.h:421
Data structure for a database table.
Definition: dict0mem.h:1927
Definition: trx0trx.h:670
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:403