summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth_examples/qa_auth_interface.c4
-rw-r--r--plugin/cracklib_password_check/cracklib_password_check.c2
-rw-r--r--plugin/feedback/feedback.cc4
-rw-r--r--plugin/handler_socket/handlersocket/database.cpp6
-rw-r--r--plugin/qc_info/qc_info.cc2
-rw-r--r--plugin/simple_password_check/simple_password_check.c3
6 files changed, 11 insertions, 10 deletions
diff --git a/plugin/auth_examples/qa_auth_interface.c b/plugin/auth_examples/qa_auth_interface.c
index c9bc6c5aae4..b65acb5ea16 100644
--- a/plugin/auth_examples/qa_auth_interface.c
+++ b/plugin/auth_examples/qa_auth_interface.c
@@ -68,7 +68,7 @@ static int qa_auth_interface (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *inf
else if (strcmp(info->user_name, "qa_test_2_user")== 0)
{
/* Overwriting not intended, but with effect on USER() */
- strcpy(info->user_name, "user_name");
+ strcpy((char*) info->user_name, "user_name");
info->user_name_length= 9;
/* Overwriting not intended, effect not visible */
strcpy((char *)info->auth_string, "auth_string");
@@ -107,7 +107,7 @@ static int qa_auth_interface (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *inf
else if (strcmp(info->user_name, "qa_test_5_user")== 0)
{
/* This assignment has no effect.*/
- strcpy(info->user_name, "");
+ strcpy((char*) info->user_name, "");
info->user_name_length= 0;
/* This assignment has no effect.*/
strcpy((char *)info->auth_string, "");
diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c
index 94587a6d659..fedd7bf08f6 100644
--- a/plugin/cracklib_password_check/cracklib_password_check.c
+++ b/plugin/cracklib_password_check/cracklib_password_check.c
@@ -23,7 +23,7 @@
static char *dictionary;
-static int crackme(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
+static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *password)
{
char *user= alloca(username->length + 1);
char *host;
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index 15a280f34bf..8ed6ef64b0c 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -93,8 +93,8 @@ static COND* make_cond(THD *thd, TABLE_LIST *tables, LEX_STRING *filter)
{
Item_cond_or *res= NULL;
Name_resolution_context nrc;
- const char *db= tables->db, *table= tables->alias,
- *field= tables->table->field[0]->field_name;
+ const char *db= tables->db, *table= tables->alias;
+ LEX_CSTRING *field= &tables->table->field[0]->field_name;
CHARSET_INFO *cs= &my_charset_latin1;
if (!filter->str)
diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp
index 4292b826753..2ddff7689ad 100644
--- a/plugin/handler_socket/handlersocket/database.cpp
+++ b/plugin/handler_socket/handlersocket/database.cpp
@@ -1085,8 +1085,8 @@ dbcontext::parse_fields(TABLE *const table, const char *str,
Field **fld = 0;
size_t j = 0;
for (fld = table->field; *fld; ++fld, ++j) {
- DBG_FLD(fprintf(stderr, "f %s\n", (*fld)->field_name));
- string_ref fn((*fld)->field_name, strlen((*fld)->field_name));
+ DBG_FLD(fprintf(stderr, "f %s\n", (*fld)->field_name.str));
+ string_ref fn((*fld)->field_name.str, (*fld)->field_name.length);
if (fn == fldnms[i]) {
break;
}
@@ -1096,7 +1096,7 @@ dbcontext::parse_fields(TABLE *const table, const char *str,
std::string(fldnms[i].begin(), fldnms[i].size()).c_str()));
return false;
}
- DBG_FLD(fprintf(stderr, "FLD %s %zu\n", (*fld)->field_name, j));
+ DBG_FLD(fprintf(stderr, "FLD %s %zu\n", (*fld)->field_name.str, j));
flds.push_back(j);
}
return true;
diff --git a/plugin/qc_info/qc_info.cc b/plugin/qc_info/qc_info.cc
index e36e490dec3..b7d7e6f1f45 100644
--- a/plugin/qc_info/qc_info.cc
+++ b/plugin/qc_info/qc_info.cc
@@ -142,7 +142,7 @@ static int qc_info_fill_table(THD *thd, TABLE_LIST *tables,
size_t flags_length;
const char *key, *db;
size_t key_length, db_length;
- LEX_STRING sql_mode_str;
+ LEX_CSTRING sql_mode_str;
const String *tz;
CHARSET_INFO *cs_client;
CHARSET_INFO *cs_result;
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index 8b460c5ed9d..f1cd5aaf17f 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -23,7 +23,8 @@
static unsigned min_length, min_digits, min_letters, min_others;
-static int validate(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
+static int validate(MYSQL_CONST_LEX_STRING *username,
+ MYSQL_CONST_LEX_STRING *password)
{
unsigned digits=0 , uppers=0 , lowers=0, others=0, length= password->length;
const char *ptr= password->str, *end= ptr + length;