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