From: Date: October 8 2008 11:06pm Subject: bzr commit into mysql-6.0 branch (gshchepa:2860) Bug#36006 List-Archive: http://lists.mysql.com/commits/55830 X-Bug: 36006 Message-Id: <20081008210640.3DE3440C945@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT #At file:///work/bzr/mysql-6.0-bugteam/ 2860 Gleb Shchepa 2008-10-09 Cleanup for closed bug #36006: Optimizer does table scan for select count(*) Unnecessary overloading of ha_myisammrg::records() and related stuff have been removed. removed: storage/myisammrg/myrg_records.c modified: storage/myisammrg/CMakeLists.txt storage/myisammrg/Makefile.am storage/myisammrg/ha_myisammrg.cc storage/myisammrg/ha_myisammrg.h === modified file 'storage/myisammrg/CMakeLists.txt' --- a/storage/myisammrg/CMakeLists.txt 2008-06-11 18:14:43 +0000 +++ b/storage/myisammrg/CMakeLists.txt 2008-10-08 21:05:54 +0000 @@ -26,7 +26,7 @@ SET(MYISAMMRG_SOURCES myrg_close.c myrg myrg_locking.c myrg_open.c myrg_panic.c myrg_queue.c myrg_range.c myrg_rfirst.c myrg_rkey.c myrg_rlast.c myrg_rnext.c myrg_rnext_same.c myrg_rprev.c myrg_rrnd.c myrg_rsame.c myrg_static.c myrg_update.c - myrg_write.c myrg_records.c) + myrg_write.c) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(myisammrg ${MYISAMMRG_SOURCES}) === modified file 'storage/myisammrg/Makefile.am' --- a/storage/myisammrg/Makefile.am 2008-04-25 21:45:58 +0000 +++ b/storage/myisammrg/Makefile.am 2008-10-08 21:05:54 +0000 @@ -35,7 +35,7 @@ libmyisammrg_a_SOURCES = myrg_open.c myr myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c \ ha_myisammrg.cc \ - myrg_rnext_same.c myrg_records.c + myrg_rnext_same.c EXTRA_DIST = CMakeLists.txt plug.in === modified file 'storage/myisammrg/ha_myisammrg.cc' --- a/storage/myisammrg/ha_myisammrg.cc 2008-07-24 10:00:56 +0000 +++ b/storage/myisammrg/ha_myisammrg.cc 2008-10-08 21:05:54 +0000 @@ -1339,12 +1339,6 @@ int ha_myisammrg::check(THD* thd, HA_CHE } -ha_rows ha_myisammrg::records() -{ - return myrg_records(file); -} - - extern int myrg_panic(enum ha_panic_function flag); int myisammrg_panic(handlerton *hton, ha_panic_function flag) { === modified file 'storage/myisammrg/ha_myisammrg.h' --- a/storage/myisammrg/ha_myisammrg.h 2008-06-28 11:00:59 +0000 +++ b/storage/myisammrg/ha_myisammrg.h 2008-10-08 21:05:54 +0000 @@ -99,5 +99,4 @@ class ha_myisammrg: public handler TABLE *table_ptr() { return table; } bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes); int check(THD* thd, HA_CHECK_OPT* check_opt); - ha_rows records(); }; === removed file 'storage/myisammrg/myrg_records.c' --- a/storage/myisammrg/myrg_records.c 2008-04-25 21:45:58 +0000 +++ b/storage/myisammrg/myrg_records.c 1970-01-01 00:00:00 +0000 @@ -1,27 +0,0 @@ -/* Copyright (C) 2008 MySQL AB - - 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 - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "myrg_def.h" - -ha_rows myrg_records(MYRG_INFO *info) -{ - ha_rows records=0; - MYRG_TABLE *file; - DBUG_ENTER("myrg_records"); - - for (file=info->open_tables ; file != info->end_table ; file++) - records+= file->table->s->state.state.records; - DBUG_RETURN(records); -}