MySQL 9.0.0
Source Code Documentation
ha_prototypes.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2006, 2024, 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/** Compare two character strings case insensitively according to their
260charset.
261@param[in] cs character set
262@param[in] s1 string 1
263@param[in] s2 string 2
264@return 0 if the two strings are equal */
265int innobase_nocase_compare(const void *cs, const char *s1, const char *s2);
266
267/** Returns true if transaction should be flagged as read-only.
268 @return true if the thd is marked as read-only */
269bool thd_trx_is_read_only(THD *thd); /*!< in/out: thread handle */
270
271/**
272Check if the transaction can be rolled back
273@param[in] requestor Session requesting the lock
274@param[in] holder Session that holds the lock
275@return the session that will be rolled back, null don't care */
276
277THD *thd_trx_arbitrate(THD *requestor, THD *holder);
278
279/**
280@param[in] thd Session to check
281@return the priority */
282
283int thd_trx_priority(THD *thd);
284
285/** Check if the transaction is an auto-commit transaction. true also
286 implies that it is a SELECT (read-only) transaction.
287 @return true if the transaction is an auto commit read-only transaction. */
288bool thd_trx_is_auto_commit(THD *thd); /*!< in: thread handle, or NULL */
289
290/** Get the thread start time.
291 @return the thread start time. */
292std::chrono::system_clock::time_point thd_start_time(
293 THD *thd); /*!< in: thread handle, or NULL */
294
295/** A wrapper function of innobase_convert_name(), convert a table name
296to the MySQL system_charset_info (UTF-8) and quote it if needed.
297@param[out] buf Buffer for converted identifier
298@param[in] buflen Length of buf, in bytes
299@param[in] name Table name to format */
300void innobase_format_name(char *buf, ulint buflen, const char *name);
301
302/** Corresponds to Sql_condition:enum_warning_level. */
309
310/** Use this when the args are first converted to a formatted string and then
311 passed to the format string from messages_to_clients.txt. The error message
312 format must be: "Some string ... %s".
313
314 Push a warning message to the client, it is a wrapper around:
315
316 void push_warning_printf(
317 THD *thd, Sql_condition::enum_warning_level level,
318 uint code, const char *format, ...);
319 */
320void ib_errf(THD *thd, /*!< in/out: session */
321 ib_log_level_t level, /*!< in: warning level */
322 uint32_t code, /*!< MySQL error code */
323 const char *format, /*!< printf format */
324 ...) /*!< Args */
325 MY_ATTRIBUTE((format(printf, 4, 5)));
326
327/** Use this when the args are passed to the format string from
328 messages_to_clients.txt directly as is.
329
330 Push a warning message to the client, it is a wrapper around:
331
332 void push_warning_printf(
333 THD *thd, Sql_condition::enum_warning_level level,
334 uint code, const char *format, ...);
335
336 @param[in,out] thd session
337 @param[in] level warning level
338 @param[in] code MySQL error code
339 @param[in] ... Args */
340void ib_senderrf(THD *thd, ib_log_level_t level, uint32_t code, ...);
341
342namespace ib {
343/** Sends an error to the client about low-level `errno` causing high-level
344 `err` in the specified `context`. It is a helper to be used when a low-level
345 IO operation has failed and set `errno`.
346 @param[in] thd The connection thread to which to send the error
347 @param[in] err The high-level error code in InnoDB caused by low-level errno
348 @param[in] context The human-readable string explaining what was going on */
349inline void send_errno_error(THD *thd, int err, const std::string &context) {
350 ib_senderrf(thd, IB_LOG_LEVEL_ERROR, err, errno, strerror(errno),
351 context.c_str());
352}
353
354/** Sends a warning to the client about low-level `errno` causing high-level
355 `err` in the specified `context`. It is a helper to be used when a low-level
356 IO operation has failed and set `errno`.
357 @param[in] thd The connection thread to which to send the warning
358 @param[in] err The high-level error code in InnoDB caused by low-level errno
359 @param[in] context The human-readable string explaining what was going on */
360inline void send_errno_warn(THD *thd, int err, const std::string &context) {
361 ib_senderrf(thd, IB_LOG_LEVEL_WARN, err, errno, strerror(errno),
362 context.c_str());
363}
364
365} // namespace ib
366
367extern const char *TROUBLESHOOTING_MSG;
368extern const char *TROUBLESHOOT_DATADICT_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_ddl_buffer_size 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:985
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:87
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:5954
const char * FORCE_RECOVERY_MSG
Definition: ha_innodb.cc:24317
const char * ERROR_CREATING_MSG
Definition: ha_innodb.cc:24321
size_t thd_ddl_threads(THD *thd) noexcept
Definition: ha_innodb.cc:2024
THD * thd_trx_arbitrate(THD *requestor, THD *holder)
Check if the transaction can be rolled back.
Definition: ha_innodb.cc:1788
bool thd_is_query_block(const THD *thd)
Returns true if the thread is executing a SELECT statement.
Definition: ha_innodb.cc:1923
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:1932
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:17181
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:1939
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:1962
int thd_trx_priority(THD *thd)
Definition: ha_innodb.cc:1807
std::chrono::system_clock::time_point thd_start_time(THD *thd)
Get the thread start time.
Definition: ha_innodb.cc:1823
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:24255
uint innobase_convert_to_filename_charset(char *to, const char *from, ulint len)
Definition: ha_innodb.cc:24340
const char * INNODB_PARAMETERS_MSG
Definition: ha_innodb.cc:24333
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:1761
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:20182
const char * OPERATING_SYSTEM_ERROR_MSG
Definition: ha_innodb.cc:24324
const char * TROUBLESHOOT_DATADICT_MSG
Definition: ha_innodb.cc:24313
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:2277
void innobase_casedn_str(char *a)
Makes all characters in a NUL-terminated UTF-8 string lower case.
Definition: ha_innodb.cc:2397
const char * thd_innodb_tmpdir(THD *thd)
Get the value of innodb_tmpdir.
Definition: ha_innodb.cc:1971
ICP_RESULT innobase_index_cond(ha_innobase *h)
InnoDB index push-down condition check defined in ha_innodb.cc.
Definition: ha_innodb.cc:23740
std::chrono::seconds thd_lock_wait_timeout(THD *thd)
Returns the lock wait timeout for the current connection.
Definition: ha_innodb.cc:1956
const char * innobase_get_err_msg(int error_code)
Get the error message format string.
Definition: ha_innodb.cc:2295
const char * TROUBLESHOOTING_MSG
Definition: ha_innodb.cc:24309
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:1916
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:3023
ulint innobase_get_table_cache_size(void)
Get the current setting of the table_cache_size global parameter.
Definition: ha_innodb.cc:2444
const char * server_get_hostname()
Returns the NUL terminated value of glob_hostname.
Definition: ha_innodb.cc:1909
void innobase_casedn_path(char *a)
Makes all characters in a NUL-terminated UTF-8 path string lower case.
Definition: ha_innodb.cc:2403
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:23420
const char * FOREIGN_KEY_CONSTRAINTS_MSG
Definition: ha_innodb.cc:24328
ib_log_level_t
Corresponds to Sql_condition:enum_warning_level.
Definition: ha_prototypes.h:303
@ IB_LOG_LEVEL_ERROR
Definition: ha_prototypes.h:306
@ IB_LOG_LEVEL_FATAL
Definition: ha_prototypes.h:307
@ IB_LOG_LEVEL_INFO
Definition: ha_prototypes.h:304
@ IB_LOG_LEVEL_WARN
Definition: ha_prototypes.h:305
void ib_warn_row_too_big(const dict_table_t *table)
Definition: ha_innodb.cc:24371
enum durability_properties thd_requested_durability(const THD *thd)
Gets information on the durability property requested by thread.
Definition: ha_innodb.cc:1769
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:2542
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:3112
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:2777
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:8014
bool innobase_check_identifier_length(const char *id)
Definition: ha_innodb.cc:2336
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:8154
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:3080
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:8284
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:2304
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:24167
char ** thd_innodb_interpreter(THD *thd)
Obtain the latest command executed by InnoDB Interpreter/Tester module (ib::Tester).
Definition: ha_innodb.cc:23425
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:2451
ulong thd_parallel_read_threads(THD *thd)
Return the number of read threads for this session.
Definition: ha_innodb.cc:2018
ulonglong innobase_next_autoinc(ulonglong current, ulonglong need, ulonglong step, ulonglong offset, ulonglong max_value)
Compute the next autoinc value.
Definition: ha_innodb.cc:2660
const CHARSET_INFO * innobase_get_charset(THD *thd)
Determines the connection character set.
Definition: ha_innodb.cc:2410
bool thd_trx_is_read_only(THD *thd)
Returns true if transaction should be flagged as read-only.
Definition: ha_innodb.cc:1777
uint innobase_convert_to_system_charset(char *to, const char *from, ulint len, uint *errors)
Definition: ha_innodb.cc:24356
int innobase_strcasecmp(const char *a, const char *b)
Compares NUL-terminated UTF-8 strings case insensitively.
Definition: ha_innodb.cc:2357
const char * innobase_get_stmt_unsafe(THD *thd, size_t *length)
Determines the current SQL statement.
Definition: ha_innodb.cc:2421
size_t innobase_get_stmt_safe(THD *thd, char *buf, size_t buflen)
Determines the current SQL statement.
Definition: ha_innodb.cc:2436
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:2388
ulong thd_ddl_buffer_size(THD *thd)
Return the maximum buffer size to use for DDL.
Definition: ha_innodb.cc:2022
bool thd_trx_is_auto_commit(THD *thd)
Check if the transaction is an auto-commit transaction.
Definition: ha_innodb.cc:1814
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:1081
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")
Definition: commit_order_queue.h:34
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: ha_prototypes.h:342
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:349
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:360
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:927
case opt name
Definition: sslopt-case.h:29
Definition: m_ctype.h:421
Data structure for a database table.
Definition: dict0mem.h:1909
Definition: trx0trx.h:684
double seconds()
Definition: task.cc:310
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406