summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-07-28 10:33:16 +0200
committerSergei Golubchik <serg@mariadb.org>2020-07-28 10:34:49 +0200
commitfcb14a0b53f07984b4a908fe41abc0dcef8aca9d (patch)
tree6dd18d4f6f44c837ca61fa326bfd4d547fc95fad
parentcf98e6b36efda8bba8fa092e59e3ccda9139ac55 (diff)
downloadmariadb-git-10.4-MDEV-21201.tar.gz
cleanup: formatting10.4-MDEV-21201
-rw-r--r--sql/sql_parse.cc2
-rw-r--r--sql/sql_select.cc18
-rw-r--r--sql/sql_show.cc29
-rw-r--r--storage/heap/ha_heap.cc8
4 files changed, 21 insertions, 36 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 9f7cf514ac3..192ba290ce8 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7813,7 +7813,6 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
bool is_com_multi,
bool is_next_command)
{
- int error __attribute__((unused));
DBUG_ENTER("mysql_parse");
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
@@ -7893,6 +7892,7 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
(char *) thd->security_ctx->host_or_ip,
0);
+ int error __attribute__((unused));
error= mysql_execute_command(thd);
MYSQL_QUERY_EXEC_DONE(error);
}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 3e929479d2c..f4d2b68d980 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -18190,8 +18190,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
No need to change table name to lower case as we are only creating
MyISAM, Aria or HEAP tables here
*/
- fn_format(path, path, mysql_tmpdir, "",
- MY_REPLACE_EXT|MY_UNPACK_FILENAME);
+ fn_format(path, path, mysql_tmpdir, "", MY_REPLACE_EXT|MY_UNPACK_FILENAME);
if (group)
{
@@ -19366,14 +19365,10 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
}
}
- if (unlikely((error= maria_create(share->path.str,
- file_type,
- share->keys, &keydef,
- (uint) (*recinfo-start_recinfo),
- start_recinfo,
- share->uniques, &uniquedef,
- &create_info,
- create_flags))))
+ if (unlikely((error= maria_create(share->path.str, file_type, share->keys,
+ &keydef, (uint) (*recinfo-start_recinfo),
+ start_recinfo, share->uniques, &uniquedef,
+ &create_info, create_flags))))
{
table->file->print_error(error,MYF(0)); /* purecov: inspected */
table->db_stat=0;
@@ -19574,8 +19569,7 @@ create_internal_tmp_table_from_heap(THD *thd, TABLE *table,
if (is_duplicate)
*is_duplicate= FALSE;
- if (table->s->db_type() != heap_hton ||
- error != HA_ERR_RECORD_FILE_FULL)
+ if (table->s->db_type() != heap_hton || error != HA_ERR_RECORD_FILE_FULL)
{
/*
We don't want this error to be converted to a warning, e.g. in case of
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 67a1743257e..82ea3bce711 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -8149,7 +8149,7 @@ ST_SCHEMA_TABLE *get_schema_table(enum enum_schema_tables schema_table_idx)
0<decimals<10 and 0<=length<100 .
@param
- thd thread handler
+ thd thread handler
@param table_list Used to pass I_S table information(fields info, tables
parameters etc) and table name.
@@ -8273,11 +8273,10 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
tmp_table_param->schema_table= 1;
SELECT_LEX *select_lex= table_list->select_lex;
bool keep_row_order= is_show_command(thd);
- if (!(table= create_tmp_table(thd, tmp_table_param,
- field_list, (ORDER*) 0, 0, 0,
- (select_lex->options | thd->variables.option_bits |
- TMP_TABLE_ALL_COLUMNS), HA_POS_ERROR,
- &table_list->alias, false, keep_row_order)))
+ if (!(table= create_tmp_table(thd, tmp_table_param, field_list, (ORDER*) 0, 0,
+ 0, (select_lex->options | thd->variables.option_bits |
+ TMP_TABLE_ALL_COLUMNS), HA_POS_ERROR,
+ &table_list->alias, !need_all_fieds, keep_row_order)))
DBUG_RETURN(0);
my_bitmap_map* bitmaps=
(my_bitmap_map*) thd->alloc(bitmap_buffer_size(field_count));
@@ -8799,10 +8798,10 @@ bool optimize_schema_tables_reads(JOIN *join)
cond= tab->cache_select->cond;
}
if (optimize_for_get_all_tables(thd, table_list, cond))
- DBUG_RETURN(TRUE); // Handle OOM
+ DBUG_RETURN(1); // Handle OOM
}
}
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(0);
}
@@ -8867,13 +8866,10 @@ bool get_schema_tables_result(JOIN *join,
continue;
/*
- If schema table is already processed and
- the statement is not a subselect then
- we don't need to fill this table again.
- If schema table is already processed and
- schema_table_state != executed_place then
- table is already processed and
- we should skip second data processing.
+ If schema table is already processed and the statement is not a
+ subselect then we don't need to fill this table again. If schema table
+ is already processed and schema_table_state != executed_place then
+ table is already processed and we should skip second data processing.
*/
if (table_list->schema_table_state &&
(!is_subselect || table_list->schema_table_state != executed_place))
@@ -8935,8 +8931,7 @@ bool get_schema_tables_result(JOIN *join,
It also means that an audit plugin cannot process the error correctly
either. See also thd->clear_error()
*/
- thd->get_stmt_da()->push_warning(thd,
- thd->get_stmt_da()->sql_errno(),
+ thd->get_stmt_da()->push_warning(thd, thd->get_stmt_da()->sql_errno(),
thd->get_stmt_da()->get_sqlstate(),
Sql_condition::WARN_LEVEL_ERROR,
thd->get_stmt_da()->message());
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 1fc5740db88..ff5bb4b3ec4 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -26,12 +26,8 @@
#include "ha_heap.h"
#include "sql_base.h" // enum_tdc_remove_table_type
-static handler *heap_create_handler(handlerton *hton,
- TABLE_SHARE *table,
- MEM_ROOT *mem_root);
-static int
-heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
- HP_CREATE_INFO *hp_create_info);
+static handler *heap_create_handler(handlerton *, TABLE_SHARE *, MEM_ROOT *);
+static int heap_prepare_hp_create_info(TABLE *, bool, HP_CREATE_INFO *);
int heap_panic(handlerton *hton, ha_panic_function flag)