mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge with mysql-5.5.30 minus few incorrect or not applicable changesets
This commit is contained in:
@ -81,6 +81,31 @@ uint cached_table_definitions(void);
|
||||
uint create_table_def_key(THD *thd, char *key,
|
||||
const TABLE_LIST *table_list,
|
||||
bool tmp_table);
|
||||
|
||||
/**
|
||||
Create a table cache key for non-temporary table.
|
||||
|
||||
@param key Buffer for key (must be at least NAME_LEN*2+2 bytes).
|
||||
@param db Database name.
|
||||
@param table_name Table name.
|
||||
|
||||
@return Length of key.
|
||||
|
||||
@sa create_table_def_key(thd, char *, table_list, bool)
|
||||
*/
|
||||
|
||||
inline uint
|
||||
create_table_def_key(char *key, const char *db, const char *table_name)
|
||||
{
|
||||
/*
|
||||
In theory caller should ensure that both db and table_name are
|
||||
not longer than NAME_LEN bytes. In practice we play safe to avoid
|
||||
buffer overruns.
|
||||
*/
|
||||
return (uint)(strmake(strmake(key, db, NAME_LEN) + 1, table_name,
|
||||
NAME_LEN) - key + 1);
|
||||
}
|
||||
|
||||
TABLE_SHARE *get_table_share(THD *thd, TABLE_LIST *table_list, char *key,
|
||||
uint key_length, uint db_flags, int *error,
|
||||
my_hash_value_type hash_value);
|
||||
@ -158,7 +183,7 @@ thr_lock_type read_lock_type_for_table(THD *thd,
|
||||
TABLE_LIST *table_list);
|
||||
|
||||
my_bool mysql_rm_tmp_tables(void);
|
||||
bool rm_temporary_table(handlerton *base, char *path);
|
||||
bool rm_temporary_table(handlerton *base, const char *path);
|
||||
void close_tables_for_reopen(THD *thd, TABLE_LIST **tables,
|
||||
const MDL_savepoint &start_of_statement_svp);
|
||||
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
|
||||
|
Reference in New Issue
Block a user