summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-07-01 09:48:36 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-07-01 09:48:36 +0300
commit045771c05099cf75fea036fdc89308eb3c06549a (patch)
tree181142185d3a7a612ab0ad238c938ae1e6111131 /sql/sql_statistics.cc
parent6dc1bc3a5822007cdb2d5b79f0a37b4d6b9b65c7 (diff)
downloadmariadb-git-045771c05099cf75fea036fdc89308eb3c06549a.tar.gz
Fix most clang-15 -Wunused-but-set-variable
Also, refactor trx_i_s_common_fill_table() to remove dead code. Warnings about yynerrs in Bison-generated yyparse() will remain for now.
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 721b2de75a3..5e31034847e 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -1,5 +1,5 @@
/* Copyright (C) 2009 MySQL AB
- Copyright (c) 2019, 2020, MariaDB Corporation.
+ Copyright (c) 2019, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2483,7 +2483,6 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index)
{
int rc= 0;
KEY *key_info= &table->key_info[index];
- ha_rows rows= 0;
DBUG_ENTER("collect_statistics_for_index");
@@ -2518,7 +2517,6 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index)
if (rc)
break;
- rows++;
index_prefix_calc.add();
rc= table->file->ha_index_next(table->record[0]);
}