[Groonga-commit] groonga/groonga at 4479c3f [master] Reduce scope

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Aug 26 17:20:32 JST 2016


Kouhei Sutou	2016-08-26 17:20:32 +0900 (Fri, 26 Aug 2016)

  New Revision: 4479c3fef8f63ae2f68056bb322ad6978e7d1f84
  https://github.com/groonga/groonga/commit/4479c3fef8f63ae2f68056bb322ad6978e7d1f84

  Message:
    Reduce scope

  Modified files:
    plugins/sharding/logical_table_remove.rb

  Modified: plugins/sharding/logical_table_remove.rb (+3 -2)
===================================================================
--- plugins/sharding/logical_table_remove.rb    2016-08-26 17:17:05 +0900 (f77ebbc)
+++ plugins/sharding/logical_table_remove.rb    2016-08-26 17:20:32 +0900 (9f0cf8e)
@@ -71,8 +71,6 @@ module Groonga
           Context.instance.clear_error
         end
 
-        shard_suffix = shard.range_data.to_suffix
-
         referenced_table_ids = []
         if @dependent
           if table
@@ -119,6 +117,9 @@ module Groonga
           end
         end
 
+        return if referenced_table_ids.empty?
+
+        shard_suffix = shard.range_data.to_suffix
         referenced_table_ids.each do |referenced_table_id|
           referenced_table = context[referenced_table_id]
           next if referenced_table.nil?
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index