Commit 1b611819 authored by unknown's avatar unknown

Merge magare.gmz:/home/kgeorge/mysql/autopush/B26461-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/work/B26461-5.1-opt


CMakeLists.txt:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
sql/procedure.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_analyse.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/handler.h:
  merged bug 26461 to 5.1-opt
sql/mysql_priv.h:
  merged bug 26461 to 5.1-opt
sql/sql_base.cc:
  merged bug 26461 to 5.1-opt
sql/sql_prepare.cc:
  merged bug 26461 to 5.1-opt
parents 6c61454b a3558b5f
......@@ -104,6 +104,10 @@ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDBUG_OFF")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
#TODO: update the code and remove the disabled warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
......
......@@ -158,14 +158,12 @@ typedef uint rf_SetTimer;
#define Socket_defined
#define my_socket SOCKET
#define bool BOOL
#define SIGPIPE SIGINT
#define RETQSORTTYPE void
#define QSORT_TYPE_IS_VOID
#define RETSIGTYPE void
#define SOCKET_SIZE_TYPE int
#define my_socket_defined
#define bool_defined
#define byte_defined
#define HUGE_PTR
#define STDCALL __stdcall /* Used by libmysql.dll */
......@@ -472,4 +470,4 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_CHARSET_ujis 1
#define HAVE_CHARSET_utf8 1
#define HAVE_UCA_COLLATIONS 1
#define HAVE_BOOL 1
......@@ -1067,7 +1067,7 @@ typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
typedef short int15; /* Most effective integer 0 <= x <= 32767 */
typedef int myf; /* Type of MyFlags in my_funcs */
typedef char my_bool; /* Small bool */
#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
#if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
typedef char bool; /* Ordinary boolean values 0 1 */
#endif
/* Macros for converting *constants* to the right type */
......
......@@ -741,8 +741,8 @@ inline bool check_some_routine_access(THD *thd, const char *db,
bool multi_update_precheck(THD *thd, TABLE_LIST *tables);
bool multi_delete_precheck(THD *thd, TABLE_LIST *tables);
bool mysql_multi_update_prepare(THD *thd);
bool mysql_multi_delete_prepare(THD *thd);
int mysql_multi_update_prepare(THD *thd);
int mysql_multi_delete_prepare(THD *thd);
bool mysql_insert_select_prepare(THD *thd);
bool update_precheck(THD *thd, TABLE_LIST *tables);
bool delete_precheck(THD *thd, TABLE_LIST *tables);
......@@ -978,7 +978,7 @@ bool setup_connection_thread_globals(THD *thd);
bool login_connection(THD *thd);
void end_connection(THD *thd);
bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent);
int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent);
bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create);
bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent);
bool mysql_upgrade_db(THD *thd, LEX_STRING *old_db);
......@@ -1022,7 +1022,7 @@ void init_max_user_conn(void);
void init_update_queries(void);
void free_max_user_conn(void);
pthread_handler_t handle_bootstrap(void *arg);
bool mysql_execute_command(THD *thd);
int mysql_execute_command(THD *thd);
bool do_command(THD *thd);
bool dispatch_command(enum enum_server_command command, THD *thd,
char* packet, uint packet_length);
......@@ -1198,7 +1198,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields,
int check_that_all_fields_are_given_values(THD *thd, TABLE *entry,
TABLE_LIST *table_list);
void prepare_triggers_for_insert_stmt(TABLE *table);
bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds);
int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds);
bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
SQL_LIST *order, ha_rows rows, ulonglong options,
bool reset_auto_increment);
......@@ -1472,14 +1472,14 @@ void wait_for_condition(THD *thd, pthread_mutex_t *mutex,
pthread_cond_t *cond);
int open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags);
/* open_and_lock_tables with optional derived handling */
bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived);
int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived);
/* simple open_and_lock_tables without derived handling */
inline bool simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
inline int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
{
return open_and_lock_tables_derived(thd, tables, FALSE);
}
/* open_and_lock_tables with derived handling */
inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
inline int open_and_lock_tables(THD *thd, TABLE_LIST *tables)
{
return open_and_lock_tables_derived(thd, tables, TRUE);
}
......@@ -1708,7 +1708,7 @@ inline TABLE_LIST *find_table_in_local_list(TABLE_LIST *table,
bool eval_const_cond(COND *cond);
/* sql_load.cc */
bool mysql_load(THD *thd, sql_exchange *ex, TABLE_LIST *table_list,
int mysql_load(THD *thd, sql_exchange *ex, TABLE_LIST *table_list,
List<Item> &fields_vars, List<Item> &set_fields,
List<Item> &set_values_list,
enum enum_duplicates handle_duplicates, bool ignore,
......
......@@ -144,7 +144,7 @@ class Procedure {
virtual int send_row(List<Item> &fields)=0;
virtual bool change_columns(List<Item> &fields)=0;
virtual void update_refs(void) {}
virtual bool end_of_records() { return 0; }
virtual int end_of_records() { return 0; }
};
Procedure *setup_procedure(THD *thd,ORDER *proc_param,select_result *result,
......
......@@ -1521,7 +1521,7 @@ bool acl_check_host(const char *host, const char *ip)
1 ERROR ; In this case the error is sent to the client.
*/
bool check_change_password(THD *thd, const char *host, const char *user,
int check_change_password(THD *thd, const char *host, const char *user,
char *new_password, uint new_password_len)
{
if (!initialized)
......@@ -2922,7 +2922,7 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name,
TRUE error
*/
bool mysql_table_grant(THD *thd, TABLE_LIST *table_list,
int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
List <LEX_USER> &user_list,
List <LEX_COLUMN> &columns, ulong rights,
bool revoke_grant)
......@@ -6087,7 +6087,7 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name,
< 0 Error. Error message not yet sent.
*/
bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
int sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
bool is_proc)
{
Security_context *sctx= thd->security_ctx;
......
......@@ -222,13 +222,13 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh, const char *passwd,
bool acl_getroot_no_password(Security_context *sctx, char *user, char *host,
char *ip, char *db);
bool acl_check_host(const char *host, const char *ip);
bool check_change_password(THD *thd, const char *host, const char *user,
int check_change_password(THD *thd, const char *host, const char *user,
char *password, uint password_len);
bool change_password(THD *thd, const char *host, const char *user,
char *password);
bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &user_list,
ulong rights, bool revoke);
bool mysql_table_grant(THD *thd, TABLE_LIST *table, List <LEX_USER> &user_list,
int mysql_table_grant(THD *thd, TABLE_LIST *table, List <LEX_USER> &user_list,
List <LEX_COLUMN> &column_list, ulong rights,
bool revoke);
bool mysql_routine_grant(THD *thd, TABLE_LIST *table, bool is_proc,
......@@ -264,7 +264,7 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant,
const char *db, const char *table);
bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name,
bool is_proc);
bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
int sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
bool is_proc);
bool check_routine_level_acl(THD *thd, const char *db, const char *name,
bool is_proc);
......
......@@ -682,7 +682,7 @@ int analyse::send_row(List<Item> & /* field_list */)
} // analyse::send_row
bool analyse::end_of_records()
int analyse::end_of_records()
{
field_info **f = f_info;
char buff[MAX_FIELD_WIDTH];
......
......@@ -350,7 +350,7 @@ class analyse: public Procedure
virtual bool change_columns(List<Item> &fields);
virtual int send_row(List<Item> &field_list);
virtual void end_group(void) {}
virtual bool end_of_records(void);
virtual int end_of_records(void);
friend Procedure *proc_analyse_init(THD *thd, ORDER *param,
select_result *result,
List<Item> &field_list);
......
......@@ -4865,7 +4865,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type,
the third argument set appropriately.
*/
bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived)
int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived)
{
uint counter;
bool need_reopen;
......
......@@ -606,7 +606,7 @@ CHARSET_INFO *get_default_db_collation(THD *thd, const char *db_name)
*/
bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
bool silent)
{
char path[FN_REFLEN+16];
......
......@@ -411,7 +411,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
FALSE OK
TRUE error
*/
bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
{
Item *fake_conds= 0;
SELECT_LEX *select_lex= &thd->lex->select_lex;
......@@ -474,7 +474,7 @@ extern "C" int refpos_order_cmp(void* arg, const void *a,const void *b)
TRUE Error
*/
bool mysql_multi_delete_prepare(THD *thd)
int mysql_multi_delete_prepare(THD *thd)
{
LEX *lex= thd->lex;
TABLE_LIST *aux_tables= (TABLE_LIST *)lex->auxiliary_table_list.first;
......
......@@ -110,7 +110,7 @@ static bool write_execute_load_query_log_event(THD *thd,
TRUE - error / FALSE - success
*/
bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
List<Item> &fields_vars, List<Item> &set_fields,
List<Item> &set_values,
enum enum_duplicates handle_duplicates, bool ignore,
......
......@@ -1856,10 +1856,10 @@ bool sp_process_definer(THD *thd)
TRUE Error
*/
bool
int
mysql_execute_command(THD *thd)
{
bool res= FALSE;
int res= FALSE;
bool need_start_waiting= FALSE; // have protection against global read lock
int up_result= 0;
LEX *lex= thd->lex;
......
......@@ -1415,7 +1415,7 @@ static bool mysql_test_set_fields(Prepared_statement *stmt,
*/
static bool select_like_stmt_test(Prepared_statement *stmt,
bool (*specific_prepare)(THD *thd),
int (*specific_prepare)(THD *thd),
ulong setup_tables_done_option)
{
DBUG_ENTER("select_like_stmt_test");
......@@ -1452,7 +1452,7 @@ static bool select_like_stmt_test(Prepared_statement *stmt,
static bool
select_like_stmt_test_with_open(Prepared_statement *stmt,
TABLE_LIST *tables,
bool (*specific_prepare)(THD *thd),
int (*specific_prepare)(THD *thd),
ulong setup_tables_done_option)
{
DBUG_ENTER("select_like_stmt_test_with_open");
......@@ -1638,7 +1638,7 @@ static bool mysql_test_multidelete(Prepared_statement *stmt,
uses local tables lists.
*/
static bool mysql_insert_select_prepare_tester(THD *thd)
static int mysql_insert_select_prepare_tester(THD *thd)
{
SELECT_LEX *first_select= &thd->lex->select_lex;
TABLE_LIST *second_table= ((TABLE_LIST*)first_select->table_list.first)->
......
......@@ -930,7 +930,7 @@ static table_map get_table_map(List<Item> *items)
TRUE Error
*/
bool mysql_multi_update_prepare(THD *thd)
int mysql_multi_update_prepare(THD *thd)
{
LEX *lex= thd->lex;
TABLE_LIST *table_list= lex->query_tables;
......
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