summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-07-12 07:43:38 +0300
committermonty@mysql.com <>2004-07-12 07:43:38 +0300
commitfa7f63d46d033c1c1651d8f5155070e30c607023 (patch)
tree10e62d45a952afd6fc7079f46435e5a5144b3dc8
parent1e311999950833cd81ca0788cd3656585c46d9ae (diff)
downloadmariadb-git-fa7f63d46d033c1c1651d8f5155070e30c607023.tar.gz
After merge fixes
-rw-r--r--myisam/myisamchk.c4
-rw-r--r--myisam/myisamdef.h2
-rw-r--r--sql/ha_myisam.cc5
-rw-r--r--sql/mysql_priv.h2
-rw-r--r--sql/opt_range.cc4
-rw-r--r--sql/parse_file.h6
-rw-r--r--sql/set_var.cc2
-rw-r--r--sql/sp.cc4
-rw-r--r--sql/sp_head.cc1
-rw-r--r--sql/sql_db.cc1
-rw-r--r--sql/sql_prepare.cc2
-rw-r--r--sql/sql_select.cc2
12 files changed, 18 insertions, 17 deletions
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index 6dcfe2cfa21..1be1e72c435 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -1693,11 +1693,11 @@ err:
sorting
*/
-static my_bool not_killed= 0;
+static int not_killed= 0;
volatile int *killed_ptr(MI_CHECK *param)
{
- return (int *)thd; /* always NULL */
+ return &not_killed; /* always NULL */
}
/* print warnings and errors */
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index d092151aacc..12ce112dbe0 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -711,7 +711,7 @@ int mi_open_keyfile(MYISAM_SHARE *share);
void mi_setup_functions(register MYISAM_SHARE *share);
/* 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_warning _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_info _VARARGS((MI_CHECK *param, const char *fmt,...));
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index f7e966a9d16..d3dc0bb58de 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -87,9 +87,10 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
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,...)
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 792b1a1189f..4c4cf6db4be 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -930,7 +930,7 @@ extern char *shared_memory_base_name, *mysqld_unix_port;
extern bool opt_enable_shared_memory;
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 pthread_key(MEM_ROOT*,THR_MALLOC);
extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 08eae68c855..9c1d5208bbd 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -954,7 +954,7 @@ int QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan(bool reuse_handler)
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_RETURN(1);
@@ -1105,7 +1105,7 @@ int QUICK_ROR_UNION_SELECT::reset()
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_RETURN(1);
diff --git a/sql/parse_file.h b/sql/parse_file.h
index 537fd035f44..72e5e283229 100644
--- a/sql/parse_file.h
+++ b/sql/parse_file.h
@@ -32,9 +32,9 @@ typedef enum {
struct File_option
{
- const LEX_STRING name; /* Name of the option */
- int offset; /* offset to base address of value */
- enum file_opt_type type; /* Option type */
+ LEX_STRING name; /* Name of the option */
+ int offset; /* offset to base address of value */
+ enum file_opt_type type; /* Option type */
};
class File_parser;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 614d615e37b..1066c6f4465 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -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)
{
+#if MYSQL_VERSION_ID < 50000
List_iterator_fast<set_var_base> it(*var_list);
set_var_base *var;
while ((var= it++))
@@ -2743,6 +2744,7 @@ bool not_all_support_one_shot(List<set_var_base> *var_list)
if (var->no_support_one_shot())
return 1;
}
+#endif
return 0;
}
diff --git a/sql/sp.cc b/sql/sp.cc
index d70da1b1421..8835070bd9f 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -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])))
{
res= (res == HA_ERR_END_OF_FILE) ? 0 : SP_INTERNAL_ERROR;
@@ -647,7 +647,7 @@ sp_drop_db_routines(THD *thd, char *db)
}
ret= SP_OK;
- table->file->index_init(0);
+ table->file->ha_index_init(0);
if (! table->file->index_read(table->record[0],
key, keylen, HA_READ_KEY_EXACT))
{
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 41955f12b5d..7f4f2351625 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -917,7 +917,6 @@ sp_head::show_create_function(THD *thd)
sys_var *sql_mode_var;
byte *sql_mode_str;
ulong sql_mode_len;
-
DBUG_ENTER("sp_head::show_create_function");
DBUG_PRINT("info", ("procedure %s", m_name.str));
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index fcb6134ce41..947dd559559 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -400,7 +400,6 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
query =thd->query;
query_length= thd->query_length;
}
- mysql_update_log.write(thd, query, query_length);
if (mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, query, query_length, 0);
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index d4f69e5dd4f..eeaa40f1a75 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1868,7 +1868,7 @@ static void execute_stmt(THD *thd, Prepared_statement *stmt,
thd->stmt_backup.set_statement(thd);
thd->set_statement(stmt);
}
- reset_stmt_for_execute(stmt);
+ reset_stmt_for_execute(thd, stmt->lex);
if (expanded_query->length() &&
alloc_query(thd, (char *)expanded_query->ptr(),
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 05676f9058a..5893b9110d7 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -8839,7 +8839,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
}
else
{
- select->quick->file->ha_index_end();
+ select->quick->head->file->ha_index_end();
/*
We have verified above that select->quick is not
index_merge quick select.