From e0f1e6af365a8983da84c64484199a1226f95508 Mon Sep 17 00:00:00 2001 From: "monty@mysql.com" <> Date: Fri, 12 Nov 2004 21:24:16 +0200 Subject: [PATCH] Portability fix for gcc 2.95.3 After merge fixes --- mysql-test/r/mix_innodb_myisam_binlog.result | 10 ++++++---- mysys/default.c | 3 ++- sql/mysql_priv.h | 6 +++--- sql/sql_base.cc | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index 9d6e9bd767a..abcb451df65 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -174,10 +174,12 @@ select a from t1 order by a; a 16 18 -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(16) -master-bin.000001 179 Query 1 79 use `test`; insert into t1 values(18) -master-bin.000001 239 Query 1 239 use `test`; COMMIT +show binlog events from 95; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 95 Query 1 # use `test`; BEGIN +master-bin.000001 157 Query 1 # use `test`; insert into t1 values(16) +master-bin.000001 239 Query 1 # use `test`; insert into t1 values(18) +master-bin.000001 321 Query 1 # use `test`; COMMIT delete from t1; delete from t2; alter table t2 type=MyISAM; diff --git a/mysys/default.c b/mysys/default.c index 02d4ec250f9..d6d84f65d8b 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -85,7 +85,8 @@ struct handle_option_ctx static int search_default_file(Process_option_func func, void *func_ctx, const char *dir, const char *config_file); -static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, +static int search_default_file_with_ext(Process_option_func func, + void *func_ctx, const char *dir, const char *ext, const char *config_file); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 7d1ffe97e08..62e4f849c67 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -649,8 +649,8 @@ bool drop_locked_tables(THD *thd,const char *db, const char *table_name); void abort_locked_tables(THD *thd,const char *db, const char *table_name); void execute_init_command(THD *thd, sys_var_str *init_command_var, rw_lock_t *var_mutex); -extern const Field *not_found_field; -extern const Field *view_ref_found; +extern Field *not_found_field; +extern Field *view_ref_found; enum find_item_error_report_type {REPORT_ALL_ERRORS, REPORT_EXCEPT_NOT_FOUND, IGNORE_ERRORS, REPORT_EXCEPT_NON_UNIQUE, @@ -776,7 +776,7 @@ TABLE *unlink_open_table(THD *thd,TABLE *list,TABLE *find); SQL_SELECT *make_select(TABLE *head, table_map const_tables, table_map read_tables, COND *conds, int *error, bool allow_null_cond= false); -extern const Item **not_found_item; +extern Item **not_found_item; Item ** find_item_in_list(Item *item, List &items, uint *counter, find_item_error_report_type report_error, bool *unaliased); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index eeb34f6b600..e690673c934 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2045,8 +2045,8 @@ bool rm_temporary_table(enum db_type base, char *path) ******************************************************************************/ /* Special Field pointers for find_field_in_tables returning */ -const Field *not_found_field= (Field*) 0x1; -const Field *view_ref_found= (Field*) 0x2; +Field *not_found_field= (Field*) 0x1; +Field *view_ref_found= (Field*) 0x2; #define WRONG_GRANT (Field*) -1 @@ -2447,7 +2447,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, */ /* Special Item pointer to serve as a return value from find_item_in_list(). */ -const Item **not_found_item= (const Item**) 0x1; +Item **not_found_item= (Item**) 0x1; Item **