[Maria-developers] bzr commit into Mariadb 5.2, with Maria 2.0:maria/5.2 branch (monty:2761)
#At lp:maria/5.2 based on revid:sanja@askmonty.org-20100330123515-4p8q03xccl3d6k59 2761 Michael Widenius 2010-03-31 Fixed some compiler warnings modified: include/m_ctype.h plugin/auth/dialog.c sql/sql_acl.cc storage/pbxt/src/ha_pbxt.cc per-file messages: include/m_ctype.h MY_UNICASE_INFO already includes 'const' plugin/auth/dialog.c Fixed parameters to have correct signed/unsigned type sql/sql_acl.cc old_password_plugin is not used for EMBEDDED_LIBRARY storage/pbxt/src/ha_pbxt.cc Remove not used variable === modified file 'include/m_ctype.h' --- a/include/m_ctype.h 2010-01-06 19:20:16 +0000 +++ b/include/m_ctype.h 2010-03-31 18:37:45 +0000 @@ -291,7 +291,7 @@ struct charset_info_st const uint16 *const *sort_order_big; const uint16 *tab_to_uni; MY_UNI_IDX *tab_from_uni; - const MY_UNICASE_INFO *const *caseinfo; + MY_UNICASE_INFO *const *caseinfo; const uchar *state_map; const uchar *ident_map; uint strxfrm_multiply; === modified file 'plugin/auth/dialog.c' --- a/plugin/auth/dialog.c 2010-03-29 15:13:53 +0000 +++ b/plugin/auth/dialog.c 2010-03-31 18:37:45 +0000 @@ -51,6 +51,8 @@ #define PASSWORD_QUESTION "\4" #define LAST_PASSWORD "\5" +typedef unsigned char uchar; + /********************* SERVER SIDE ****************************************/ /** @@ -63,7 +65,9 @@ static int two_questions(MYSQL_PLUGIN_VI int pkt_len; /* send a password question */ - if (vio->write_packet(vio, PASSWORD_QUESTION "Password, please:", 18)) + if (vio->write_packet(vio, + (const uchar*) (PASSWORD_QUESTION "Password, please:"), + 18)) return CR_ERROR; /* read the answer */ @@ -73,11 +77,12 @@ static int two_questions(MYSQL_PLUGIN_VI info->password_used = 1; /* fail if the password is wrong */ - if (strcmp(pkt, info->auth_string)) + if (strcmp((char*) pkt, info->auth_string)) return CR_ERROR; /* send the last, ordinary, question */ - if (vio->write_packet(vio, LAST_QUESTION "Are you sure ?", 15)) + if (vio->write_packet(vio, + (const uchar*) (LAST_QUESTION "Are you sure ?"), 15)) return CR_ERROR; /* read the answer */ @@ -85,7 +90,7 @@ static int two_questions(MYSQL_PLUGIN_VI return CR_ERROR; /* check the reply */ - return strcmp(pkt, "yes, of course") ? CR_ERROR : CR_OK; + return strcmp((char*) pkt, "yes, of course") ? CR_ERROR : CR_OK; } static struct st_mysql_auth two_handler= @@ -108,7 +113,8 @@ static int three_attempts(MYSQL_PLUGIN_V for (i= 0; i < 3; i++) { /* send the prompt */ - if (vio->write_packet(vio, PASSWORD_QUESTION "Password, please:", 18)) + if (vio->write_packet(vio, + (const uchar*) (PASSWORD_QUESTION "Password, please:"), 18)) return CR_ERROR; /* read the password */ @@ -121,7 +127,7 @@ static int three_attempts(MYSQL_PLUGIN_V finish, if the password is correct. note, that we did not mark the prompt packet as "last" */ - if (strcmp(pkt, info->auth_string) == 0) + if (strcmp((char*) pkt, info->auth_string) == 0) return CR_OK; } @@ -255,12 +261,12 @@ static int perform_dialog(MYSQL_PLUGIN_V if ((cmd >> 1) == 2 && *pkt == 0) reply= mysql->passwd; else - reply= ask(mysql, cmd >> 1, pkt, reply_buf, sizeof(reply_buf)); + reply= ask(mysql, cmd >> 1, (char*) pkt, reply_buf, sizeof(reply_buf)); if (!reply) return CR_ERROR; } /* send the reply to the server */ - res= vio->write_packet(vio, reply, strlen(reply)+1); + res= vio->write_packet(vio, (uchar*) reply, strlen(reply)+1); if (reply != mysql->passwd && reply != reply_buf) free(reply); === modified file 'sql/sql_acl.cc' --- a/sql/sql_acl.cc 2010-03-29 15:13:53 +0000 +++ b/sql/sql_acl.cc 2010-03-31 18:37:45 +0000 @@ -161,7 +161,10 @@ static LEX_STRING old_password_plugin_na /// @todo make it configurable LEX_STRING *default_auth_plugin_name= &native_password_plugin_name; -static plugin_ref native_password_plugin, old_password_plugin; +static plugin_ref native_password_plugin; +#ifndef EMBEDDED_LIBRARY +static plugin_ref old_password_plugin; +#endif /* Classes */ === modified file 'storage/pbxt/src/ha_pbxt.cc' --- a/storage/pbxt/src/ha_pbxt.cc 2010-03-03 14:44:14 +0000 +++ b/storage/pbxt/src/ha_pbxt.cc 2010-03-31 18:37:45 +0000 @@ -1215,8 +1215,6 @@ static int pbxt_init(void *p) THD *thd = NULL; #ifndef DRIZZLED - extern myxt_mutex_t LOCK_plugin; - /* {MYSQL QUIRK} * I have to release this lock for PBXT recovery to * work, because it needs to open .frm files.
participants (1)
-
Michael Widenius