1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-12179 post-merge fixes.

Fix LEX_STRING -> LEX_CSTRING issues.
This commit is contained in:
Kristian Nielsen
2017-07-03 10:36:09 +02:00
parent 1d91910b94
commit c36620ddc3
6 changed files with 23 additions and 23 deletions

View File

@@ -476,7 +476,7 @@ gtid_check_rpl_slave_state_table(TABLE *table)
that is already in use by the current transaction, if any.
*/
void
rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_STRING *out_tablename)
rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename)
{
struct gtid_pos_table *list, *table_entry, *default_entry;
@@ -589,7 +589,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
Query_tables_list lex_backup;
wait_for_commit* suspended_wfc;
void *hton= NULL;
LEX_STRING gtid_pos_table_name;
LEX_CSTRING gtid_pos_table_name;
DBUG_ENTER("record_gtid");
*out_hton= NULL;
@@ -1287,7 +1287,7 @@ rpl_slave_state::add_gtid_pos_table(rpl_slave_state::gtid_pos_table *entry)
struct rpl_slave_state::gtid_pos_table *
rpl_slave_state::alloc_gtid_pos_table(LEX_STRING *table_name, void *hton,
rpl_slave_state::alloc_gtid_pos_table(LEX_CSTRING *table_name, void *hton,
rpl_slave_state::gtid_pos_table_state state)
{
struct gtid_pos_table *p;

View File

@@ -177,7 +177,7 @@ struct rpl_slave_state
for each GTID row.
*/
void *table_hton;
LEX_STRING table_name;
LEX_CSTRING table_name;
uint8 state;
};
@@ -223,7 +223,7 @@ struct rpl_slave_state
int update(uint32 domain_id, uint32 server_id, uint64 sub_id,
uint64 seq_no, void *hton, rpl_group_info *rgi);
int truncate_state_table(THD *thd);
void select_gtid_pos_table(THD *thd, LEX_STRING *out_tablename);
void select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename);
int record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
bool in_transaction, bool in_statement, void **out_hton);
uint64 next_sub_id(uint32 domain_id);
@@ -247,7 +247,7 @@ struct rpl_slave_state
void set_gtid_pos_tables_list(gtid_pos_table *new_list,
gtid_pos_table *default_entry);
void add_gtid_pos_table(gtid_pos_table *entry);
struct gtid_pos_table *alloc_gtid_pos_table(LEX_STRING *table_name,
struct gtid_pos_table *alloc_gtid_pos_table(LEX_CSTRING *table_name,
void *hton, rpl_slave_state::gtid_pos_table_state state);
void free_gtid_pos_tables(struct gtid_pos_table *list);
};

View File

