Commit 8aee1f6e authored by rafal@quant.(none)'s avatar rafal@quant.(none)

Fixes of compilation warnings and errors.

parent 6889569f
...@@ -100,7 +100,7 @@ void net_set_read_timeout(NET *net, uint timeout); ...@@ -100,7 +100,7 @@ void net_set_read_timeout(NET *net, uint timeout);
#define WARN_DEPRECATED(Thd,Ver,Old,New) \ #define WARN_DEPRECATED(Thd,Ver,Old,New) \
do { \ do { \
DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \ DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \
if (Thd != NULL) \ if (((gptr)Thd) != NULL) \
push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), \ ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), \
(Old), (Ver), (New)); \ (Old), (Ver), (New)); \
......
...@@ -6957,7 +6957,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -6957,7 +6957,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
if (!slave_warning_issued) //only show the warning once if (!slave_warning_issued) //only show the warning once
{ {
slave_warning_issued = true; slave_warning_issued = true;
WARN_DEPRECATED(0, "5.2", "for replication startup options", WARN_DEPRECATED(NULL, "5.2", "for replication startup options",
"'CHANGE MASTER'"); "'CHANGE MASTER'");
} }
break; break;
......
...@@ -381,7 +381,9 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, ...@@ -381,7 +381,9 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
List_item *values; List_item *values;
Name_resolution_context *context; Name_resolution_context *context;
Name_resolution_context_state ctx_state; Name_resolution_context_state ctx_state;
#ifndef EMBEDDED_LIBRARY
char *query= thd->query; char *query= thd->query;
#endif
bool log_on= (thd->options & OPTION_BIN_LOG) || bool log_on= (thd->options & OPTION_BIN_LOG) ||
(!(thd->security_ctx->master_access & SUPER_ACL)); (!(thd->security_ctx->master_access & SUPER_ACL));
thr_lock_type lock_type = table_list->lock_type; thr_lock_type lock_type = table_list->lock_type;
......
...@@ -46,6 +46,7 @@ const LEX_STRING null_lex_str={0,0}; ...@@ -46,6 +46,7 @@ const LEX_STRING null_lex_str={0,0};
#define yyoverflow(A,B,C,D,E,F) {ulong val= *(F); if (my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }} #define yyoverflow(A,B,C,D,E,F) {ulong val= *(F); if (my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
#undef WARN_DEPRECATED /* this macro is also defined in mysql_priv.h */
#define WARN_DEPRECATED(A,B) \ #define WARN_DEPRECATED(A,B) \
push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN, \ push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN, \
ER_WARN_DEPRECATED_SYNTAX, \ ER_WARN_DEPRECATED_SYNTAX, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment