[Commits] 2ef3e86: removed non-working code

OleksandrByelkin sanja at mariadb.com
Fri Dec 18 13:23:31 EET 2015


revision-id: 2ef3e867b8924e134204b0cd6da39a97526469b7 (mariadb-10.1.9-21-g2ef3e86)
parent(s): aa67fa247f9758b8361a79fb560ad44ef02397d3
committer: Oleksandr Byelkin
timestamp: 2015-12-18 12:23:31 +0100
message:

removed non-working code

---
 sql/sql_admin.cc | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 7d3d96b..d8ca863 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -691,8 +691,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
         compl_result_code= result_code= HA_ADMIN_INVALID;
       }
 
-      uint elements= 0;
-
       if (!lex->column_list)
       {
         bitmap_clear_all(tab->read_set);
@@ -701,10 +699,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
           enum enum_field_types type= (*field_ptr)->type();
           if (type < MYSQL_TYPE_MEDIUM_BLOB ||
               type > MYSQL_TYPE_BLOB)
-          {
             bitmap_set_bit(tab->read_set, fields);
-            elements++;
-          }
           else
             push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
                                ER_NO_EIS_FOR_FIELD,
@@ -732,10 +727,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
           enum enum_field_types type= tab->field[pos]->type();
           if (type < MYSQL_TYPE_MEDIUM_BLOB ||
               type > MYSQL_TYPE_BLOB)
-          {
             bitmap_set_bit(tab->read_set, pos);
-            elements++;
-          }
           else
             push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
                                ER_NO_EIS_FOR_FIELD,
@@ -748,7 +740,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
       if (!lex->index_list)
       {
         tab->keys_in_use_for_query.init(tab->s->keys);
-        elements+= tab->s->keys;
       }
       else
       {
@@ -767,11 +758,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
             break;
           }
           tab->keys_in_use_for_query.set_bit(--pos);
-          elements++;
         }  
       }
-      if (unlikely(!elements && result_code == HA_ADMIN_OK))
-        result_code= HA_ADMIN_ALREADY_DONE;
     }
 
     if (result_code == HA_ADMIN_OK)


More information about the commits mailing list