Commit b517dbf7 authored by unknown's avatar unknown

Compile fixes

parent c6d1dee7
...@@ -101,7 +101,9 @@ handlerton partition_hton = { ...@@ -101,7 +101,9 @@ handlerton partition_hton = {
partition_flags, /* Partition flags */ partition_flags, /* Partition flags */
alter_table_flags, /* Partition flags */ alter_table_flags, /* Partition flags */
NULL, /* Alter Tablespace */ NULL, /* Alter Tablespace */
HTON_NOT_USER_SELECTABLE | HTON_HIDDEN HTON_NOT_USER_SELECTABLE | HTON_HIDDEN,
NULL, /* binlog function */
NULL /* binlog query */
}; };
/* /*
...@@ -495,10 +497,9 @@ int ha_partition::create_handler_files(const char *path, ...@@ -495,10 +497,9 @@ int ha_partition::create_handler_files(const char *path,
{ {
char name[FN_REFLEN]; char name[FN_REFLEN];
char old_name[FN_REFLEN]; char old_name[FN_REFLEN];
char *par_str= ".par";
strxmov(name, path, par_str, NullS); strxmov(name, path, ha_par_ext, NullS);
strxmov(old_name, old_path, par_str, NullS); strxmov(old_name, old_path, ha_par_ext, NullS);
if (my_delete(name, MYF(MY_WME)) || if (my_delete(name, MYF(MY_WME)) ||
my_rename(old_name, name, MYF(MY_WME))) my_rename(old_name, name, MYF(MY_WME)))
{ {
...@@ -763,7 +764,7 @@ int ha_partition::rename_partitions(const char *path) ...@@ -763,7 +764,7 @@ int ha_partition::rename_partitions(const char *path)
if (file->delete_table((const char *) norm_name_buff) || if (file->delete_table((const char *) norm_name_buff) ||
inactivate_table_log_entry(sub_elem->log_entry->entry_pos)) inactivate_table_log_entry(sub_elem->log_entry->entry_pos))
error= 1; error= 1;
VOID(synch_table_log()); VOID(sync_table_log());
} }
file= m_new_file[part]; file= m_new_file[part];
create_subpartition_name(part_name_buff, path, create_subpartition_name(part_name_buff, path,
...@@ -792,7 +793,7 @@ int ha_partition::rename_partitions(const char *path) ...@@ -792,7 +793,7 @@ int ha_partition::rename_partitions(const char *path)
if (file->delete_table((const char *) norm_name_buff) || if (file->delete_table((const char *) norm_name_buff) ||
inactivate_table_log_entry(part_elem->log_entry->entry_pos)) inactivate_table_log_entry(part_elem->log_entry->entry_pos))
error= 1; error= 1;
VOID(synch_table_log()); VOID(sync_table_log());
} }
file= m_new_file[i]; file= m_new_file[i];
create_partition_name(part_name_buff, path, create_partition_name(part_name_buff, path,
...@@ -809,7 +810,7 @@ int ha_partition::rename_partitions(const char *path) ...@@ -809,7 +810,7 @@ int ha_partition::rename_partitions(const char *path)
} }
} }
} while (++i < no_parts); } while (++i < no_parts);
VOID(synch_table_log()); VOID(sync_table_log());
DBUG_RETURN(error); DBUG_RETURN(error);
} }
......
...@@ -658,6 +658,7 @@ typedef struct { ...@@ -658,6 +658,7 @@ typedef struct {
#define UNDEF_NODEGROUP 65535 #define UNDEF_NODEGROUP 65535
class Item; class Item;
struct st_table_log_memory_entry;
class partition_element :public Sql_alloc { class partition_element :public Sql_alloc {
public: public:
...@@ -667,7 +668,7 @@ public: ...@@ -667,7 +668,7 @@ public:
ulonglong part_min_rows; ulonglong part_min_rows;
char *partition_name; char *partition_name;
char *tablespace_name; char *tablespace_name;
TABLE_LOG_MEMORY_ENTRY *log_entry; st_table_log_memory_entry *log_entry;
longlong range_value; longlong range_value;
char* part_comment; char* part_comment;
char* data_file_name; char* data_file_name;
...@@ -801,7 +802,6 @@ typedef int (*get_partitions_in_range_iter)(partition_info *part_info, ...@@ -801,7 +802,6 @@ typedef int (*get_partitions_in_range_iter)(partition_info *part_info,
PARTITION_ITERATOR *part_iter); PARTITION_ITERATOR *part_iter);
struct st_table_log_memory_entry;
class partition_info : public Sql_alloc class partition_info : public Sql_alloc
{ {
......
...@@ -1206,6 +1206,7 @@ bool write_execute_table_log_entry(uint first_entry, ...@@ -1206,6 +1206,7 @@ bool write_execute_table_log_entry(uint first_entry,
TABLE_LOG_MEMORY_ENTRY **active_entry); TABLE_LOG_MEMORY_ENTRY **active_entry);
bool inactivate_table_log_entry(uint entry_no); bool inactivate_table_log_entry(uint entry_no);
void release_table_log_memory_entry(TABLE_LOG_MEMORY_ENTRY *log_entry); void release_table_log_memory_entry(TABLE_LOG_MEMORY_ENTRY *log_entry);
bool sync_table_log();
void release_table_log(); void release_table_log();
void execute_table_log_recovery(); void execute_table_log_recovery();
bool execute_table_log_entry(uint first_entry); bool execute_table_log_entry(uint first_entry);
......
...@@ -5215,12 +5215,12 @@ write_log_changed_partitions(ALTER_PARTITION_PARAM_TYPE *lpt, ...@@ -5215,12 +5215,12 @@ write_log_changed_partitions(ALTER_PARTITION_PARAM_TYPE *lpt,
part_elem->partition_name, part_elem->partition_name,
sub_elem->partition_name, sub_elem->partition_name,
NORMAL_PART_NAME); NORMAL_PART_NAME);
table_log_entry.name= norm_path; table_log_entry.name= normal_path;
table_log_entry.from_name= tmp_path; table_log_entry.from_name= tmp_path;
if (part_elem->part_state == PART_IS_CHANGED) if (part_elem->part_state == PART_IS_CHANGED)
table_log_entry->action_type= TLOG_REPLACE_ACTION_CODE; table_log_entry.action_type= TLOG_REPLACE_ACTION_CODE;
else else
table_log_entry->action_type= TLOG_RENAME_ACTION_CODE; table_log_entry.action_type= TLOG_RENAME_ACTION_CODE;
if (write_table_log_entry(&table_log_entry, &log_entry)) if (write_table_log_entry(&table_log_entry, &log_entry))
{ {
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
...@@ -5244,19 +5244,19 @@ write_log_changed_partitions(ALTER_PARTITION_PARAM_TYPE *lpt, ...@@ -5244,19 +5244,19 @@ write_log_changed_partitions(ALTER_PARTITION_PARAM_TYPE *lpt,
table_log_entry.name= normal_path; table_log_entry.name= normal_path;
table_log_entry.from_name= tmp_path; table_log_entry.from_name= tmp_path;
if (part_elem->part_state == PART_IS_CHANGED) if (part_elem->part_state == PART_IS_CHANGED)
table_log_entry->action_type= TLOG_REPLACE_ACTION_CODE; table_log_entry.action_type= TLOG_REPLACE_ACTION_CODE;
else else
table_log_entry->action_type= TLOG_RENAME_ACTION_CODE; table_log_entry.action_type= TLOG_RENAME_ACTION_CODE;
if (write_table_log_entry(&table_log_entry, &log_entry)) if (write_table_log_entry(&table_log_entry, &log_entry))
{ {
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
*next_entry= log_entry->entry_pos; *next_entry= log_entry->entry_pos;
part_elem->table_log_entry= log_entry; part_elem->log_entry= log_entry;
insert_part_info_log_entry_list(part_info, log_entry); insert_part_info_log_entry_list(part_info, log_entry);
} }
} }
} while (++i < no_elements) } while (++i < no_elements);
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }
...@@ -5332,7 +5332,7 @@ write_log_dropped_partitions(ALTER_PARTITION_PARAM_TYPE *lpt, ...@@ -5332,7 +5332,7 @@ write_log_dropped_partitions(ALTER_PARTITION_PARAM_TYPE *lpt,
} }
*next_entry= log_entry->entry_pos; *next_entry= log_entry->entry_pos;
if (temp_list) if (temp_list)
sub_elem->table_log_entry= log_entry; sub_elem->log_entry= log_entry;
insert_part_info_log_entry_list(part_info, log_entry); insert_part_info_log_entry_list(part_info, log_entry);
} while (++j < no_subparts); } while (++j < no_subparts);
} }
...@@ -5351,7 +5351,7 @@ write_log_dropped_partitions(ALTER_PARTITION_PARAM_TYPE *lpt, ...@@ -5351,7 +5351,7 @@ write_log_dropped_partitions(ALTER_PARTITION_PARAM_TYPE *lpt,
} }
*next_entry= log_entry->entry_pos; *next_entry= log_entry->entry_pos;
if (temp_list) if (temp_list)
part_elem->table_log_entry= log_entry; part_elem->log_entry= log_entry;
insert_part_info_log_entry_list(part_info, log_entry); insert_part_info_log_entry_list(part_info, log_entry);
} }
} }
......
...@@ -293,6 +293,7 @@ pthread_mutex_t LOCK_gtl; ...@@ -293,6 +293,7 @@ pthread_mutex_t LOCK_gtl;
#define TLOG_ACTION_TYPE_POS 1 #define TLOG_ACTION_TYPE_POS 1
#define TLOG_PHASE_POS 2 #define TLOG_PHASE_POS 2
#define TLOG_NEXT_ENTRY_POS 4 #define TLOG_NEXT_ENTRY_POS 4
#define TLOG_NAME_POS 8
#define TLOG_NO_ENTRY_POS 0 #define TLOG_NO_ENTRY_POS 0
#define TLOG_NAME_LEN_POS 4 #define TLOG_NAME_LEN_POS 4
...@@ -762,18 +763,18 @@ bool ...@@ -762,18 +763,18 @@ bool
inactivate_table_log_entry(uint entry_no) inactivate_table_log_entry(uint entry_no)
{ {
bool error= TRUE; bool error= TRUE;
const char *file_entry= (const char*)global_table_log.file_entry char *file_entry= (char*)global_table_log.file_entry;
DBUG_ENTER("inactivate_table_log_entry"); DBUG_ENTER("inactivate_table_log_entry");
if (!read_table_log_file_entry(entry_no)) if (!read_table_log_file_entry(entry_no))
{ {
if (file_entry[TLOG_ENTRY_POS] == TLOG_LOG_ENTRY_CODE) if (file_entry[TLOG_ENTRY_TYPE_POS] == TLOG_LOG_ENTRY_CODE)
{ {
if (file_entry[TLOG_ACTION_TYPE_POS] == TLOG_DELETE_ACTION_CODE || if (file_entry[TLOG_ACTION_TYPE_POS] == TLOG_DELETE_ACTION_CODE ||
file_entry[TLOG_ACTION_TYPE_POS] == TLOG_RENAME_ACTION_CODE || file_entry[TLOG_ACTION_TYPE_POS] == TLOG_RENAME_ACTION_CODE ||
(file_entry[TLOG_ACTION_TYPE_POS] == TLOG_REPLACE_ACTION_CODE && (file_entry[TLOG_ACTION_TYPE_POS] == TLOG_REPLACE_ACTION_CODE &&
file_entry[TLOG_PHASE_POS] == 1)) file_entry[TLOG_PHASE_POS] == 1))
file_entry[TLOG_ENTRY_TYPE_POS]= TLOG_IGNORE_LOG_ENTRY_POS; file_entry[TLOG_ENTRY_TYPE_POS]= TLOG_IGNORE_LOG_ENTRY_CODE;
else if (file_entry[TLOG_ACTION_TYPE_POS] == TLOG_REPLACE_ACTION_CODE) else if (file_entry[TLOG_ACTION_TYPE_POS] == TLOG_REPLACE_ACTION_CODE)
{ {
DBUG_ASSERT(file_entry[TLOG_PHASE_POS] == 0); DBUG_ASSERT(file_entry[TLOG_PHASE_POS] == 0);
...@@ -800,7 +801,6 @@ inactivate_table_log_entry(uint entry_no) ...@@ -800,7 +801,6 @@ inactivate_table_log_entry(uint entry_no)
FALSE Success FALSE Success
*/ */
static
bool bool
sync_table_log() sync_table_log()
{ {
......
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