Commit fa7f63d4 authored by monty@mysql.com's avatar monty@mysql.com

After merge fixes

parent 1e311999
...@@ -1693,11 +1693,11 @@ err: ...@@ -1693,11 +1693,11 @@ err:
sorting sorting
*/ */
static my_bool not_killed= 0; static int not_killed= 0;
volatile int *killed_ptr(MI_CHECK *param) volatile int *killed_ptr(MI_CHECK *param)
{ {
return (int *)thd; /* always NULL */ return &not_killed; /* always NULL */
} }
/* print warnings and errors */ /* print warnings and errors */
......
...@@ -711,7 +711,7 @@ int mi_open_keyfile(MYISAM_SHARE *share); ...@@ -711,7 +711,7 @@ int mi_open_keyfile(MYISAM_SHARE *share);
void mi_setup_functions(register MYISAM_SHARE *share); void mi_setup_functions(register MYISAM_SHARE *share);
/* Functions needed by mi_check */ /* Functions needed by mi_check */
int *killed_ptr(void *thd); volatile int *killed_ptr(MI_CHECK *param);
void mi_check_print_error _VARARGS((MI_CHECK *param, const char *fmt,...)); void mi_check_print_error _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_warning _VARARGS((MI_CHECK *param, const char *fmt,...)); void mi_check_print_warning _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_info _VARARGS((MI_CHECK *param, const char *fmt,...)); void mi_check_print_info _VARARGS((MI_CHECK *param, const char *fmt,...));
......
...@@ -87,9 +87,10 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, ...@@ -87,9 +87,10 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
extern "C" { extern "C" {
int *killed_ptr(void *thd) volatile int *killed_ptr(MI_CHECK *param)
{ {
return (int*)&((THD *)thd)->killed; /* In theory Unsafe conversion, but should be ok for now */
return (int*) &(((THD *)(param->thd))->killed);
} }
void mi_check_print_error(MI_CHECK *param, const char *fmt,...) void mi_check_print_error(MI_CHECK *param, const char *fmt,...)
......
...@@ -930,7 +930,7 @@ extern char *shared_memory_base_name, *mysqld_unix_port; ...@@ -930,7 +930,7 @@ extern char *shared_memory_base_name, *mysqld_unix_port;
extern bool opt_enable_shared_memory; extern bool opt_enable_shared_memory;
extern char *default_tz_name; extern char *default_tz_name;
extern MYSQL_LOG mysql_log,mysql_update_log,mysql_slow_log,mysql_bin_log; extern MYSQL_LOG mysql_log,mysql_slow_log,mysql_bin_log;
extern FILE *bootstrap_file; extern FILE *bootstrap_file;
extern pthread_key(MEM_ROOT*,THR_MALLOC); extern pthread_key(MEM_ROOT*,THR_MALLOC);
extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open, extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
......
...@@ -954,7 +954,7 @@ int QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan(bool reuse_handler) ...@@ -954,7 +954,7 @@ int QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan(bool reuse_handler)
quick->record= head->record[0]; quick->record= head->record[0];
} }
if (need_to_fetch_row && head->file->rnd_init()) if (need_to_fetch_row && head->file->ha_rnd_init(1))
{ {
DBUG_PRINT("error", ("ROR index_merge rnd_init call failed")); DBUG_PRINT("error", ("ROR index_merge rnd_init call failed"));
DBUG_RETURN(1); DBUG_RETURN(1);
...@@ -1105,7 +1105,7 @@ int QUICK_ROR_UNION_SELECT::reset() ...@@ -1105,7 +1105,7 @@ int QUICK_ROR_UNION_SELECT::reset()
queue_insert(&queue, (byte*)quick); queue_insert(&queue, (byte*)quick);
} }
if (head->file->rnd_init()) if (head->file->ha_rnd_init(1))
{ {
DBUG_PRINT("error", ("ROR index_merge rnd_init call failed")); DBUG_PRINT("error", ("ROR index_merge rnd_init call failed"));
DBUG_RETURN(1); DBUG_RETURN(1);
......
...@@ -32,9 +32,9 @@ typedef enum { ...@@ -32,9 +32,9 @@ typedef enum {
struct File_option struct File_option
{ {
const LEX_STRING name; /* Name of the option */ LEX_STRING name; /* Name of the option */
int offset; /* offset to base address of value */ int offset; /* offset to base address of value */
enum file_opt_type type; /* Option type */ enum file_opt_type type; /* Option type */
}; };
class File_parser; class File_parser;
......
...@@ -2736,6 +2736,7 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list) ...@@ -2736,6 +2736,7 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list)
bool not_all_support_one_shot(List<set_var_base> *var_list) bool not_all_support_one_shot(List<set_var_base> *var_list)
{ {
#if MYSQL_VERSION_ID < 50000
List_iterator_fast<set_var_base> it(*var_list); List_iterator_fast<set_var_base> it(*var_list);
set_var_base *var; set_var_base *var;
while ((var= it++)) while ((var= it++))
...@@ -2743,6 +2744,7 @@ bool not_all_support_one_shot(List<set_var_base> *var_list) ...@@ -2743,6 +2744,7 @@ bool not_all_support_one_shot(List<set_var_base> *var_list)
if (var->no_support_one_shot()) if (var->no_support_one_shot())
return 1; return 1;
} }
#endif
return 0; return 0;
} }
......
...@@ -587,7 +587,7 @@ db_show_routine_status(THD *thd, int type, const char *wild) ...@@ -587,7 +587,7 @@ db_show_routine_status(THD *thd, int type, const char *wild)
} }
} }
table->file->index_init(0); table->file->ha_index_init(0);
if ((res= table->file->index_first(table->record[0]))) if ((res= table->file->index_first(table->record[0])))
{ {
res= (res == HA_ERR_END_OF_FILE) ? 0 : SP_INTERNAL_ERROR; res= (res == HA_ERR_END_OF_FILE) ? 0 : SP_INTERNAL_ERROR;
...@@ -647,7 +647,7 @@ sp_drop_db_routines(THD *thd, char *db) ...@@ -647,7 +647,7 @@ sp_drop_db_routines(THD *thd, char *db)
} }
ret= SP_OK; ret= SP_OK;
table->file->index_init(0); table->file->ha_index_init(0);
if (! table->file->index_read(table->record[0], if (! table->file->index_read(table->record[0],
key, keylen, HA_READ_KEY_EXACT)) key, keylen, HA_READ_KEY_EXACT))
{ {
......
...@@ -917,7 +917,6 @@ sp_head::show_create_function(THD *thd) ...@@ -917,7 +917,6 @@ sp_head::show_create_function(THD *thd)
sys_var *sql_mode_var; sys_var *sql_mode_var;
byte *sql_mode_str; byte *sql_mode_str;
ulong sql_mode_len; ulong sql_mode_len;
DBUG_ENTER("sp_head::show_create_function"); DBUG_ENTER("sp_head::show_create_function");
DBUG_PRINT("info", ("procedure %s", m_name.str)); DBUG_PRINT("info", ("procedure %s", m_name.str));
......
...@@ -400,7 +400,6 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) ...@@ -400,7 +400,6 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
query =thd->query; query =thd->query;
query_length= thd->query_length; query_length= thd->query_length;
} }
mysql_update_log.write(thd, query, query_length);
if (mysql_bin_log.is_open()) if (mysql_bin_log.is_open())
{ {
Query_log_event qinfo(thd, query, query_length, 0); Query_log_event qinfo(thd, query, query_length, 0);
......
...@@ -1868,7 +1868,7 @@ static void execute_stmt(THD *thd, Prepared_statement *stmt, ...@@ -1868,7 +1868,7 @@ static void execute_stmt(THD *thd, Prepared_statement *stmt,
thd->stmt_backup.set_statement(thd); thd->stmt_backup.set_statement(thd);
thd->set_statement(stmt); thd->set_statement(stmt);
} }
reset_stmt_for_execute(stmt); reset_stmt_for_execute(thd, stmt->lex);
if (expanded_query->length() && if (expanded_query->length() &&
alloc_query(thd, (char *)expanded_query->ptr(), alloc_query(thd, (char *)expanded_query->ptr(),
......
...@@ -8839,7 +8839,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, ...@@ -8839,7 +8839,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
} }
else else
{ {
select->quick->file->ha_index_end(); select->quick->head->file->ha_index_end();
/* /*
We have verified above that select->quick is not We have verified above that select->quick is not
index_merge quick select. index_merge quick select.
......
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