def check_index_exists(manager, table_name, index_name):
 query = 'SELECT 1 FROM information_schema.statistics WHERE table_schema = %s AND table_name = %s AND index_name = %s'
 rows = manager.execute(query, manager.get_db_name(), table_name, index_name)
 return bool(rows)

def check_index_exists ( manager , table_name , index_name ) : query = 'SELECT 1 FROM information_schema.statistics WHERE table_schema = %s AND table_name = %s AND index_name = %s' rows = manager . execute ( query , manager . get_db_name ( ) , table_name , index_name ) return bool ( rows )
checks if a particular index exists on the table .