mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Changed database, tablename and alias to be LEX_CSTRING
This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
This commit is contained in:
@ -1813,9 +1813,9 @@ struct Table_scope_and_contents_source_st
|
||||
LEX_CUSTRING tabledef_version;
|
||||
LEX_CSTRING connect_string;
|
||||
LEX_CSTRING comment;
|
||||
LEX_CSTRING alias;
|
||||
const char *password, *tablespace;
|
||||
const char *data_file_name, *index_file_name;
|
||||
const char *alias;
|
||||
ulonglong max_rows,min_rows;
|
||||
ulonglong auto_increment_value;
|
||||
ulong table_options; ///< HA_OPTION_ values
|
||||
@ -4684,7 +4684,7 @@ int ha_create_table(THD *thd, const char *path,
|
||||
const char *db, const char *table_name,
|
||||
HA_CREATE_INFO *create_info, LEX_CUSTRING *frm);
|
||||
int ha_delete_table(THD *thd, handlerton *db_type, const char *path,
|
||||
const char *db, const char *alias, bool generate_warning);
|
||||
const LEX_CSTRING *db, const LEX_CSTRING *alias, bool generate_warning);
|
||||
|
||||
/* statistics and info */
|
||||
bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat);
|
||||
@ -4722,7 +4722,7 @@ public:
|
||||
int ha_discover_table(THD *thd, TABLE_SHARE *share);
|
||||
int ha_discover_table_names(THD *thd, LEX_CSTRING *db, MY_DIR *dirp,
|
||||
Discovered_table_list *result, bool reusable);
|
||||
bool ha_table_exists(THD *thd, const char *db, const char *table_name,
|
||||
bool ha_table_exists(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *table_name,
|
||||
handlerton **hton= 0, bool *is_sequence= 0);
|
||||
#endif
|
||||
|
||||
@ -4773,9 +4773,9 @@ const char *get_canonical_filename(handler *file, const char *path,
|
||||
bool mysql_xa_recover(THD *thd);
|
||||
void commit_checkpoint_notify_ha(handlerton *hton, void *cookie);
|
||||
|
||||
inline const char *table_case_name(HA_CREATE_INFO *info, const char *name)
|
||||
inline const LEX_CSTRING *table_case_name(HA_CREATE_INFO *info, const LEX_CSTRING *name)
|
||||
{
|
||||
return ((lower_case_table_names == 2 && info->alias) ? info->alias : name);
|
||||
return ((lower_case_table_names == 2 && info->alias.str) ? &info->alias : name);
|
||||
}
|
||||
|
||||
typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*);
|
||||
|
Reference in New Issue
Block a user