MySQL 8.0.31
Source Code Documentation
ha_prototypes.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2006, 2022, 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, or 0 to use the default max
105length */
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, ... */
138 ulint *binary_type,
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 */
336void ib_senderrf(THD *thd, /*!< in/out: session */
337 ib_log_level_t level, /*!< in: warning level */
338 uint32_t code, /*!< MySQL error code */
339 ...); /*!< Args */
340
341extern const char *TROUBLESHOOTING_MSG;
342extern const char *TROUBLESHOOT_DATADICT_MSG;
343extern const char *BUG_REPORT_MSG;
344extern const char *FORCE_RECOVERY_MSG;
345extern const char *ERROR_CREATING_MSG;
346extern const char *OPERATING_SYSTEM_ERROR_MSG;
347extern const char *FOREIGN_KEY_CONSTRAINTS_MSG;
348extern const char *INNODB_PARAMETERS_MSG;
349
350/** Returns the NUL terminated value of glob_hostname.
351 @return pointer to glob_hostname. */
352const char *server_get_hostname();
353
354/** Get the error message format string.
355 @return the format string or 0 if not found. */
356const char *innobase_get_err_msg(int error_code); /*!< in: MySQL error code */
357
358/** Compute the next autoinc value.
359
360 For MySQL replication the autoincrement values can be partitioned among
361 the nodes. The offset is the start or origin of the autoincrement value
362 for a particular node. For n nodes the increment will be n and the offset
363 will be in the interval [1, n]. The formula tries to allocate the next
364 value for a particular node.
365
366 Note: This function is also called with increment set to the number of
367 values we want to reserve for multi-value inserts e.g.,
368
369 INSERT INTO T VALUES(), (), ();
370
371 innobase_next_autoinc() will be called with increment set to 3 where
372 autoinc_lock_mode != TRADITIONAL because we want to reserve 3 values for
373 the multi-value INSERT above.
374 @return the next value */
375[[nodiscard]] ulonglong innobase_next_autoinc(
376 ulonglong current, /*!< in: Current value */
377 ulonglong need, /*!< in: count of values needed */
378 ulonglong step, /*!< in: AUTOINC increment step */
379 ulonglong offset, /*!< in: AUTOINC offset */
380 ulonglong max_value); /*!< in: max value for type */
381
382/**********************************************************************
383Check if the length of the identifier exceeds the maximum allowed.
384The input to this function is an identifier in charset my_charset_filename.
385return true when length of identifier is too long. */
387 const char *id); /* in: identifier to check. it must belong
388 to charset my_charset_filename */
389
390/**********************************************************************
391Converts an identifier from my_charset_filename to UTF-8 charset. */
393 char *to, /* out: converted identifier */
394 const char *from, /* in: identifier to convert */
395 ulint len, /* in: length of 'to', in bytes */
396 uint *errors); /* out: error return */
397
398/**********************************************************************
399Converts an identifier from my_charset_filename to UTF-8 charset. */
401 char *to, /* out: converted identifier */
402 const char *from, /* in: identifier to convert */
403 ulint len); /* in: length of 'to', in bytes */
404
405/**********************************************************************
406Issue a warning that the row is too big. */
407void ib_warn_row_too_big(const dict_table_t *table);
408
409/** InnoDB index push-down condition check defined in ha_innodb.cc
410 @return ICP_NO_MATCH, ICP_MATCH, or ICP_OUT_OF_RANGE */
411
412#include <my_icp.h>
413
414[[nodiscard]] ICP_RESULT innobase_index_cond(
415 ha_innobase *h); /*!< in/out: pointer to ha_innobase */
416
417/** Gets information on the durability property requested by thread.
418 Used when writing either a prepare or commit record to the log
419 buffer.
420 @return the durability property. */
421
422#include <dur_prop.h>
423
425 const THD *thd); /*!< in: thread handle */
426
427/** Update the system variable with the given value of the InnoDB
428buffer pool size.
429@param[in] buf_pool_size given value of buffer pool size.*/
430void innodb_set_buf_pool_size(long long buf_pool_size);
431
432/** Gets the InnoDB transaction handle for a MySQL handler object, creates
433an InnoDB transaction struct if the corresponding MySQL thread struct still
434lacks one.
435@param[in] thd MySQL thd (connection) object
436@return InnoDB transaction handle */
438
439/** Commits a transaction in an InnoDB database.
440@param[in] trx Transaction handle. */
441void innobase_commit_low(trx_t *trx);
442
443/** Return the number of read threads for this session.
444@param[in] thd Session instance, or nullptr to query the global
445 innodb_parallel_read_threads value. */
447
448/** Return the maximum buffer size to use for DDL.
449@param[in] thd Session instance, or nullptr to query the global
450 innodb_parallel_read_threads value.
451@return memory upper limit in bytes. */
452[[nodiscard]] ulong thd_ddl_buffer_size(THD *thd);
453
454/** Whether this is a computed virtual column */
455#define innobase_is_v_fld(field) ((field)->gcol_info && !(field)->stored_in_db)
456
457/** @return the number of DDL threads to use (global/session). */
458[[nodiscard]] size_t thd_ddl_threads(THD *thd) noexcept;
459
460#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_class.h:922
The class defining a handle to an InnoDB table.
Definition: ha_innodb.h:86
constexpr DWORD buf_size
Definition: create_def.cc:227
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:5675
const char * FORCE_RECOVERY_MSG
Definition: ha_innodb.cc:24035
const char * ERROR_CREATING_MSG
Definition: ha_innodb.cc:24039
size_t thd_ddl_threads(THD *thd) noexcept
Definition: ha_innodb.cc:2043
THD * thd_trx_arbitrate(THD *requestor, THD *holder)
Check if the transaction can be rolled back.
Definition: ha_innodb.cc:1807
bool thd_is_query_block(const THD *thd)
Returns true if the thread is executing a SELECT statement.
Definition: ha_innodb.cc:1942
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:1951
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:16895
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:1958
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:1981
int thd_trx_priority(THD *thd)
Definition: ha_innodb.cc:1826
std::chrono::system_clock::time_point thd_start_time(THD *thd)
Get the thread start time.
Definition: ha_innodb.cc:1842
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:23970
uint innobase_convert_to_filename_charset(char *to, const char *from, ulint len)
Definition: ha_innodb.cc:24058
const char * INNODB_PARAMETERS_MSG
Definition: ha_innodb.cc:24051
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:1780
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:19897
const char * OPERATING_SYSTEM_ERROR_MSG
Definition: ha_innodb.cc:24042
const char * TROUBLESHOOT_DATADICT_MSG
Definition: ha_innodb.cc:24028
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:2296
void innobase_casedn_str(char *a)
Makes all characters in a NUL-terminated UTF-8 string lower case.
Definition: ha_innodb.cc:2412
const char * thd_innodb_tmpdir(THD *thd)
Get the value of innodb_tmpdir.
Definition: ha_innodb.cc:1990
ICP_RESULT innobase_index_cond(ha_innobase *h)
InnoDB index push-down condition check defined in ha_innodb.cc.
Definition: ha_innodb.cc:23442
std::chrono::seconds thd_lock_wait_timeout(THD *thd)
Returns the lock wait timeout for the current connection.
Definition: ha_innodb.cc:1975
const char * innobase_get_err_msg(int error_code)
Get the error message format string.
Definition: ha_innodb.cc:2310
const char * TROUBLESHOOTING_MSG
Definition: ha_innodb.cc:24024
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:1935
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:3059
ulint innobase_get_table_cache_size(void)
Get the current setting of the table_cache_size global parameter.
Definition: ha_innodb.cc:2459
const char * server_get_hostname()
Returns the NUL terminated value of glob_hostname.
Definition: ha_innodb.cc:1928
void innobase_casedn_path(char *a)
Makes all characters in a NUL-terminated UTF-8 path string lower case.
Definition: ha_innodb.cc:2418
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:23122
const char * FOREIGN_KEY_CONSTRAINTS_MSG
Definition: ha_innodb.cc:24046
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:24089
const char * BUG_REPORT_MSG
Definition: ha_innodb.cc:24032
enum durability_properties thd_requested_durability(const THD *thd)
Gets information on the durability property requested by thread.
Definition: ha_innodb.cc:1788
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:2558
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:3148
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:2813
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:7735
bool innobase_check_identifier_length(const char *id)
Definition: ha_innodb.cc:2351
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:7875
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:3116
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:8004
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:2319
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:23878
char ** thd_innodb_interpreter(THD *thd)
Obtain the latest command executed by InnoDB Interpreter/Tester module (ib::Tester).
Definition: ha_innodb.cc:23127
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:2466
ulong thd_parallel_read_threads(THD *thd)
Return the number of read threads for this session.
Definition: ha_innodb.cc:2037
ulonglong innobase_next_autoinc(ulonglong current, ulonglong need, ulonglong step, ulonglong offset, ulonglong max_value)
Compute the next autoinc value.
Definition: ha_innodb.cc:2690
const CHARSET_INFO * innobase_get_charset(THD *thd)
Determines the connection character set.
Definition: ha_innodb.cc:2425
bool thd_trx_is_read_only(THD *thd)
Returns true if transaction should be flagged as read-only.
Definition: ha_innodb.cc:1796
uint innobase_convert_to_system_charset(char *to, const char *from, ulint len, uint *errors)
Definition: ha_innodb.cc:24074
int innobase_strcasecmp(const char *a, const char *b)
Compares NUL-terminated UTF-8 strings case insensitively.
Definition: ha_innodb.cc:2372
const char * innobase_get_stmt_unsafe(THD *thd, size_t *length)
Determines the current SQL statement.
Definition: ha_innodb.cc:2436
size_t innobase_get_stmt_safe(THD *thd, char *buf, size_t buflen)
Determines the current SQL statement.
Definition: ha_innodb.cc:2451
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:2403
ulong thd_ddl_buffer_size(THD *thd)
Return the maximum buffer size to use for DDL.
Definition: ha_innodb.cc:2041
bool thd_trx_is_auto_commit(THD *thd)
Check if the transaction is an auto-commit transaction.
Definition: ha_innodb.cc:1833
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:1063
Definition: buf0block_hint.cc:29
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:270
const std::string FILE("FILE")
Definition: commit_order_queue.h:33
enum_column_types
Definition: column.h:52
Definition: os0file.h:85
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
case opt name
Definition: sslopt-case.h:32
Definition: m_ctype.h:382
Data structure for a database table.
Definition: dict0mem.h:1884
Definition: trx0trx.h:680
double seconds()
Definition: task.cc:309
unsigned int uint
Definition: uca-dump.cc:29
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:407