@@ -1472,7 +1472,7 @@ struct gtid_pos_element { uint64 sub_id; rpl_gtid gtid; void *hton; };
static int
scan_one_gtid_slave_pos_table(THD *thd, HASH *hash, DYNAMIC_ARRAY *array,
LEX_STRING *tablename, void **out_hton)
LEX_CSTRING *tablename, void **out_hton)
{
TABLE_LIST tlist;
TABLE *table;
@@ -1594,10 +1594,10 @@ end:
into HASH.
*/
static int
scan_all_gtid_slave_pos_table(THD *thd, int (*cb)(THD *, LEX_STRING *, void *),
scan_all_gtid_slave_pos_table(THD *thd, int (*cb)(THD *, LEX_CSTRING *, void *),
void *cb_data)
{
static LEX_STRING mysql_db_name= {C_STRING_WITH_LEN("mysql")};
static LEX_CSTRING mysql_db_name= {C_STRING_WITH_LEN("mysql")};
char path[FN_REFLEN];
MY_DIR *dirp;
@@ -1616,7 +1616,7 @@ scan_all_gtid_slave_pos_table(THD *thd, int (*cb)(THD *, LEX_STRING *, void *),
else
{
size_t i;
Dynamic_array<LEX_STRING*> files(dirp->number_of_files);
Dynamic_array<LEX_CSTRING*> files(dirp->number_of_files);
Discovered_table_list tl(thd, &files);
int err;
@@ -1651,7 +1651,7 @@ struct load_gtid_state_cb_data {
};
static int
process_gtid_pos_table(THD *thd, LEX_STRING *table_name, void *hton,
process_gtid_pos_table(THD *thd, LEX_CSTRING *table_name, void *hton,
struct load_gtid_state_cb_data *data)
{
struct rpl_slave_state::gtid_pos_table *p, *entry, **next_ptr;
@@ -1718,7 +1718,7 @@ gtid_pos_auto_create_tables(rpl_slave_state::gtid_pos_table **list_ptr)
{
void *hton= plugin_hton(*auto_engines);
char buf[FN_REFLEN+1];
LEX_STRING table_name;
LEX_CSTRING table_name;
char *p;
rpl_slave_state::gtid_pos_table *entry, **next_ptr;
@@ -1756,7 +1756,7 @@ gtid_pos_auto_create_tables(rpl_slave_state::gtid_pos_table **list_ptr)
static int
load_gtid_state_cb(THD *thd, LEX_STRING *table_name, void *arg)
load_gtid_state_cb(THD *thd, LEX_CSTRING *table_name, void *arg)
{
int err;
load_gtid_state_cb_data *data= static_cast<load_gtid_state_cb_data *>(arg);
@@ -1875,7 +1875,7 @@ end:
static int
find_gtid_pos_tables_cb(THD *thd, LEX_STRING *table_name, void *arg)
find_gtid_pos_tables_cb(THD *thd, LEX_CSTRING *table_name, void *arg)
{
load_gtid_state_cb_data *data= static_cast<load_gtid_state_cb_data *>(arg);
TABLE_LIST tlist;

View File

@@ -1320,12 +1320,12 @@ resolve_engine_list_item(THD *thd, plugin_ref *list, uint32 *idx,
const char *pos, const char *pos_end,
bool error_on_unknown_engine, bool temp_copy)
{
LEX_STRING item_str;
LEX_CSTRING item_str;
plugin_ref ref;
uint32_t i;
THD *thd_or_null = (temp_copy ? thd : NULL);
item_str.str= const_cast<char*>(pos);
item_str.str= pos;
item_str.length= pos_end-pos;
ref= ha_resolve_by_name(thd_or_null, &item_str, false);
if (!ref)
@@ -1494,7 +1494,7 @@ pretty_print_engine_list(THD *thd, plugin_ref *list)
pos= buf;
for (p= list; *p; ++p)
{
LEX_STRING *name;
LEX_CSTRING *name;
size_t remain;
remain= buf + size - pos;

View File

@@ -301,8 +301,8 @@ static const char gtid_pos_table_definition2[]=
*/
static bool
build_gtid_pos_create_query(THD *thd, String *query,
LEX_STRING *table_name,
LEX_STRING *engine_name)
LEX_CSTRING *table_name,
LEX_CSTRING *engine_name)
{
bool err= false;
err|= query->append(gtid_pos_table_definition1);
@@ -314,7 +314,7 @@ build_gtid_pos_create_query(THD *thd, String *query,
static int
gtid_pos_table_creation(THD *thd, plugin_ref engine, LEX_STRING *table_name)
gtid_pos_table_creation(THD *thd, plugin_ref engine, LEX_CSTRING *table_name)
{
int err;
StringBuffer<sizeof(gtid_pos_table_definition1) +
@@ -356,7 +356,7 @@ handle_gtid_pos_auto_create_request(THD *thd, void *hton)
plugin_ref engine= NULL, *auto_engines;
rpl_slave_state::gtid_pos_table *entry;
StringBuffer<FN_REFLEN> loc_table_name;
LEX_STRING table_name;
LEX_CSTRING table_name;
/*
Check that the plugin is still in @@gtid_pos_auto_engines, and lock

View File

@@ -1637,9 +1637,9 @@ public:
{
return (uchar*)pretty_print_engine_list(thd, plugins);
}
uchar *session_value_ptr(THD *thd, const LEX_STRING *base)
uchar *session_value_ptr(THD *thd, const LEX_CSTRING *base)
{ return valptr(thd, session_var(thd, plugin_ref*)); }
uchar *global_value_ptr(THD *thd, const LEX_STRING *base)
uchar *global_value_ptr(THD *thd, const LEX_CSTRING *base)
{ return valptr(thd, global_var(plugin_ref*)); }
uchar *default_value_ptr(THD *thd)
{ return valptr(thd, get_default(thd)); }