After merge fixes:
- Remove compiler warnings - Fix merge errors - Indentation fixes sql/ha_ndbcluster.cc: After merge fixes sql/slave.cc: After merge fixes sql/sp.cc: After merge fixes sql/sql_table.cc: After merge fixes sql/sql_view.cc: After merge fixes
This commit is contained in:
parent
2bcbffa0c5
commit
af583b8283
@ -6219,20 +6219,19 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
|
||||
bool sorted,
|
||||
HANDLER_BUFFER *buffer)
|
||||
{
|
||||
DBUG_ENTER("ha_ndbcluster::read_multi_range_first");
|
||||
|
||||
int res;
|
||||
KEY* key_info= table->key_info + active_index;
|
||||
NDB_INDEX_TYPE cur_index_type= get_index_type(active_index);
|
||||
ulong reclength= table->s->reclength;
|
||||
NdbOperation* op;
|
||||
Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
|
||||
DBUG_ENTER("ha_ndbcluster::read_multi_range_first");
|
||||
|
||||
/**
|
||||
* blobs and unique hash index with NULL can't be batched currently
|
||||
*/
|
||||
if (uses_blob_value(m_retrieve_all_fields) ||
|
||||
(index_type == UNIQUE_INDEX &&
|
||||
(cur_index_type == UNIQUE_INDEX &&
|
||||
has_null_in_unique_index(active_index) &&
|
||||
null_value_index_search(ranges, ranges+range_count, buffer)))
|
||||
{
|
||||
@ -7953,6 +7952,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
|
||||
{
|
||||
@ -8026,6 +8026,7 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ha_ndbcluster::build_scan_filter(Ndb_cond * &cond, NdbScanFilter *filter)
|
||||
{
|
||||
@ -8076,14 +8077,14 @@ ha_ndbcluster::generate_scan_filter(Ndb_cond_stack *ndb_cond_stack,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ha_ndbcluster::generate_scan_filter_from_cond(Ndb_cond_stack *ndb_cond_stack,
|
||||
NdbScanFilter& filter)
|
||||
{
|
||||
DBUG_ENTER("generate_scan_filter_from_cond");
|
||||
bool multiple_cond= FALSE;
|
||||
DBUG_ENTER("generate_scan_filter_from_cond");
|
||||
|
||||
DBUG_PRINT("info", ("Generating scan filter"));
|
||||
// Wrap an AND group around multiple conditions
|
||||
if (ndb_cond_stack->next)
|
||||
{
|
||||
@ -8109,6 +8110,7 @@ ha_ndbcluster::generate_scan_filter_from_cond(Ndb_cond_stack *ndb_cond_stack,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
int ha_ndbcluster::generate_scan_filter_from_key(NdbScanOperation *op,
|
||||
const KEY* key_info,
|
||||
const byte *key,
|
||||
@ -8119,15 +8121,14 @@ int ha_ndbcluster::generate_scan_filter_from_key(NdbScanOperation *op,
|
||||
KEY_PART_INFO* end= key_part+key_info->key_parts;
|
||||
NdbScanFilter filter(op);
|
||||
int res;
|
||||
|
||||
DBUG_ENTER("generate_scan_filter_from_key");
|
||||
|
||||
filter.begin(NdbScanFilter::AND);
|
||||
for (; key_part != end; key_part++)
|
||||
{
|
||||
Field* field= key_part->field;
|
||||
uint32 pack_len= field->pack_length();
|
||||
const byte* ptr= key;
|
||||
char buf[256];
|
||||
DBUG_PRINT("info", ("Filtering value for %s", field->field_name));
|
||||
DBUG_DUMP("key", (char*)ptr, pack_len);
|
||||
if (key_part->null_bit)
|
||||
@ -8162,7 +8163,6 @@ int
|
||||
ndbcluster_show_status(THD* thd)
|
||||
{
|
||||
Protocol *protocol= thd->protocol;
|
||||
|
||||
DBUG_ENTER("ndbcluster_show_status");
|
||||
|
||||
if (have_ndbcluster != SHOW_OPTION_YES)
|
||||
|
@ -4393,6 +4393,8 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
|
||||
pthread_mutex_t *log_lock= rli->relay_log.get_log_lock();
|
||||
DBUG_ENTER("queue_event");
|
||||
|
||||
LINT_INIT(inc_pos);
|
||||
|
||||
if (mi->rli.relay_log.description_event_for_queue->binlog_version<4 &&
|
||||
buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT /* a way to escape */)
|
||||
DBUG_RETURN(queue_old_event(mi,buf,event_len));
|
||||
@ -4533,7 +4535,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
|
||||
|
||||
err:
|
||||
pthread_mutex_unlock(&mi->data_lock);
|
||||
DBUG_PRINT("info", ("error=%d", error));
|
||||
DBUG_PRINT("info", ("error: %d", error));
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
@ -492,8 +492,6 @@ db_create_routine(THD *thd, int type, sp_head *sp)
|
||||
int ret;
|
||||
TABLE *table;
|
||||
char definer[USER_HOST_BUFF_SIZE];
|
||||
char old_db_buf[NAME_LEN+1];
|
||||
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
|
||||
DBUG_ENTER("db_create_routine");
|
||||
DBUG_PRINT("enter", ("type: %d name: %.*s",type,sp->m_name.length,
|
||||
sp->m_name.str));
|
||||
@ -1843,9 +1841,7 @@ create_string(THD *thd, String *buf,
|
||||
SYNOPSIS
|
||||
sp_use_new_db()
|
||||
thd thread handle
|
||||
|
||||
new_db new database name (a string and its length)
|
||||
|
||||
old_db [IN] str points to a buffer where to store the old
|
||||
database, length contains the size of the buffer
|
||||
[OUT] if old db was not NULL, its name is copied
|
||||
@ -1853,7 +1849,6 @@ create_string(THD *thd, String *buf,
|
||||
accordingly. Otherwise str[0] is set to '\0' and length
|
||||
is set to 0. The out parameter should be used only if
|
||||
the database name has been changed (see dbchangedp).
|
||||
|
||||
dbchangedp [OUT] is set to TRUE if the current database is changed,
|
||||
FALSE otherwise. A database is not changed if the old
|
||||
name is the same as the new one, both names are empty,
|
||||
|
@ -223,9 +223,10 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
String wrong_tables;
|
||||
int error;
|
||||
bool some_tables_deleted=0, tmp_table_deleted=0, foreign_key_error=0;
|
||||
|
||||
DBUG_ENTER("mysql_rm_table_part2");
|
||||
|
||||
LINT_INIT(alias);
|
||||
|
||||
if (!drop_temporary && lock_table_names(thd, tables))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
@ -2998,7 +2999,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
ALTER_INFO *alter_info, bool do_send_ok)
|
||||
{
|
||||
TABLE *table,*new_table=0;
|
||||
int error;
|
||||
int error= 0;
|
||||
char tmp_name[80],old_name[32],new_name_buff[FN_REFLEN];
|
||||
char new_alias_buff[FN_REFLEN], *table_name, *db, *new_alias, *alias;
|
||||
char index_file[FN_REFLEN], data_file[FN_REFLEN];
|
||||
@ -3051,9 +3052,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
DBUG_RETURN(1);
|
||||
VOID(pthread_mutex_lock(&LOCK_open));
|
||||
if (lock_table_names(thd, table_list))
|
||||
{
|
||||
error= 1;
|
||||
goto view_err;
|
||||
}
|
||||
|
||||
error=0;
|
||||
if (!do_rename(thd, table_list, new_db, new_name, new_name, 1))
|
||||
{
|
||||
if (mysql_bin_log.is_open())
|
||||
@ -3154,7 +3157,6 @@ view_err:
|
||||
|
||||
switch (alter_info->keys_onoff) {
|
||||
case LEAVE_AS_IS:
|
||||
error= 0;
|
||||
break;
|
||||
case ENABLE:
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
|
||||
@ -3169,10 +3171,10 @@ view_err:
|
||||
}
|
||||
if (error == HA_ERR_WRONG_COMMAND)
|
||||
{
|
||||
error= 0;
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
|
||||
table->alias);
|
||||
error= 0;
|
||||
}
|
||||
|
||||
if (!error && (new_name != table_name || new_db != db))
|
||||
@ -3202,10 +3204,10 @@ view_err:
|
||||
|
||||
if (error == HA_ERR_WRONG_COMMAND)
|
||||
{
|
||||
error= 0;
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
|
||||
table->alias);
|
||||
error= 0;
|
||||
}
|
||||
|
||||
if (!error)
|
||||
|
@ -862,7 +862,8 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
|
||||
Query_arena *arena, backup;
|
||||
TABLE_LIST *top_view= table->top_table();
|
||||
int res;
|
||||
bool result;
|
||||
bool result, view_is_mergeable;
|
||||
TABLE_LIST *view_main_select_tables;
|
||||
DBUG_ENTER("mysql_make_view");
|
||||
DBUG_PRINT("info", ("table: 0x%lx (%s)", (ulong) table, table->table_name));
|
||||
|
||||
@ -1089,9 +1090,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
|
||||
table->next_global= view_tables;
|
||||
}
|
||||
|
||||
bool view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
|
||||
view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
|
||||
lex->can_be_merged());
|
||||
TABLE_LIST *view_main_select_tables;
|
||||
LINT_INIT(view_main_select_tables);
|
||||
|
||||
if (view_is_mergeable)
|
||||
{
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user