mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#4738 streamline/simplify @@variable creation process
Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
This commit is contained in:
@ -120,8 +120,7 @@ static COND *optimize_cond(JOIN *join, COND *conds,
|
||||
Item::cond_result *cond_value);
|
||||
static bool const_expression_in_where(COND *conds,Item *item, Item **comp_item);
|
||||
static bool open_tmp_table(TABLE *table);
|
||||
static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
|
||||
ulonglong options);
|
||||
static bool create_myisam_tmp_table(TABLE *,TMP_TABLE_PARAM *, ulonglong, my_bool);
|
||||
static int do_select(JOIN *join,List<Item> *fields,TABLE *tmp_table,
|
||||
Procedure *proc);
|
||||
|
||||
@ -267,7 +266,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
|
||||
(ORDER*) select_lex->group_list.first,
|
||||
select_lex->having,
|
||||
(ORDER*) lex->proc_list.first,
|
||||
select_lex->options | thd->options |
|
||||
select_lex->options | thd->variables.option_bits |
|
||||
setup_tables_done_option,
|
||||
result, unit, select_lex);
|
||||
}
|
||||
@ -1017,7 +1016,7 @@ JOIN::optimize()
|
||||
error= 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
if (!(thd->options & OPTION_BIG_SELECTS) &&
|
||||
if (!(thd->variables.option_bits & OPTION_BIG_SELECTS) &&
|
||||
best_read > (double) thd->variables.max_join_size &&
|
||||
!(select_options & SELECT_DESCRIBE))
|
||||
{ /* purecov: inspected */
|
||||
@ -1505,15 +1504,10 @@ JOIN::optimize()
|
||||
|
||||
if (!(exec_tmp_table1=
|
||||
create_tmp_table(thd, &tmp_table_param, all_fields,
|
||||
tmp_group,
|
||||
group_list ? 0 : select_distinct,
|
||||
tmp_group, group_list ? 0 : select_distinct,
|
||||
group_list && simple_group,
|
||||
select_options,
|
||||
tmp_rows_limit,
|
||||
(char *) "")))
|
||||
{
|
||||
select_options, tmp_rows_limit, "")))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
/*
|
||||
We don't have to store rows in temp table that doesn't match HAVING if:
|
||||
@ -1987,8 +1981,7 @@ JOIN::exec()
|
||||
curr_join->select_distinct &&
|
||||
!curr_join->group_list,
|
||||
1, curr_join->select_options,
|
||||
HA_POS_ERROR,
|
||||
(char *) "")))
|
||||
HA_POS_ERROR, "")))
|
||||
DBUG_VOID_RETURN;
|
||||
curr_join->exec_tmp_table2= exec_tmp_table2;
|
||||
}
|
||||
@ -2834,8 +2827,7 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables_arg, COND *conds,
|
||||
!table->fulltext_searched &&
|
||||
!table->pos_in_table_list->embedding)
|
||||
{
|
||||
if ((table->key_info[key].flags & (HA_NOSAME | HA_END_SPACE_KEY))
|
||||
== HA_NOSAME)
|
||||
if (table->key_info[key].flags & HA_NOSAME)
|
||||
{
|
||||
if (const_ref == eq_part)
|
||||
{ // Found everything for ref.
|
||||
@ -5815,8 +5807,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
|
||||
DBUG_RETURN(0);
|
||||
if (j->type == JT_CONST)
|
||||
j->table->const_table= 1;
|
||||
else if (((keyinfo->flags & (HA_NOSAME | HA_NULL_PART_KEY |
|
||||
HA_END_SPACE_KEY)) != HA_NOSAME) ||
|
||||
else if (((keyinfo->flags & (HA_NOSAME | HA_NULL_PART_KEY)) != HA_NOSAME) ||
|
||||
keyparts != keyinfo->key_parts || null_ref_key)
|
||||
{
|
||||
/* Must read with repeat */
|
||||
@ -9373,7 +9364,7 @@ remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
|
||||
{
|
||||
Field *field=((Item_field*) args[0])->field;
|
||||
if (field->flags & AUTO_INCREMENT_FLAG && !field->table->maybe_null &&
|
||||
(thd->options & OPTION_AUTO_IS_NULL) &&
|
||||
(thd->variables.option_bits & OPTION_AUTO_IS_NULL) &&
|
||||
(thd->first_successful_insert_id_in_prev_stmt > 0 &&
|
||||
thd->substitute_null_with_insert_id))
|
||||
{
|
||||
@ -9923,7 +9914,7 @@ TABLE *
|
||||
create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
ORDER *group, bool distinct, bool save_sum_fields,
|
||||
ulonglong select_options, ha_rows rows_limit,
|
||||
char *table_alias)
|
||||
const char *table_alias)
|
||||
{
|
||||
MEM_ROOT *mem_root_save, own_root;
|
||||
TABLE *table;
|
||||
@ -10238,9 +10229,9 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
|
||||
/* If result table is small; use a heap */
|
||||
/* future: storage engine selection can be made dynamic? */
|
||||
if (blob_count || using_unique_constraint ||
|
||||
(select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) ==
|
||||
OPTION_BIG_TABLES || (select_options & TMP_TABLE_FORCE_MYISAM))
|
||||
if (blob_count || using_unique_constraint
|
||||
|| (thd->variables.big_tables && !(select_options & SELECT_SMALL_RESULT))
|
||||
|| (select_options & TMP_TABLE_FORCE_MYISAM))
|
||||
{
|
||||
share->db_plugin= ha_lock_engine(0, myisam_hton);
|
||||
table->file= get_new_handler(share, &table->mem_root,
|
||||
@ -10567,7 +10558,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
share->db_record_offset= 1;
|
||||
if (share->db_type() == myisam_hton)
|
||||
{
|
||||
if (create_myisam_tmp_table(table,param,select_options))
|
||||
if (create_myisam_tmp_table(table, param, select_options,
|
||||
thd->variables.big_tables))
|
||||
goto err;
|
||||
}
|
||||
if (open_tmp_table(table))
|
||||
@ -10731,7 +10723,7 @@ static bool open_tmp_table(TABLE *table)
|
||||
|
||||
|
||||
static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
|
||||
ulonglong options)
|
||||
ulonglong options, my_bool big_tables)
|
||||
{
|
||||
int error;
|
||||
MI_KEYDEF keydef;
|
||||
@ -10818,8 +10810,7 @@ static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
|
||||
MI_CREATE_INFO create_info;
|
||||
bzero((char*) &create_info,sizeof(create_info));
|
||||
|
||||
if ((options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) ==
|
||||
OPTION_BIG_TABLES)
|
||||
if (big_tables && !(options & SELECT_SMALL_RESULT))
|
||||
create_info.data_file_length= ~(ulonglong) 0;
|
||||
|
||||
if ((error=mi_create(share->table_name.str, share->keys, &keydef,
|
||||
@ -10920,7 +10911,8 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
|
||||
thd_proc_info(thd, "converting HEAP to MyISAM");
|
||||
|
||||
if (create_myisam_tmp_table(&new_table, param,
|
||||
thd->lex->select_lex.options | thd->options))
|
||||
thd->lex->select_lex.options | thd->variables.option_bits,
|
||||
thd->variables.big_tables))
|
||||
goto err2;
|
||||
if (open_tmp_table(&new_table))
|
||||
goto err1;
|
||||
@ -16786,7 +16778,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
|
||||
(ORDER*) first->group_list.first,
|
||||
first->having,
|
||||
(ORDER*) thd->lex->proc_list.first,
|
||||
first->options | thd->options | SELECT_DESCRIBE,
|
||||
first->options | thd->variables.option_bits | SELECT_DESCRIBE,
|
||||
result, unit, first);
|
||||
}
|
||||
DBUG_RETURN(res || thd->is_error());
|
||||
|
Reference in New Issue
Block a user