mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Cleanups during review
Changed defaults option --instance to --defaults-group-suffix Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX mysql_print_defaults now understands --defaults-group-suffix Remove usage of my_tempnam() (not safe function) if( -> if ( and while( to while ( BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f: Delete: mysys/my_tempnam.c VC++Files/client/mysqlclient.dsp: Remove not used file my_tempnam.c VC++Files/client/mysqlclient_ia64.dsp: Remove not used file my_tempnam.c VC++Files/libmysql/libmysql.dsp: Remove not used file my_tempnam.c VC++Files/libmysql/libmysql_ia64.dsp: Remove not used file my_tempnam.c VC++Files/mysys/mysys.dsp: Remove not used file my_tempnam.c VC++Files/mysys/mysys_ia64.dsp: Remove not used file my_tempnam.c client/mysql.cc: Change to use get_defaults_options() Remove compiler warnings client/mysqldump.c: Indentation fixes Use quoted table name for 'primary_key_fields' extra/my_print_defaults.c: Add support for --defaults-group-suffix change to use get_default_options() extra/replace.c: Replace my_tempnam() with create_tmp_file() to allow us to remove my_tempnam.c include/config-win.h: Added DEFAULT_GROUP_SUFFIX_ENV include/my_sys.h: Change defaults_instance -> defaults_group_suffix Change get_defaults_files -> get_defaults_options libmysql/Makefile.shared: Added DEFAULT_GROUP_SUFFIX_ENV mysys/Makefile.am: Added DEFAULT_GROUP_SUFFIX_ENV Remove my_tempnam.c mysys/default.c: Changed --instance to --defaults-group-suffix Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX and moved the name to Makefile.am (mysys shouldn't by MySQL independent) Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order mysys/default_modify.c: Optimized code to use allocated space more efficently Reduce code size Ensure that realloc() works independent of argument size mysys/my_bitmap.c: Added missing return sql/ha_innodb.cc: Change if( -> if ( sql/ha_ndbcluster.cc: Change while( -> while ( sql/item_cmpfunc.cc: Break loop early (simple optimization) sql/item_strfunc.cc: Change if( -> if ( sql/log.cc: Fixed comment sql/mysqld.cc: Change if( -> if ( sql/opt_range.cc: while( -> while ( if( -> if ( sql/parse_file.cc: Change if( -> if ( sql/sql_cache.cc: while( -> while ( sql/sql_parse.cc: Change if( -> if ( sql/sql_prepare.cc: Added comment sql/sql_select.cc: while( -> while ( Removed index variable by incrementing pointer sql/sql_show.cc: Change if( -> if ( sql/sql_yacc.yy: Change if( -> if ( tests/mysql_client_test.c: Added cast to first argument to bzero()
This commit is contained in:
@ -630,7 +630,7 @@ int imerge_list_or_tree(PARAM *param,
|
||||
{
|
||||
SEL_IMERGE *imerge;
|
||||
List_iterator<SEL_IMERGE> it(*im1);
|
||||
while((imerge= it++))
|
||||
while ((imerge= it++))
|
||||
{
|
||||
if (imerge->or_sel_tree_with_checks(param, tree))
|
||||
it.remove();
|
||||
@ -990,7 +990,7 @@ int QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan(bool reuse_handler)
|
||||
DBUG_RETURN(1);
|
||||
quick->file->extra(HA_EXTRA_KEYREAD_PRESERVE_FIELDS);
|
||||
}
|
||||
while((quick= quick_it++))
|
||||
while ((quick= quick_it++))
|
||||
{
|
||||
if (quick->init_ror_merged_scan(FALSE))
|
||||
DBUG_RETURN(1);
|
||||
@ -6942,7 +6942,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
|
||||
List_iterator<Item> select_items_it(join->fields_list);
|
||||
|
||||
/* Check (SA1,SA4) and store the only MIN/MAX argument - the C attribute.*/
|
||||
if(join->make_sum_func_list(join->all_fields, join->fields_list, 1))
|
||||
if (join->make_sum_func_list(join->all_fields, join->fields_list, 1))
|
||||
DBUG_RETURN(NULL);
|
||||
if (join->sum_funcs[0])
|
||||
{
|
||||
@ -7268,7 +7268,7 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
|
||||
Item *and_or_arg;
|
||||
while ((and_or_arg= li++))
|
||||
{
|
||||
if(!check_group_min_max_predicates(and_or_arg, min_max_arg_item,
|
||||
if (!check_group_min_max_predicates(and_or_arg, min_max_arg_item,
|
||||
image_type))
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
@ -7350,7 +7350,7 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
|
||||
}
|
||||
else if (cur_arg->type() == Item::FUNC_ITEM)
|
||||
{
|
||||
if(!check_group_min_max_predicates(cur_arg, min_max_arg_item,
|
||||
if (!check_group_min_max_predicates(cur_arg, min_max_arg_item,
|
||||
image_type))
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
@ -7881,19 +7881,19 @@ int QUICK_GROUP_MIN_MAX_SELECT::init()
|
||||
|
||||
if (min_max_arg_part)
|
||||
{
|
||||
if(my_init_dynamic_array(&min_max_ranges, sizeof(QUICK_RANGE*), 16, 16))
|
||||
if (my_init_dynamic_array(&min_max_ranges, sizeof(QUICK_RANGE*), 16, 16))
|
||||
return 1;
|
||||
|
||||
if (have_min)
|
||||
{
|
||||
if(!(min_functions= new List<Item_sum>))
|
||||
if (!(min_functions= new List<Item_sum>))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
min_functions= NULL;
|
||||
if (have_max)
|
||||
{
|
||||
if(!(max_functions= new List<Item_sum>))
|
||||
if (!(max_functions= new List<Item_sum>))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@ -7967,7 +7967,7 @@ bool QUICK_GROUP_MIN_MAX_SELECT::add_range(SEL_ARG *sel_range)
|
||||
uint range_flag= sel_range->min_flag | sel_range->max_flag;
|
||||
|
||||
/* Skip (-inf,+inf) ranges, e.g. (x < 5 or x > 4). */
|
||||
if((range_flag & NO_MIN_RANGE) && (range_flag & NO_MAX_RANGE))
|
||||
if ((range_flag & NO_MIN_RANGE) && (range_flag & NO_MAX_RANGE))
|
||||
return FALSE;
|
||||
|
||||
if (!(sel_range->min_flag & NO_MIN_RANGE) &&
|
||||
|
Reference in New Issue
Block a user