mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -223,17 +223,17 @@ public:
|
||||
bool old_row_is_record1);
|
||||
void empty_lists();
|
||||
bool create_lists_needed_for_files(MEM_ROOT *root);
|
||||
bool save_trigger_file(THD *thd, const char *db, const char *table_name);
|
||||
bool save_trigger_file(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *table_name);
|
||||
|
||||
static bool check_n_load(THD *thd, const char *db, const char *table_name,
|
||||
static bool check_n_load(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *table_name,
|
||||
TABLE *table, bool names_only);
|
||||
static bool drop_all_triggers(THD *thd, const char *db,
|
||||
const char *table_name);
|
||||
static bool change_table_name(THD *thd, const char *db,
|
||||
const char *old_alias,
|
||||
const char *old_table,
|
||||
const char *new_db,
|
||||
const char *new_table);
|
||||
static bool drop_all_triggers(THD *thd, const LEX_CSTRING *db,
|
||||
const LEX_CSTRING *table_name);
|
||||
static bool change_table_name(THD *thd, const LEX_CSTRING *db,
|
||||
const LEX_CSTRING *old_alias,
|
||||
const LEX_CSTRING *old_table,
|
||||
const LEX_CSTRING *new_db,
|
||||
const LEX_CSTRING *new_table);
|
||||
void add_trigger(trg_event_type event_type,
|
||||
trg_action_time_type action_time,
|
||||
trigger_order_type ordering_clause,
|
||||
@ -286,15 +286,15 @@ public:
|
||||
|
||||
private:
|
||||
bool prepare_record_accessors(TABLE *table);
|
||||
Trigger *change_table_name_in_trignames(const char *old_db_name,
|
||||
const char *new_db_name,
|
||||
LEX_CSTRING *new_table_name,
|
||||
Trigger *change_table_name_in_trignames(const LEX_CSTRING *old_db_name,
|
||||
const LEX_CSTRING *new_db_name,
|
||||
const LEX_CSTRING *new_table_name,
|
||||
Trigger *trigger);
|
||||
bool change_table_name_in_triggers(THD *thd,
|
||||
const char *old_db_name,
|
||||
const char *new_db_name,
|
||||
LEX_CSTRING *old_table_name,
|
||||
LEX_CSTRING *new_table_name);
|
||||
const LEX_CSTRING *old_db_name,
|
||||
const LEX_CSTRING *new_db_name,
|
||||
const LEX_CSTRING *old_table_name,
|
||||
const LEX_CSTRING *new_table_name);
|
||||
|
||||
bool check_for_broken_triggers()
|
||||
{
|
||||
@ -314,7 +314,7 @@ bool add_table_for_trigger(THD *thd,
|
||||
|
||||
void build_trn_path(THD *thd, const sp_name *trg_name, LEX_STRING *trn_path);
|
||||
|
||||
bool check_trn_exists(const LEX_STRING *trn_path);
|
||||
bool check_trn_exists(const LEX_CSTRING *trn_path);
|
||||
|
||||
bool load_table_name_for_trigger(THD *thd,
|
||||
const sp_name *trg_name,
|
||||
|
Reference in New Issue
Block a user