acts_as_nested_interval 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -181,7 +181,7 @@ This might change once the AR identity_map is finished.
181
181
  Acknowledgement: http://arxiv.org/html/cs.DB/0401014 by Vadim Tropashko.
182
182
 
183
183
  https://github.com/pythonic
184
+ https://github.com/klobuczek
184
185
  https://github.com/clyfe
185
186
  https://github.com/quangquach
186
187
  https://github.com/kidlab
187
- https://github.com/klobuczek
@@ -127,31 +127,33 @@ module ActsAsNestedInterval
127
127
  else # child move
128
128
  set_nested_interval *parent.next_child_lft
129
129
  end
130
- mysql_tmp = "@" if ["MySQL", "Mysql2"].include?(connection.adapter_name)
131
130
  cpp = db_self.lftq * rgtp - db_self.rgtq * lftp
132
131
  cpq = db_self.rgtp * lftp - db_self.lftp * rgtp
133
132
  cqp = db_self.lftq * rgtq - db_self.rgtq * lftq
134
133
  cqq = db_self.rgtp * lftq - db_self.lftp * rgtq
135
134
 
136
135
  updates = {}
137
- vars = [:lftp, :lftq]
138
- newval = ->(p, q, side) { "#{p} * #{mysql_tmp}#{side}p + #{q} * #{mysql_tmp}#{side}q" }
136
+ vars = Set.new
137
+ mysql = ["MySQL", "Mysql2"].include?(connection.adapter_name)
138
+ var = ->(v) { mysql ? vars.add?(v) ? "(@#{v} := #{v})" : "@#{v}" : v }
139
+ multiply = ->(c, b) { "#{c} * #{var.(b)}" }
140
+ add = ->(a, b) { "#{a} + #{b}" }
141
+ one = sprintf("%#.30f", 1)
142
+ divide = ->(p, q) { "#{one} * (#{p}) / (#{q})" }
139
143
 
140
144
  if has_attribute?(:rgtp) && has_attribute?(:rgtq)
141
- updates[:rgtp] = newval.(cpp, cpq, :rgt)
142
- updates[:rgtq] = newval.(cqp, cqq, :rgt)
143
- vars += [:rgtp, :rgtq]
144
- updates[:rgt] = "1.0 * (#{updates[:rgtp]}) / (#{updates[:rgtq]})" if has_attribute?(:rgt)
145
+ updates[:rgtp] = -> { add.(multiply.(cpp, :rgtp), multiply.(cpq, :rgtq)) }
146
+ updates[:rgtq] = -> { add.(multiply.(cqp, :rgtp), multiply.(cqq, :rgtq)) }
147
+ updates[:rgt] = -> { divide.(updates[:rgtp].(), updates[:rgtq].()) } if has_attribute?(:rgt)
145
148
  end
146
149
 
147
- updates[:lftp] = newval.(cpp, cpq, :lft)
148
- updates[:lftq] = newval.(cqp, cqq, :lft)
149
- updates[:lft] = "1.0 * (#{updates[:lftp]}) / (#{updates[:lftq]})" if has_attribute?(:lft)
150
+ updates[:lftp] = -> { add.(multiply.(cpp, :lftp), multiply.(cpq, :lftq)) }
151
+ updates[:lftq] = -> { add.(multiply.(cqp, :lftp), multiply.(cqq, :lftq)) }
152
+ updates[:lft] = -> { divide.(updates[:lftp].(), updates[:lftq].()) } if has_attribute?(:lft)
150
153
 
151
- sql = updates.map{ |k, v| "#{k} = #{v}"}.join(', ')
152
- if_vars = mysql_tmp && vars.map { |name| "(@#{name} := #{name})" }.join(' AND ')
153
-
154
- db_self.descendants.update_all sql, if_vars
154
+ sql = updates.map { |k, v| "#{k} = #{v.()}" }.join(', ')
155
+
156
+ db_self.descendants.update_all sql
155
157
  end
156
158
 
157
159
  def ancestor_of?(node)
@@ -1,3 +1,3 @@
1
1
  module ActsAsNestedInterval
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -153,6 +153,20 @@ class ActsAsNestedIntervalTest < ActiveSupport::TestCase
153
153
  assert_equal 5, earth.reload.descendants.count
154
154
  end
155
155
 
156
+ def test_database_precision
157
+ root = Region.create name: 'root'
158
+ l1=Region.create(name: 'l1', parent: root)
159
+ l2=Region.create(name: 'l2', parent: l1)
160
+ l3=Region.create(name: 'l3', parent: l2)
161
+ l4=Region.create(name: 'l4', parent: l3)
162
+ l3.parent = l1
163
+ l3.save!
164
+ #make sure database calculates with the same precision as ruby
165
+ #l3.rgt is calculated by ruby, but l4.rgt is calculated by the database
166
+ #the difference is only visible with rgt as double
167
+ assert_equal 2, Region.where("abs(rgt - (select rgt from regions where id =#{l3.id})) < 1e-16").count
168
+ end
169
+
156
170
  def test_destroy
157
171
  earth = Region.create name: "Earth"
158
172
  oceania = Region.create name: "Oceania", parent: earth
Binary file
@@ -0,0 +1,6 @@
1
+ class ChangeIntervalPrecision < ActiveRecord::Migration
2
+ def change
3
+ change_column :regions, :lft, :decimal, precision: 31, scale: 30, null: false
4
+ change_column :regions, :rgt, :decimal, precision: 31, scale: 30, null: false
5
+ end
6
+ end
@@ -11,18 +11,18 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120302143528) do
14
+ ActiveRecord::Schema.define(:version => 20121004204252) do
15
15
 
16
16
  create_table "regions", :force => true do |t|
17
- t.boolean "fiction", :default => false, :null => false
17
+ t.boolean "fiction", :default => false, :null => false
18
18
  t.integer "region_id"
19
- t.integer "lftp", :null => false
20
- t.integer "lftq", :null => false
21
- t.integer "rgtp", :null => false
22
- t.integer "rgtq", :null => false
23
- t.float "lft", :null => false
24
- t.float "rgt", :null => false
25
- t.string "name", :null => false
19
+ t.integer "lftp", :null => false
20
+ t.integer "lftq", :null => false
21
+ t.integer "rgtp", :null => false
22
+ t.integer "rgtq", :null => false
23
+ t.decimal "lft", :precision => 31, :scale => 30, :null => false
24
+ t.decimal "rgt", :precision => 31, :scale => 30, :null => false
25
+ t.string "name", :null => false
26
26
  end
27
27
 
28
28
  end
@@ -236,3 +236,56 @@ Migrating to CreateRegions (20120302143528)
236
236
   (156.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
237
237
   (0.2ms) SELECT version FROM "schema_migrations"
238
238
   (154.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
239
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
240
+ Migrating to CreateRegions (20120302143528)
241
+ Migrating to ChangeIntervalPrecision (20121004204252)
242
+  (0.2ms) select sqlite_version(*)
243
+  (0.1ms) begin transaction
244
+  (0.5ms) CREATE TEMPORARY TABLE "altered_regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL)
245
+  (0.1ms) PRAGMA index_list("regions")
246
+  (0.1ms) SELECT * FROM "regions"
247
+  (0.2ms) DROP TABLE "regions"
248
+  (0.2ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL)
249
+  (0.0ms) PRAGMA index_list("altered_regions")
250
+  (0.1ms) SELECT * FROM "altered_regions"
251
+  (55.4ms) DROP TABLE "altered_regions"
252
+  (0.2ms) CREATE TEMPORARY TABLE "altered_regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL)
253
+  (0.0ms) PRAGMA index_list("regions")
254
+  (0.1ms) SELECT * FROM "regions"
255
+  (0.1ms) DROP TABLE "regions"
256
+  (0.1ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL)
257
+  (0.0ms) PRAGMA index_list("altered_regions")
258
+  (0.1ms) SELECT * FROM "altered_regions"
259
+  (0.1ms) DROP TABLE "altered_regions"
260
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121004204252')
261
+  (268.2ms) commit transaction
262
+  (0.3ms) select sqlite_version(*)
263
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
264
+  (0.0ms) PRAGMA index_list("regions")
265
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
266
+  (0.2ms) select sqlite_version(*)
267
+  (180.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL) 
268
+  (165.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
269
+  (0.1ms) PRAGMA index_list("schema_migrations")
270
+  (166.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
271
+  (0.2ms) SELECT version FROM "schema_migrations"
272
+  (143.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20121004204252')
273
+  (145.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
274
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
275
+  (0.2ms) select sqlite_version(*)
276
+  (172.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL) 
277
+  (166.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
278
+  (0.2ms) PRAGMA index_list("schema_migrations")
279
+  (189.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
280
+  (0.1ms) SELECT version FROM "schema_migrations"
281
+  (166.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20121004204252')
282
+  (156.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
283
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
284
+  (0.2ms) select sqlite_version(*)
285
+  (182.0ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL) 
286
+  (156.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
287
+  (0.1ms) PRAGMA index_list("schema_migrations")
288
+  (189.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
289
+  (0.2ms) SELECT version FROM "schema_migrations"
290
+  (243.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20121004204252')
291
+  (211.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
@@ -32181,3 +32181,1377 @@ SQLite3::SQLException: near "lft": syntax error: UPDATE "regions" SET
32181
32181
  SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "3"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
32182
32182
   (0.0ms) RELEASE SAVEPOINT active_record_1
32183
32183
   (0.1ms) rollback transaction
32184
+  (0.1ms) begin transaction
32185
+  (0.1ms) SAVEPOINT active_record_1
32186
+ SQL (4.5ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32187
+  (0.2ms) RELEASE SAVEPOINT active_record_1
32188
+  (0.1ms) SAVEPOINT active_record_1
32189
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32190
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32191
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32192
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32193
+  (0.1ms) SAVEPOINT active_record_1
32194
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32195
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32196
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32197
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32198
+  (0.0ms) SAVEPOINT active_record_1
32199
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32200
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32201
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32202
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32203
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1)
32204
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 1 AND lftp = 0)
32205
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 2 AND lftp = 1 OR lftq = 1 AND lftp = 0)
32206
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 2 AND lftp = 1 OR lftq = 1 AND lftp = 0)
32207
+  (0.1ms) rollback transaction
32208
+  (0.0ms) begin transaction
32209
+  (0.0ms) SAVEPOINT active_record_1
32210
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32211
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32212
+  (0.0ms) SAVEPOINT active_record_1
32213
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = 1 LIMIT 1
32214
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32215
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32216
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32217
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32218
+  (0.1ms) rollback transaction
32219
+  (0.0ms) begin transaction
32220
+  (0.0ms) SAVEPOINT active_record_1
32221
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32222
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32223
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32224
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32225
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32226
+  (0.1ms) rollback transaction
32227
+  (0.0ms) begin transaction
32228
+  (0.0ms) SAVEPOINT active_record_1
32229
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32230
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32231
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" IS NULL
32232
+  (0.1ms) rollback transaction
32233
+  (0.0ms) begin transaction
32234
+  (0.0ms) SAVEPOINT active_record_1
32235
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32236
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32237
+  (0.0ms) SAVEPOINT active_record_1
32238
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32239
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32240
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32241
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32242
+  (0.1ms) SAVEPOINT active_record_1
32243
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32244
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32245
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32246
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32247
+  (0.0ms) SAVEPOINT active_record_1
32248
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32249
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32250
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32251
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32252
+  (0.1ms) rollback transaction
32253
+  (0.0ms) begin transaction
32254
+  (0.0ms) SAVEPOINT active_record_1
32255
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "root"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32256
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32257
+  (0.0ms) SAVEPOINT active_record_1
32258
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32259
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32260
+ SQL (0.4ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "l1"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32261
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32262
+  (0.2ms) SAVEPOINT active_record_1
32263
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32264
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32265
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "l2"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32266
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32267
+  (0.0ms) SAVEPOINT active_record_1
32268
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32269
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
32270
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.75], ["lftp", 3], ["lftq", 4], ["name", "l3"], ["region_id", 3], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32271
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32272
+  (0.1ms) SAVEPOINT active_record_1
32273
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32274
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 4 ORDER BY lftq DESC LIMIT 1
32275
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.8], ["lftp", 4], ["lftq", 5], ["name", "l4"], ["region_id", 4], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32276
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32277
+  (0.0ms) SAVEPOINT active_record_1
32278
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32279
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32280
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32281
+ SQL (0.2ms) UPDATE "regions" SET rgtp = 5 * rgtp + -3 * rgtq, rgtq = 7 * rgtp + -4 * rgtq, rgt = 1.000000000000000000000000000000*(5 * rgtp + -3 * rgtq)/(7 * rgtp + -4 * rgtq), lftp = 5 * lftp + -3 * lftq, lftq = 7 * lftp + -4 * lftq, lft = 1.000000000000000000000000000000*(5 * lftp + -3 * lftq)/(7 * lftp + -4 * lftq) WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
32282
+ "regions".lft BETWEEN 0.75 AND 1.0
32283
+ )
32284
+  (0.1ms) UPDATE "regions" SET "region_id" = 2, "lftq" = 5, "rgtp" = 2, "rgtq" = 3, "lft" = 0.6, "rgt" = 0.6666666666666666 WHERE "regions"."id" = 4
32285
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32286
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE (abs(rgt - (select rgt from regions where id =4)) < 1e-16)
32287
+  (0.1ms) rollback transaction
32288
+  (0.0ms) begin transaction
32289
+  (0.0ms) SAVEPOINT active_record_1
32290
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32291
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32292
+  (0.0ms) SAVEPOINT active_record_1
32293
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32294
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32295
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32296
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32297
+  (0.0ms) SAVEPOINT active_record_1
32298
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32299
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32300
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32301
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32302
+  (0.0ms) SAVEPOINT active_record_1
32303
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32304
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32305
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32306
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32307
+  (0.1ms) rollback transaction
32308
+  (0.0ms) begin transaction
32309
+  (0.0ms) SAVEPOINT active_record_1
32310
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32311
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32312
+  (0.0ms) SAVEPOINT active_record_1
32313
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32314
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32315
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32316
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32317
+  (0.0ms) SAVEPOINT active_record_1
32318
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32319
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32320
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32321
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32322
+  (0.0ms) SAVEPOINT active_record_1
32323
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32324
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32325
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32326
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32327
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 0 < "regions".lftp AND
32328
+ "regions".lft BETWEEN 0.0 AND 1.0
32329
+ )
32330
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
32331
+ "regions".lft BETWEEN 0.5 AND 1.0
32332
+ )
32333
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
32334
+ "regions".lft BETWEEN 0.6666666666666666 AND 1.0
32335
+ )
32336
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
32337
+ "regions".lft BETWEEN 0.6 AND 0.6666666666666666
32338
+ )
32339
+  (0.1ms) rollback transaction
32340
+  (0.0ms) begin transaction
32341
+  (0.0ms) SAVEPOINT active_record_1
32342
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32343
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32344
+  (0.0ms) SAVEPOINT active_record_1
32345
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32346
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32347
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32348
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32349
+  (0.0ms) SAVEPOINT active_record_1
32350
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32351
+ Region Load (0.7ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32352
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32353
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32354
+  (0.0ms) SAVEPOINT active_record_1
32355
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32356
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32357
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32358
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32359
+  (0.0ms) SAVEPOINT active_record_1
32360
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."region_id" = 2
32361
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
32362
+  (0.4ms) rollback transaction
32363
+  (0.1ms) begin transaction
32364
+  (0.1ms) SAVEPOINT active_record_1
32365
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", ""], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32366
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32367
+  (0.0ms) SAVEPOINT active_record_1
32368
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32369
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32370
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", ""], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32371
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32372
+  (0.0ms) SAVEPOINT active_record_1
32373
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32374
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32375
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", ""], ["region_id", 1], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32376
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32377
+  (0.0ms) SAVEPOINT active_record_1
32378
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32379
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
32380
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.4], ["lftp", 2], ["lftq", 5], ["name", ""], ["region_id", 3], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32381
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32382
+  (0.0ms) SAVEPOINT active_record_1
32383
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32384
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
32385
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.375], ["lftp", 3], ["lftq", 8], ["name", ""], ["region_id", 3], ["rgt", 0.4], ["rgtp", 2], ["rgtq", 5]]
32386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32387
+  (0.0ms) SAVEPOINT active_record_1
32388
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
32389
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
32390
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38461538461538464], ["lftp", 5], ["lftq", 13], ["name", ""], ["region_id", 5], ["rgt", 0.4], ["rgtp", 2], ["rgtq", 5]]
32391
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32392
+  (0.0ms) SAVEPOINT active_record_1
32393
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
32394
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
32395
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38095238095238093], ["lftp", 8], ["lftq", 21], ["name", ""], ["region_id", 5], ["rgt", 0.38461538461538464], ["rgtp", 5], ["rgtq", 13]]
32396
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32397
+  (0.0ms) SAVEPOINT active_record_1
32398
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 7]]
32399
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 7 ORDER BY lftq DESC LIMIT 1
32400
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38235294117647056], ["lftp", 13], ["lftq", 34], ["name", ""], ["region_id", 7], ["rgt", 0.38461538461538464], ["rgtp", 5], ["rgtq", 13]]
32401
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32402
+  (0.0ms) SAVEPOINT active_record_1
32403
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 7]]
32404
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 7 ORDER BY lftq DESC LIMIT 1
32405
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38181818181818183], ["lftp", 21], ["lftq", 55], ["name", ""], ["region_id", 7], ["rgt", 0.38235294117647056], ["rgtp", 13], ["rgtq", 34]]
32406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32407
+  (0.0ms) SAVEPOINT active_record_1
32408
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 9]]
32409
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 9 ORDER BY lftq DESC LIMIT 1
32410
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38202247191011235], ["lftp", 34], ["lftq", 89], ["name", ""], ["region_id", 9], ["rgt", 0.38235294117647056], ["rgtp", 13], ["rgtq", 34]]
32411
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32412
+  (0.0ms) SAVEPOINT active_record_1
32413
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 9]]
32414
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 9 ORDER BY lftq DESC LIMIT 1
32415
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819444444444444], ["lftp", 55], ["lftq", 144], ["name", ""], ["region_id", 9], ["rgt", 0.38202247191011235], ["rgtp", 34], ["rgtq", 89]]
32416
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32417
+  (0.0ms) SAVEPOINT active_record_1
32418
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 11]]
32419
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 11 ORDER BY lftq DESC LIMIT 1
32420
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38197424892703863], ["lftp", 89], ["lftq", 233], ["name", ""], ["region_id", 11], ["rgt", 0.38202247191011235], ["rgtp", 34], ["rgtq", 89]]
32421
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32422
+  (0.0ms) SAVEPOINT active_record_1
32423
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 11]]
32424
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 11 ORDER BY lftq DESC LIMIT 1
32425
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819628647214854], ["lftp", 144], ["lftq", 377], ["name", ""], ["region_id", 11], ["rgt", 0.38197424892703863], ["rgtp", 89], ["rgtq", 233]]
32426
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32427
+  (0.0ms) SAVEPOINT active_record_1
32428
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 13]]
32429
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 13 ORDER BY lftq DESC LIMIT 1
32430
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819672131147541], ["lftp", 233], ["lftq", 610], ["name", ""], ["region_id", 13], ["rgt", 0.38197424892703863], ["rgtp", 89], ["rgtq", 233]]
32431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32432
+  (0.0ms) SAVEPOINT active_record_1
32433
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 13]]
32434
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 13 ORDER BY lftq DESC LIMIT 1
32435
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819655521783181], ["lftp", 377], ["lftq", 987], ["name", ""], ["region_id", 13], ["rgt", 0.3819672131147541], ["rgtp", 233], ["rgtq", 610]]
32436
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32437
+  (0.0ms) SAVEPOINT active_record_1
32438
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 15]]
32439
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 15 ORDER BY lftq DESC LIMIT 1
32440
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196618659987475], ["lftp", 610], ["lftq", 1597], ["name", ""], ["region_id", 15], ["rgt", 0.3819672131147541], ["rgtp", 233], ["rgtq", 610]]
32441
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32442
+  (0.0ms) SAVEPOINT active_record_1
32443
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 15]]
32444
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 15 ORDER BY lftq DESC LIMIT 1
32445
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196594427244585], ["lftp", 987], ["lftq", 2584], ["name", ""], ["region_id", 15], ["rgt", 0.38196618659987475], ["rgtp", 610], ["rgtq", 1597]]
32446
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32447
+  (0.0ms) SAVEPOINT active_record_1
32448
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 17]]
32449
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 17 ORDER BY lftq DESC LIMIT 1
32450
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196603683329344], ["lftp", 1597], ["lftq", 4181], ["name", ""], ["region_id", 17], ["rgt", 0.38196618659987475], ["rgtp", 610], ["rgtq", 1597]]
32451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32452
+  (0.0ms) SAVEPOINT active_record_1
32453
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 17]]
32454
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 17 ORDER BY lftq DESC LIMIT 1
32455
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660014781966], ["lftp", 2584], ["lftq", 6765], ["name", ""], ["region_id", 17], ["rgt", 0.38196603683329344], ["rgtp", 1597], ["rgtq", 4181]]
32456
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32457
+  (0.0ms) SAVEPOINT active_record_1
32458
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 19]]
32459
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 19 ORDER BY lftq DESC LIMIT 1
32460
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601498264204], ["lftp", 4181], ["lftq", 10946], ["name", ""], ["region_id", 19], ["rgt", 0.38196603683329344], ["rgtp", 1597], ["rgtq", 4181]]
32461
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32462
+  (0.0ms) SAVEPOINT active_record_1
32463
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 19]]
32464
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 19 ORDER BY lftq DESC LIMIT 1
32465
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196600982440293], ["lftp", 6765], ["lftq", 17711], ["name", ""], ["region_id", 19], ["rgt", 0.38196601498264204], ["rgtp", 4181], ["rgtq", 10946]]
32466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32467
+  (0.0ms) SAVEPOINT active_record_1
32468
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 21]]
32469
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 21 ORDER BY lftq DESC LIMIT 1
32470
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601179467493], ["lftp", 10946], ["lftq", 28657], ["name", ""], ["region_id", 21], ["rgt", 0.38196601498264204], ["rgtp", 4181], ["rgtq", 10946]]
32471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32472
+  (0.0ms) SAVEPOINT active_record_1
32473
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 21]]
32474
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 21 ORDER BY lftq DESC LIMIT 1
32475
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.381966011042098], ["lftp", 17711], ["lftq", 46368], ["name", ""], ["region_id", 21], ["rgt", 0.38196601179467493], ["rgtp", 10946], ["rgtq", 28657]]
32476
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32477
+  (0.0ms) SAVEPOINT active_record_1
32478
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 23]]
32479
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 23 ORDER BY lftq DESC LIMIT 1
32480
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660113295568], ["lftp", 28657], ["lftq", 75025], ["name", ""], ["region_id", 23], ["rgt", 0.38196601179467493], ["rgtp", 10946], ["rgtq", 28657]]
32481
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32482
+  (0.0ms) SAVEPOINT active_record_1
32483
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 23]]
32484
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 23 ORDER BY lftq DESC LIMIT 1
32485
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112197573], ["lftp", 46368], ["lftq", 121393], ["name", ""], ["region_id", 23], ["rgt", 0.3819660113295568], ["rgtp", 28657], ["rgtq", 75025]]
32486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32487
+  (0.0ms) SAVEPOINT active_record_1
32488
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 25]]
32489
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 25 ORDER BY lftq DESC LIMIT 1
32490
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.381966011261697], ["lftp", 75025], ["lftq", 196418], ["name", ""], ["region_id", 25], ["rgt", 0.3819660113295568], ["rgtp", 28657], ["rgtq", 75025]]
32491
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32492
+  (0.0ms) SAVEPOINT active_record_1
32493
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 25]]
32494
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 25 ORDER BY lftq DESC LIMIT 1
32495
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112456775], ["lftp", 121393], ["lftq", 317811], ["name", ""], ["region_id", 25], ["rgt", 0.381966011261697], ["rgtp", 75025], ["rgtq", 196418]]
32496
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32497
+  (0.0ms) SAVEPOINT active_record_1
32498
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 27]]
32499
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 27 ORDER BY lftq DESC LIMIT 1
32500
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125179636], ["lftp", 196418], ["lftq", 514229], ["name", ""], ["region_id", 27], ["rgt", 0.381966011261697], ["rgtp", 75025], ["rgtq", 196418]]
32501
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32502
+  (0.0ms) SAVEPOINT active_record_1
32503
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 27]]
32504
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 27 ORDER BY lftq DESC LIMIT 1
32505
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601124945917], ["lftp", 317811], ["lftq", 832040], ["name", ""], ["region_id", 27], ["rgt", 0.38196601125179636], ["rgtp", 196418], ["rgtq", 514229]]
32506
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32507
+  (0.0ms) SAVEPOINT active_record_1
32508
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 29]]
32509
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 29 ORDER BY lftq DESC LIMIT 1
32510
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112503519], ["lftp", 514229], ["lftq", 1346269], ["name", ""], ["region_id", 29], ["rgt", 0.38196601125179636], ["rgtp", 196418], ["rgtq", 514229]]
32511
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32512
+  (0.0ms) SAVEPOINT active_record_1
32513
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 29]]
32514
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 29 ORDER BY lftq DESC LIMIT 1
32515
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112500109], ["lftp", 832040], ["lftq", 2178309], ["name", ""], ["region_id", 29], ["rgt", 0.3819660112503519], ["rgtp", 514229], ["rgtq", 1346269]]
32516
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32517
+  (0.0ms) SAVEPOINT active_record_1
32518
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 31]]
32519
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 31 ORDER BY lftq DESC LIMIT 1
32520
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501411], ["lftp", 1346269], ["lftq", 3524578], ["name", ""], ["region_id", 31], ["rgt", 0.3819660112503519], ["rgtp", 514229], ["rgtq", 1346269]]
32521
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32522
+  (0.0ms) SAVEPOINT active_record_1
32523
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 31]]
32524
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 31 ORDER BY lftq DESC LIMIT 1
32525
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112500914], ["lftp", 2178309], ["lftq", 5702887], ["name", ""], ["region_id", 31], ["rgt", 0.3819660112501411], ["rgtp", 1346269], ["rgtq", 3524578]]
32526
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32527
+  (0.0ms) SAVEPOINT active_record_1
32528
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 33]]
32529
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 33 ORDER BY lftq DESC LIMIT 1
32530
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501104], ["lftp", 3524578], ["lftq", 9227465], ["name", ""], ["region_id", 33], ["rgt", 0.3819660112501411], ["rgtp", 1346269], ["rgtq", 3524578]]
32531
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32532
+  (0.0ms) SAVEPOINT active_record_1
32533
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 33]]
32534
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 33 ORDER BY lftq DESC LIMIT 1
32535
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010315], ["lftp", 5702887], ["lftq", 14930352], ["name", ""], ["region_id", 33], ["rgt", 0.3819660112501104], ["rgtp", 3524578], ["rgtq", 9227465]]
32536
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32537
+  (0.0ms) SAVEPOINT active_record_1
32538
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 35]]
32539
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 35 ORDER BY lftq DESC LIMIT 1
32540
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010593], ["lftp", 9227465], ["lftq", 24157817], ["name", ""], ["region_id", 35], ["rgt", 0.3819660112501104], ["rgtp", 3524578], ["rgtq", 9227465]]
32541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32542
+  (0.0ms) SAVEPOINT active_record_1
32543
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 35]]
32544
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 35 ORDER BY lftq DESC LIMIT 1
32545
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501049], ["lftp", 14930352], ["lftq", 39088169], ["name", ""], ["region_id", 35], ["rgt", 0.38196601125010593], ["rgtp", 9227465], ["rgtq", 24157817]]
32546
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32547
+  (0.0ms) SAVEPOINT active_record_1
32548
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 37]]
32549
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 37 ORDER BY lftq DESC LIMIT 1
32550
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010526], ["lftp", 24157817], ["lftq", 63245986], ["name", ""], ["region_id", 37], ["rgt", 0.38196601125010593], ["rgtp", 9227465], ["rgtq", 24157817]]
32551
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32552
+  (0.0ms) SAVEPOINT active_record_1
32553
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 37]]
32554
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 37 ORDER BY lftq DESC LIMIT 1
32555
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501051], ["lftp", 39088169], ["lftq", 102334155], ["name", ""], ["region_id", 37], ["rgt", 0.38196601125010526], ["rgtp", 24157817], ["rgtq", 63245986]]
32556
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32557
+  (0.0ms) SAVEPOINT active_record_1
32558
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 39]]
32559
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 39 ORDER BY lftq DESC LIMIT 1
32560
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 63245986], ["lftq", 165580141], ["name", ""], ["region_id", 39], ["rgt", 0.38196601125010526], ["rgtp", 24157817], ["rgtq", 63245986]]
32561
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32562
+  (0.0ms) SAVEPOINT active_record_1
32563
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 39]]
32564
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 39 ORDER BY lftq DESC LIMIT 1
32565
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 102334155], ["lftq", 267914296], ["name", ""], ["region_id", 39], ["rgt", 0.38196601125010515], ["rgtp", 63245986], ["rgtq", 165580141]]
32566
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32567
+  (0.0ms) SAVEPOINT active_record_1
32568
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 41]]
32569
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 41 ORDER BY lftq DESC LIMIT 1
32570
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 165580141], ["lftq", 433494437], ["name", ""], ["region_id", 41], ["rgt", 0.38196601125010515], ["rgtp", 63245986], ["rgtq", 165580141]]
32571
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32572
+  (0.0ms) SAVEPOINT active_record_1
32573
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 41]]
32574
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 41 ORDER BY lftq DESC LIMIT 1
32575
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 267914296], ["lftq", 701408733], ["name", ""], ["region_id", 41], ["rgt", 0.38196601125010515], ["rgtp", 165580141], ["rgtq", 433494437]]
32576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32577
+  (0.0ms) SAVEPOINT active_record_1
32578
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 43]]
32579
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 43 ORDER BY lftq DESC LIMIT 1
32580
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 433494437], ["lftq", 1134903170], ["name", ""], ["region_id", 43], ["rgt", 0.38196601125010515], ["rgtp", 165580141], ["rgtq", 433494437]]
32581
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32582
+  (0.0ms) SAVEPOINT active_record_1
32583
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 43]]
32584
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 43 ORDER BY lftq DESC LIMIT 1
32585
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 701408733], ["lftq", 1836311903], ["name", ""], ["region_id", 43], ["rgt", 0.38196601125010515], ["rgtp", 433494437], ["rgtq", 1134903170]]
32586
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32587
+  (0.1ms) rollback transaction
32588
+  (0.0ms) begin transaction
32589
+  (0.0ms) rollback transaction
32590
+  (0.0ms) begin transaction
32591
+  (0.0ms) SAVEPOINT active_record_1
32592
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32593
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32594
+  (0.0ms) SAVEPOINT active_record_1
32595
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32596
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32597
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32598
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32599
+  (0.0ms) SAVEPOINT active_record_1
32600
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32601
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32602
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32603
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32604
+  (0.0ms) SAVEPOINT active_record_1
32605
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32606
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32607
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32608
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32609
+  (0.0ms) SAVEPOINT active_record_1
32610
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32611
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32612
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
32613
+  (0.0ms) SAVEPOINT active_record_1
32614
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32615
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32616
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
32617
+  (0.0ms) SAVEPOINT active_record_1
32618
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32619
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32620
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Pacific"], ["region_id", 1], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32622
+  (0.0ms) SAVEPOINT active_record_1
32623
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32624
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
32625
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
32626
+ SQL (0.2ms) UPDATE "regions" SET rgtp = 0 * rgtp + 1 * rgtq, rgtq = -1 * rgtp + 3 * rgtq, rgt = 1.000000000000000000000000000000*(0 * rgtp + 1 * rgtq)/(-1 * rgtp + 3 * rgtq), lftp = 0 * lftp + 1 * lftq, lftq = -1 * lftp + 3 * lftq, lft = 1.000000000000000000000000000000*(0 * lftp + 1 * lftq)/(-1 * lftp + 3 * lftq) WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
32627
+ "regions".lft BETWEEN 0.5 AND 1.0
32628
+ )
32629
+  (0.1ms) UPDATE "regions" SET "region_id" = 5, "lftp" = 2, "lftq" = 5, "rgtq" = 2, "lft" = 0.4, "rgt" = 0.5 WHERE "regions"."id" = 2
32630
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32631
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32632
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32633
+  (0.1ms) rollback transaction
32634
+  (0.0ms) begin transaction
32635
+  (0.0ms) SAVEPOINT active_record_1
32636
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32637
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32638
+  (0.0ms) SAVEPOINT active_record_1
32639
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32640
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32641
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "europe"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32642
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32643
+  (0.0ms) SAVEPOINT active_record_1
32644
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32645
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32646
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "america"], ["region_id", 1], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32647
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32648
+  (0.0ms) SAVEPOINT active_record_1
32649
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32650
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
32651
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.4], ["lftp", 2], ["lftq", 5], ["name", "usa"], ["region_id", 3], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32652
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32653
+  (0.0ms) SAVEPOINT active_record_1
32654
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32655
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 4 ORDER BY lftq DESC LIMIT 1
32656
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.42857142857142855], ["lftp", 3], ["lftq", 7], ["name", "texas"], ["region_id", 4], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32657
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32658
+  (0.0ms) SAVEPOINT active_record_1
32659
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
32660
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
32661
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.4444444444444444], ["lftp", 4], ["lftq", 9], ["name", "houston"], ["region_id", 5], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32662
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32663
+  (0.0ms) SAVEPOINT active_record_1
32664
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
32665
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32666
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32667
+ SQL (0.1ms) UPDATE "regions" SET rgtp = 3 * rgtp + -1 * rgtq, rgtq = 1 * rgtp + 0 * rgtq, rgt = 1.000000000000000000000000000000*(3 * rgtp + -1 * rgtq)/(1 * rgtp + 0 * rgtq), lftp = 3 * lftp + -1 * lftq, lftq = 1 * lftp + 0 * lftq, lft = 1.000000000000000000000000000000*(3 * lftp + -1 * lftq)/(1 * lftp + 0 * lftq) WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
32668
+ "regions".lft BETWEEN 0.42857142857142855 AND 0.5
32669
+ )
32670
+  (0.1ms) UPDATE "regions" SET "region_id" = 2, "lftp" = 2, "lftq" = 3, "rgtq" = 1, "lft" = 0.6666666666666666, "rgt" = 1.0 WHERE "regions"."id" = 5
32671
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32672
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 6]]
32673
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
32674
+ "regions".lft BETWEEN 0.75 AND 1.0
32675
+ )
32676
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
32677
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
32678
+ "regions".lft BETWEEN 0.6666666666666666 AND 1.0
32679
+ )
32680
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32681
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
32682
+ "regions".lft BETWEEN 0.5 AND 1.0
32683
+ )
32684
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32685
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
32686
+ "regions".lft BETWEEN 0.3333333333333333 AND 0.5
32687
+ )
32688
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32689
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
32690
+ "regions".lft BETWEEN 0.4 AND 0.5
32691
+ )
32692
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32693
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 0 < "regions".lftp AND
32694
+ "regions".lft BETWEEN 0.0 AND 1.0
32695
+ )
32696
+  (0.2ms) rollback transaction
32697
+  (0.1ms) begin transaction
32698
+  (0.0ms) SAVEPOINT active_record_1
32699
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32700
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32701
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32702
+  (0.0ms) SAVEPOINT active_record_1
32703
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32704
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32705
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32706
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32707
+  (0.1ms) SAVEPOINT active_record_1
32708
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32709
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32710
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32711
+  (0.0ms) SAVEPOINT active_record_1
32712
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32713
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
32714
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32715
+  (0.0ms) SAVEPOINT active_record_1
32716
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32717
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32718
+ SQL (0.1ms) UPDATE "regions" SET rgtp = 2 * rgtp + -1 * rgtq, rgtq = 7 * rgtp + -3 * rgtq, rgt = 1.000000000000000000000000000000*(2 * rgtp + -1 * rgtq)/(7 * rgtp + -3 * rgtq), lftp = 2 * lftp + -1 * lftq, lftq = 7 * lftp + -3 * lftq, lft = 1.000000000000000000000000000000*(2 * lftp + -1 * lftq)/(7 * lftp + -3 * lftq) WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
32719
+ "regions".lft BETWEEN 0.6666666666666666 AND 1.0
32720
+ )
32721
+  (0.1ms) UPDATE "regions" SET "region_id" = NULL, "lftp" = 1, "lftq" = 5, "rgtq" = 4, "lft" = 0.2, "rgt" = 0.25 WHERE "regions"."id" = 2
32722
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32723
+  (0.1ms) rollback transaction
32724
+  (0.0ms) begin transaction
32725
+  (0.0ms) SAVEPOINT active_record_1
32726
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32727
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32728
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32729
+  (0.0ms) SAVEPOINT active_record_1
32730
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32731
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32732
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32733
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32734
+  (0.0ms) SAVEPOINT active_record_1
32735
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32736
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32737
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "Antarctica"], ["region_id", 1], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32738
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32739
+  (0.0ms) SAVEPOINT active_record_1
32740
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32741
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32742
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.75], ["lftp", 3], ["lftq", 4], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32744
+  (0.0ms) SAVEPOINT active_record_1
32745
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32746
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32747
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.7142857142857143], ["lftp", 5], ["lftq", 7], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.75], ["rgtp", 3], ["rgtq", 4]]
32748
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32749
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" ORDER BY rgt DESC, lftp ASC
32750
+  (0.1ms) rollback transaction
32751
+  (0.0ms) begin transaction
32752
+  (0.0ms) SAVEPOINT active_record_1
32753
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32754
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32755
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32756
+  (0.0ms) SAVEPOINT active_record_1
32757
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32758
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32759
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32760
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32761
+  (0.0ms) SAVEPOINT active_record_1
32762
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32763
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32764
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32765
+  (0.0ms) SAVEPOINT active_record_1
32766
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32767
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
32768
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32769
+ SQL (0.1ms) UPDATE "regions" SET "lftp" = 0, "lftq" = 0, "rgtp" = 0, "rgtq" = 0, "lft" = 0, "rgt" = 0 WHERE ("regions".lftq > 0)
32770
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" IS NULL AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
32771
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
32772
+  (0.0ms) SAVEPOINT active_record_1
32773
+  (0.1ms) UPDATE "regions" SET "lftp" = 1, "lftq" = 2, "rgtp" = 1, "rgtq" = 1, "lft" = 0.5, "rgt" = 1.0 WHERE "regions"."id" = 1
32774
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32775
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
32776
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = 1 AND ("regions".lftq > 0) LIMIT 1
32777
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32778
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
32779
+  (0.0ms) SAVEPOINT active_record_1
32780
+  (0.1ms) UPDATE "regions" SET "lftp" = 2, "lftq" = 3, "rgtp" = 1, "rgtq" = 1, "lft" = 0.6666666666666666, "rgt" = 1.0 WHERE "regions"."id" = 2
32781
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32782
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
32783
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
32784
+  (0.0ms) SAVEPOINT active_record_1
32785
+  (0.1ms) UPDATE "regions" SET "lftp" = 1, "lftq" = 3, "rgtp" = 1, "rgtq" = 2, "lft" = 0.3333333333333333, "rgt" = 0.5 WHERE "regions"."id" = 3
32786
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32787
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
32788
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
32789
+  (0.0ms) SAVEPOINT active_record_1
32790
+  (0.1ms) UPDATE "regions" SET "lftp" = 1, "lftq" = 4, "rgtp" = 1, "rgtq" = 3, "lft" = 0.25, "rgt" = 0.3333333333333333 WHERE "regions"."id" = 4
32791
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32792
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 4 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
32793
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" ORDER BY rgt DESC, lftp ASC
32794
+  (0.1ms) rollback transaction
32795
+  (0.0ms) begin transaction
32796
+  (0.0ms) SAVEPOINT active_record_1
32797
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32798
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32799
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32800
+  (0.0ms) SAVEPOINT active_record_1
32801
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32802
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32803
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32804
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32805
+  (0.0ms) SAVEPOINT active_record_1
32806
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32807
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32808
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32809
+  (0.0ms) SAVEPOINT active_record_1
32810
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32811
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
32812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32813
+  (0.0ms) SAVEPOINT active_record_1
32814
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32815
+  (0.1ms) UPDATE "regions" SET "name" = 'USA' WHERE "regions"."id" = 4
32816
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32817
+  (0.1ms) rollback transaction
32818
+  (0.0ms) begin transaction
32819
+  (0.0ms) SAVEPOINT active_record_1
32820
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32821
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32822
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32823
+  (0.0ms) SAVEPOINT active_record_1
32824
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32825
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32826
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32828
+  (0.0ms) SAVEPOINT active_record_1
32829
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 't' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32830
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", true], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Krypton"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32831
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32832
+ Region Load (0.4ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 2 AND lftp = 1 OR lftq = 1 AND lftp = 0)
32833
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 't' AND ( 1 < "regions".lftp AND
32834
+ "regions".lft BETWEEN 0.5 AND 1.0
32835
+ )
32836
+  (0.1ms) rollback transaction
32837
+  (0.0ms) begin transaction
32838
+  (0.0ms) SAVEPOINT active_record_1
32839
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32840
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32841
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32842
+  (0.0ms) SAVEPOINT active_record_1
32843
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32844
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32845
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32846
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32847
+  (0.0ms) SAVEPOINT active_record_1
32848
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32849
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32850
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32851
+  (0.0ms) SAVEPOINT active_record_1
32852
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32853
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
32854
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32855
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" ORDER BY rgt DESC, lftp ASC
32856
+  (0.2ms) rollback transaction
32857
+  (0.0ms) begin transaction
32858
+  (0.0ms) SAVEPOINT active_record_1
32859
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32860
+ SQL (0.3ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "1"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32861
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32862
+  (0.1ms) SAVEPOINT active_record_1
32863
+ Region Load (0.7ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32864
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "2"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
32865
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32866
+  (0.0ms) SAVEPOINT active_record_1
32867
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
32868
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "3"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
32869
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32870
+  (0.1ms) rollback transaction
32871
+  (0.1ms) begin transaction
32872
+  (0.1ms) SAVEPOINT active_record_1
32873
+ SQL (2.5ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32874
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32875
+  (0.0ms) SAVEPOINT active_record_1
32876
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32877
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32878
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32879
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32880
+  (0.0ms) SAVEPOINT active_record_1
32881
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32882
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32883
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32884
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32885
+  (0.0ms) SAVEPOINT active_record_1
32886
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32887
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32888
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32889
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32890
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1)
32891
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 1 AND lftp = 0)
32892
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 2 AND lftp = 1 OR lftq = 1 AND lftp = 0)
32893
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 2 AND lftp = 1 OR lftq = 1 AND lftp = 0)
32894
+  (0.1ms) rollback transaction
32895
+  (0.0ms) begin transaction
32896
+  (0.0ms) SAVEPOINT active_record_1
32897
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32898
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32899
+  (0.0ms) SAVEPOINT active_record_1
32900
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = 1 LIMIT 1
32901
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32902
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32903
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32904
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32905
+  (0.1ms) rollback transaction
32906
+  (0.0ms) begin transaction
32907
+  (0.0ms) SAVEPOINT active_record_1
32908
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32909
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32910
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32911
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32912
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32913
+  (0.1ms) rollback transaction
32914
+  (0.0ms) begin transaction
32915
+  (0.0ms) SAVEPOINT active_record_1
32916
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32917
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32918
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" IS NULL
32919
+  (0.1ms) rollback transaction
32920
+  (0.0ms) begin transaction
32921
+  (0.0ms) SAVEPOINT active_record_1
32922
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32923
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32924
+  (0.0ms) SAVEPOINT active_record_1
32925
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32926
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32927
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32928
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32929
+  (0.0ms) SAVEPOINT active_record_1
32930
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32931
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32932
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32933
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32934
+  (0.0ms) SAVEPOINT active_record_1
32935
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32936
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32937
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32938
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32939
+  (0.1ms) rollback transaction
32940
+  (0.0ms) begin transaction
32941
+  (0.0ms) SAVEPOINT active_record_1
32942
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "root"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32943
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32944
+  (0.0ms) SAVEPOINT active_record_1
32945
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32946
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32947
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "l1"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32948
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32949
+  (0.0ms) SAVEPOINT active_record_1
32950
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32951
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32952
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "l2"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32953
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32954
+  (0.0ms) SAVEPOINT active_record_1
32955
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
32956
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
32957
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.75], ["lftp", 3], ["lftq", 4], ["name", "l3"], ["region_id", 3], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32958
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32959
+  (0.0ms) SAVEPOINT active_record_1
32960
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32961
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 4 ORDER BY lftq DESC LIMIT 1
32962
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.8], ["lftp", 4], ["lftq", 5], ["name", "l4"], ["region_id", 4], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32963
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32964
+  (0.1ms) SAVEPOINT active_record_1
32965
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
32966
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32967
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32968
+ SQL (0.1ms) UPDATE "regions" SET rgtp = 5 * rgtp + -3 * rgtq, rgtq = 7 * rgtp + -4 * rgtq, rgt = 1.000000000000000000000000000000 * (5 * rgtp + -3 * rgtq) / (7 * rgtp + -4 * rgtq), lftp = 5 * lftp + -3 * lftq, lftq = 7 * lftp + -4 * lftq, lft = 1.000000000000000000000000000000 * (5 * lftp + -3 * lftq) / (7 * lftp + -4 * lftq) WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
32969
+ "regions".lft BETWEEN 0.75 AND 1.0
32970
+ )
32971
+  (0.1ms) UPDATE "regions" SET "region_id" = 2, "lftq" = 5, "rgtp" = 2, "rgtq" = 3, "lft" = 0.6, "rgt" = 0.6666666666666666 WHERE "regions"."id" = 4
32972
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32973
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE (abs(rgt - (select rgt from regions where id =4)) < 1e-16)
32974
+  (0.1ms) rollback transaction
32975
+  (0.0ms) begin transaction
32976
+  (0.0ms) SAVEPOINT active_record_1
32977
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32978
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32979
+  (0.0ms) SAVEPOINT active_record_1
32980
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
32981
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
32982
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32983
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32984
+  (0.0ms) SAVEPOINT active_record_1
32985
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32986
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32987
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32988
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32989
+  (0.0ms) SAVEPOINT active_record_1
32990
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
32991
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
32992
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
32993
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32994
+  (0.1ms) rollback transaction
32995
+  (0.0ms) begin transaction
32996
+  (0.0ms) SAVEPOINT active_record_1
32997
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
32998
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32999
+  (0.0ms) SAVEPOINT active_record_1
33000
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33001
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33002
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33003
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33004
+  (0.0ms) SAVEPOINT active_record_1
33005
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33006
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33007
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33008
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33009
+  (0.0ms) SAVEPOINT active_record_1
33010
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33011
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33012
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
33013
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33014
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 0 < "regions".lftp AND
33015
+ "regions".lft BETWEEN 0.0 AND 1.0
33016
+ )
33017
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
33018
+ "regions".lft BETWEEN 0.5 AND 1.0
33019
+ )
33020
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
33021
+ "regions".lft BETWEEN 0.6666666666666666 AND 1.0
33022
+ )
33023
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
33024
+ "regions".lft BETWEEN 0.6 AND 0.6666666666666666
33025
+ )
33026
+  (0.1ms) rollback transaction
33027
+  (0.0ms) begin transaction
33028
+  (0.0ms) SAVEPOINT active_record_1
33029
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33030
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33031
+  (0.0ms) SAVEPOINT active_record_1
33032
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33033
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33034
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33035
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33036
+  (0.0ms) SAVEPOINT active_record_1
33037
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33038
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33039
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33040
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33041
+  (0.0ms) SAVEPOINT active_record_1
33042
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33043
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33044
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
33045
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33046
+  (0.0ms) SAVEPOINT active_record_1
33047
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."region_id" = 2
33048
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
33049
+  (0.1ms) rollback transaction
33050
+  (0.0ms) begin transaction
33051
+  (0.0ms) SAVEPOINT active_record_1
33052
+ SQL (0.2ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", ""], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33053
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33054
+  (0.0ms) SAVEPOINT active_record_1
33055
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33056
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33057
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", ""], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33058
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33059
+  (0.0ms) SAVEPOINT active_record_1
33060
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33061
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33062
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", ""], ["region_id", 1], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33063
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33064
+  (0.0ms) SAVEPOINT active_record_1
33065
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
33066
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
33067
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.4], ["lftp", 2], ["lftq", 5], ["name", ""], ["region_id", 3], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33068
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33069
+  (0.0ms) SAVEPOINT active_record_1
33070
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
33071
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
33072
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.375], ["lftp", 3], ["lftq", 8], ["name", ""], ["region_id", 3], ["rgt", 0.4], ["rgtp", 2], ["rgtq", 5]]
33073
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33074
+  (0.0ms) SAVEPOINT active_record_1
33075
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
33076
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
33077
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38461538461538464], ["lftp", 5], ["lftq", 13], ["name", ""], ["region_id", 5], ["rgt", 0.4], ["rgtp", 2], ["rgtq", 5]]
33078
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33079
+  (0.0ms) SAVEPOINT active_record_1
33080
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
33081
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
33082
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38095238095238093], ["lftp", 8], ["lftq", 21], ["name", ""], ["region_id", 5], ["rgt", 0.38461538461538464], ["rgtp", 5], ["rgtq", 13]]
33083
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33084
+  (0.0ms) SAVEPOINT active_record_1
33085
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 7]]
33086
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 7 ORDER BY lftq DESC LIMIT 1
33087
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38235294117647056], ["lftp", 13], ["lftq", 34], ["name", ""], ["region_id", 7], ["rgt", 0.38461538461538464], ["rgtp", 5], ["rgtq", 13]]
33088
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33089
+  (0.0ms) SAVEPOINT active_record_1
33090
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 7]]
33091
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 7 ORDER BY lftq DESC LIMIT 1
33092
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38181818181818183], ["lftp", 21], ["lftq", 55], ["name", ""], ["region_id", 7], ["rgt", 0.38235294117647056], ["rgtp", 13], ["rgtq", 34]]
33093
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33094
+  (0.0ms) SAVEPOINT active_record_1
33095
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 9]]
33096
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 9 ORDER BY lftq DESC LIMIT 1
33097
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38202247191011235], ["lftp", 34], ["lftq", 89], ["name", ""], ["region_id", 9], ["rgt", 0.38235294117647056], ["rgtp", 13], ["rgtq", 34]]
33098
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33099
+  (0.0ms) SAVEPOINT active_record_1
33100
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 9]]
33101
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 9 ORDER BY lftq DESC LIMIT 1
33102
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819444444444444], ["lftp", 55], ["lftq", 144], ["name", ""], ["region_id", 9], ["rgt", 0.38202247191011235], ["rgtp", 34], ["rgtq", 89]]
33103
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33104
+  (0.0ms) SAVEPOINT active_record_1
33105
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 11]]
33106
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 11 ORDER BY lftq DESC LIMIT 1
33107
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38197424892703863], ["lftp", 89], ["lftq", 233], ["name", ""], ["region_id", 11], ["rgt", 0.38202247191011235], ["rgtp", 34], ["rgtq", 89]]
33108
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33109
+  (0.0ms) SAVEPOINT active_record_1
33110
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 11]]
33111
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 11 ORDER BY lftq DESC LIMIT 1
33112
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819628647214854], ["lftp", 144], ["lftq", 377], ["name", ""], ["region_id", 11], ["rgt", 0.38197424892703863], ["rgtp", 89], ["rgtq", 233]]
33113
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33114
+  (0.0ms) SAVEPOINT active_record_1
33115
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 13]]
33116
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 13 ORDER BY lftq DESC LIMIT 1
33117
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819672131147541], ["lftp", 233], ["lftq", 610], ["name", ""], ["region_id", 13], ["rgt", 0.38197424892703863], ["rgtp", 89], ["rgtq", 233]]
33118
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33119
+  (0.0ms) SAVEPOINT active_record_1
33120
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 13]]
33121
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 13 ORDER BY lftq DESC LIMIT 1
33122
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819655521783181], ["lftp", 377], ["lftq", 987], ["name", ""], ["region_id", 13], ["rgt", 0.3819672131147541], ["rgtp", 233], ["rgtq", 610]]
33123
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33124
+  (0.0ms) SAVEPOINT active_record_1
33125
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 15]]
33126
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 15 ORDER BY lftq DESC LIMIT 1
33127
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196618659987475], ["lftp", 610], ["lftq", 1597], ["name", ""], ["region_id", 15], ["rgt", 0.3819672131147541], ["rgtp", 233], ["rgtq", 610]]
33128
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33129
+  (0.0ms) SAVEPOINT active_record_1
33130
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 15]]
33131
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 15 ORDER BY lftq DESC LIMIT 1
33132
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196594427244585], ["lftp", 987], ["lftq", 2584], ["name", ""], ["region_id", 15], ["rgt", 0.38196618659987475], ["rgtp", 610], ["rgtq", 1597]]
33133
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33134
+  (0.0ms) SAVEPOINT active_record_1
33135
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 17]]
33136
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 17 ORDER BY lftq DESC LIMIT 1
33137
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196603683329344], ["lftp", 1597], ["lftq", 4181], ["name", ""], ["region_id", 17], ["rgt", 0.38196618659987475], ["rgtp", 610], ["rgtq", 1597]]
33138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33139
+  (0.0ms) SAVEPOINT active_record_1
33140
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 17]]
33141
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 17 ORDER BY lftq DESC LIMIT 1
33142
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660014781966], ["lftp", 2584], ["lftq", 6765], ["name", ""], ["region_id", 17], ["rgt", 0.38196603683329344], ["rgtp", 1597], ["rgtq", 4181]]
33143
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33144
+  (0.0ms) SAVEPOINT active_record_1
33145
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 19]]
33146
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 19 ORDER BY lftq DESC LIMIT 1
33147
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601498264204], ["lftp", 4181], ["lftq", 10946], ["name", ""], ["region_id", 19], ["rgt", 0.38196603683329344], ["rgtp", 1597], ["rgtq", 4181]]
33148
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33149
+  (0.0ms) SAVEPOINT active_record_1
33150
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 19]]
33151
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 19 ORDER BY lftq DESC LIMIT 1
33152
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196600982440293], ["lftp", 6765], ["lftq", 17711], ["name", ""], ["region_id", 19], ["rgt", 0.38196601498264204], ["rgtp", 4181], ["rgtq", 10946]]
33153
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33154
+  (0.0ms) SAVEPOINT active_record_1
33155
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 21]]
33156
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 21 ORDER BY lftq DESC LIMIT 1
33157
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601179467493], ["lftp", 10946], ["lftq", 28657], ["name", ""], ["region_id", 21], ["rgt", 0.38196601498264204], ["rgtp", 4181], ["rgtq", 10946]]
33158
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33159
+  (0.0ms) SAVEPOINT active_record_1
33160
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 21]]
33161
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 21 ORDER BY lftq DESC LIMIT 1
33162
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.381966011042098], ["lftp", 17711], ["lftq", 46368], ["name", ""], ["region_id", 21], ["rgt", 0.38196601179467493], ["rgtp", 10946], ["rgtq", 28657]]
33163
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33164
+  (0.0ms) SAVEPOINT active_record_1
33165
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 23]]
33166
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 23 ORDER BY lftq DESC LIMIT 1
33167
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660113295568], ["lftp", 28657], ["lftq", 75025], ["name", ""], ["region_id", 23], ["rgt", 0.38196601179467493], ["rgtp", 10946], ["rgtq", 28657]]
33168
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33169
+  (0.0ms) SAVEPOINT active_record_1
33170
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 23]]
33171
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 23 ORDER BY lftq DESC LIMIT 1
33172
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112197573], ["lftp", 46368], ["lftq", 121393], ["name", ""], ["region_id", 23], ["rgt", 0.3819660113295568], ["rgtp", 28657], ["rgtq", 75025]]
33173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33174
+  (0.0ms) SAVEPOINT active_record_1
33175
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 25]]
33176
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 25 ORDER BY lftq DESC LIMIT 1
33177
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.381966011261697], ["lftp", 75025], ["lftq", 196418], ["name", ""], ["region_id", 25], ["rgt", 0.3819660113295568], ["rgtp", 28657], ["rgtq", 75025]]
33178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33179
+  (0.0ms) SAVEPOINT active_record_1
33180
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 25]]
33181
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 25 ORDER BY lftq DESC LIMIT 1
33182
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112456775], ["lftp", 121393], ["lftq", 317811], ["name", ""], ["region_id", 25], ["rgt", 0.381966011261697], ["rgtp", 75025], ["rgtq", 196418]]
33183
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33184
+  (0.0ms) SAVEPOINT active_record_1
33185
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 27]]
33186
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 27 ORDER BY lftq DESC LIMIT 1
33187
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125179636], ["lftp", 196418], ["lftq", 514229], ["name", ""], ["region_id", 27], ["rgt", 0.381966011261697], ["rgtp", 75025], ["rgtq", 196418]]
33188
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33189
+  (0.0ms) SAVEPOINT active_record_1
33190
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 27]]
33191
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 27 ORDER BY lftq DESC LIMIT 1
33192
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601124945917], ["lftp", 317811], ["lftq", 832040], ["name", ""], ["region_id", 27], ["rgt", 0.38196601125179636], ["rgtp", 196418], ["rgtq", 514229]]
33193
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33194
+  (0.0ms) SAVEPOINT active_record_1
33195
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 29]]
33196
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 29 ORDER BY lftq DESC LIMIT 1
33197
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112503519], ["lftp", 514229], ["lftq", 1346269], ["name", ""], ["region_id", 29], ["rgt", 0.38196601125179636], ["rgtp", 196418], ["rgtq", 514229]]
33198
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33199
+  (0.0ms) SAVEPOINT active_record_1
33200
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 29]]
33201
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 29 ORDER BY lftq DESC LIMIT 1
33202
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112500109], ["lftp", 832040], ["lftq", 2178309], ["name", ""], ["region_id", 29], ["rgt", 0.3819660112503519], ["rgtp", 514229], ["rgtq", 1346269]]
33203
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33204
+  (0.0ms) SAVEPOINT active_record_1
33205
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 31]]
33206
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 31 ORDER BY lftq DESC LIMIT 1
33207
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501411], ["lftp", 1346269], ["lftq", 3524578], ["name", ""], ["region_id", 31], ["rgt", 0.3819660112503519], ["rgtp", 514229], ["rgtq", 1346269]]
33208
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33209
+  (0.0ms) SAVEPOINT active_record_1
33210
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 31]]
33211
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 31 ORDER BY lftq DESC LIMIT 1
33212
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112500914], ["lftp", 2178309], ["lftq", 5702887], ["name", ""], ["region_id", 31], ["rgt", 0.3819660112501411], ["rgtp", 1346269], ["rgtq", 3524578]]
33213
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33214
+  (0.0ms) SAVEPOINT active_record_1
33215
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 33]]
33216
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 33 ORDER BY lftq DESC LIMIT 1
33217
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501104], ["lftp", 3524578], ["lftq", 9227465], ["name", ""], ["region_id", 33], ["rgt", 0.3819660112501411], ["rgtp", 1346269], ["rgtq", 3524578]]
33218
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33219
+  (0.0ms) SAVEPOINT active_record_1
33220
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 33]]
33221
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 33 ORDER BY lftq DESC LIMIT 1
33222
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010315], ["lftp", 5702887], ["lftq", 14930352], ["name", ""], ["region_id", 33], ["rgt", 0.3819660112501104], ["rgtp", 3524578], ["rgtq", 9227465]]
33223
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33224
+  (0.0ms) SAVEPOINT active_record_1
33225
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 35]]
33226
+ Region Load (0.5ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 35 ORDER BY lftq DESC LIMIT 1
33227
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010593], ["lftp", 9227465], ["lftq", 24157817], ["name", ""], ["region_id", 35], ["rgt", 0.3819660112501104], ["rgtp", 3524578], ["rgtq", 9227465]]
33228
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33229
+  (0.0ms) SAVEPOINT active_record_1
33230
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 35]]
33231
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 35 ORDER BY lftq DESC LIMIT 1
33232
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501049], ["lftp", 14930352], ["lftq", 39088169], ["name", ""], ["region_id", 35], ["rgt", 0.38196601125010593], ["rgtp", 9227465], ["rgtq", 24157817]]
33233
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33234
+  (0.0ms) SAVEPOINT active_record_1
33235
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 37]]
33236
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 37 ORDER BY lftq DESC LIMIT 1
33237
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010526], ["lftp", 24157817], ["lftq", 63245986], ["name", ""], ["region_id", 37], ["rgt", 0.38196601125010593], ["rgtp", 9227465], ["rgtq", 24157817]]
33238
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33239
+  (0.0ms) SAVEPOINT active_record_1
33240
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 37]]
33241
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 37 ORDER BY lftq DESC LIMIT 1
33242
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3819660112501051], ["lftp", 39088169], ["lftq", 102334155], ["name", ""], ["region_id", 37], ["rgt", 0.38196601125010526], ["rgtp", 24157817], ["rgtq", 63245986]]
33243
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33244
+  (0.0ms) SAVEPOINT active_record_1
33245
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 39]]
33246
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 39 ORDER BY lftq DESC LIMIT 1
33247
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 63245986], ["lftq", 165580141], ["name", ""], ["region_id", 39], ["rgt", 0.38196601125010526], ["rgtp", 24157817], ["rgtq", 63245986]]
33248
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33249
+  (0.0ms) SAVEPOINT active_record_1
33250
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 39]]
33251
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 39 ORDER BY lftq DESC LIMIT 1
33252
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 102334155], ["lftq", 267914296], ["name", ""], ["region_id", 39], ["rgt", 0.38196601125010515], ["rgtp", 63245986], ["rgtq", 165580141]]
33253
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33254
+  (0.0ms) SAVEPOINT active_record_1
33255
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 41]]
33256
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 41 ORDER BY lftq DESC LIMIT 1
33257
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 165580141], ["lftq", 433494437], ["name", ""], ["region_id", 41], ["rgt", 0.38196601125010515], ["rgtp", 63245986], ["rgtq", 165580141]]
33258
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33259
+  (0.0ms) SAVEPOINT active_record_1
33260
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 41]]
33261
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 41 ORDER BY lftq DESC LIMIT 1
33262
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 267914296], ["lftq", 701408733], ["name", ""], ["region_id", 41], ["rgt", 0.38196601125010515], ["rgtp", 165580141], ["rgtq", 433494437]]
33263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33264
+  (0.0ms) SAVEPOINT active_record_1
33265
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 43]]
33266
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 43 ORDER BY lftq DESC LIMIT 1
33267
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 433494437], ["lftq", 1134903170], ["name", ""], ["region_id", 43], ["rgt", 0.38196601125010515], ["rgtp", 165580141], ["rgtq", 433494437]]
33268
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33269
+  (0.0ms) SAVEPOINT active_record_1
33270
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 43]]
33271
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 43 ORDER BY lftq DESC LIMIT 1
33272
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.38196601125010515], ["lftp", 701408733], ["lftq", 1836311903], ["name", ""], ["region_id", 43], ["rgt", 0.38196601125010515], ["rgtp", 433494437], ["rgtq", 1134903170]]
33273
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33274
+  (0.1ms) rollback transaction
33275
+  (0.0ms) begin transaction
33276
+  (0.0ms) rollback transaction
33277
+  (0.0ms) begin transaction
33278
+  (0.0ms) SAVEPOINT active_record_1
33279
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33280
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33281
+  (0.0ms) SAVEPOINT active_record_1
33282
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33283
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33284
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33285
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33286
+  (0.0ms) SAVEPOINT active_record_1
33287
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33288
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33289
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33290
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33291
+  (0.0ms) SAVEPOINT active_record_1
33292
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33293
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33294
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
33295
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33296
+  (0.0ms) SAVEPOINT active_record_1
33297
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33298
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33299
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
33300
+  (0.0ms) SAVEPOINT active_record_1
33301
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33302
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
33303
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
33304
+  (0.0ms) SAVEPOINT active_record_1
33305
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33306
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33307
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Pacific"], ["region_id", 1], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33308
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33309
+  (0.0ms) SAVEPOINT active_record_1
33310
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33311
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
33312
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
33313
+ SQL (0.1ms) UPDATE "regions" SET rgtp = 0 * rgtp + 1 * rgtq, rgtq = -1 * rgtp + 3 * rgtq, rgt = 1.000000000000000000000000000000 * (0 * rgtp + 1 * rgtq) / (-1 * rgtp + 3 * rgtq), lftp = 0 * lftp + 1 * lftq, lftq = -1 * lftp + 3 * lftq, lft = 1.000000000000000000000000000000 * (0 * lftp + 1 * lftq) / (-1 * lftp + 3 * lftq) WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
33314
+ "regions".lft BETWEEN 0.5 AND 1.0
33315
+ )
33316
+  (0.1ms) UPDATE "regions" SET "region_id" = 5, "lftp" = 2, "lftq" = 5, "rgtq" = 2, "lft" = 0.4, "rgt" = 0.5 WHERE "regions"."id" = 2
33317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33318
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
33319
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
33320
+  (0.1ms) rollback transaction
33321
+  (0.0ms) begin transaction
33322
+  (0.0ms) SAVEPOINT active_record_1
33323
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.0], ["lftp", 0], ["lftq", 1], ["name", "earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33324
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33325
+  (0.0ms) SAVEPOINT active_record_1
33326
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33327
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33328
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "europe"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33329
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33330
+  (0.0ms) SAVEPOINT active_record_1
33331
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33332
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33333
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "america"], ["region_id", 1], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33334
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33335
+  (0.0ms) SAVEPOINT active_record_1
33336
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
33337
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 ORDER BY lftq DESC LIMIT 1
33338
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.4], ["lftp", 2], ["lftq", 5], ["name", "usa"], ["region_id", 3], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33339
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33340
+  (0.0ms) SAVEPOINT active_record_1
33341
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
33342
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 4 ORDER BY lftq DESC LIMIT 1
33343
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.42857142857142855], ["lftp", 3], ["lftq", 7], ["name", "texas"], ["region_id", 4], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33344
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33345
+  (0.0ms) SAVEPOINT active_record_1
33346
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
33347
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 5 ORDER BY lftq DESC LIMIT 1
33348
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.4444444444444444], ["lftp", 4], ["lftq", 9], ["name", "houston"], ["region_id", 5], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33350
+  (0.0ms) SAVEPOINT active_record_1
33351
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
33352
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33353
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33354
+ SQL (0.1ms) UPDATE "regions" SET rgtp = 3 * rgtp + -1 * rgtq, rgtq = 1 * rgtp + 0 * rgtq, rgt = 1.000000000000000000000000000000 * (3 * rgtp + -1 * rgtq) / (1 * rgtp + 0 * rgtq), lftp = 3 * lftp + -1 * lftq, lftq = 1 * lftp + 0 * lftq, lft = 1.000000000000000000000000000000 * (3 * lftp + -1 * lftq) / (1 * lftp + 0 * lftq) WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
33355
+ "regions".lft BETWEEN 0.42857142857142855 AND 0.5
33356
+ )
33357
+  (0.1ms) UPDATE "regions" SET "region_id" = 2, "lftp" = 2, "lftq" = 3, "rgtq" = 1, "lft" = 0.6666666666666666, "rgt" = 1.0 WHERE "regions"."id" = 5
33358
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33359
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 6]]
33360
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 3 < "regions".lftp AND
33361
+ "regions".lft BETWEEN 0.75 AND 1.0
33362
+ )
33363
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 5]]
33364
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
33365
+ "regions".lft BETWEEN 0.6666666666666666 AND 1.0
33366
+ )
33367
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33368
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
33369
+ "regions".lft BETWEEN 0.5 AND 1.0
33370
+ )
33371
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 3]]
33372
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 1 < "regions".lftp AND
33373
+ "regions".lft BETWEEN 0.3333333333333333 AND 0.5
33374
+ )
33375
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
33376
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
33377
+ "regions".lft BETWEEN 0.4 AND 0.5
33378
+ )
33379
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33380
+  (0.1ms) SELECT COUNT(*) FROM "regions" WHERE "regions"."fiction" = 'f' AND ( 0 < "regions".lftp AND
33381
+ "regions".lft BETWEEN 0.0 AND 1.0
33382
+ )
33383
+  (0.1ms) rollback transaction
33384
+  (0.0ms) begin transaction
33385
+  (0.0ms) SAVEPOINT active_record_1
33386
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33387
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33388
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33389
+  (0.0ms) SAVEPOINT active_record_1
33390
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33391
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33392
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33393
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33394
+  (0.0ms) SAVEPOINT active_record_1
33395
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33396
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33397
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33398
+  (0.0ms) SAVEPOINT active_record_1
33399
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33400
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
33401
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33402
+  (0.0ms) SAVEPOINT active_record_1
33403
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33404
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33405
+ SQL (0.1ms) UPDATE "regions" SET rgtp = 2 * rgtp + -1 * rgtq, rgtq = 7 * rgtp + -3 * rgtq, rgt = 1.000000000000000000000000000000 * (2 * rgtp + -1 * rgtq) / (7 * rgtp + -3 * rgtq), lftp = 2 * lftp + -1 * lftq, lftq = 7 * lftp + -3 * lftq, lft = 1.000000000000000000000000000000 * (2 * lftp + -1 * lftq) / (7 * lftp + -3 * lftq) WHERE "regions"."fiction" = 'f' AND ( 2 < "regions".lftp AND
33406
+ "regions".lft BETWEEN 0.6666666666666666 AND 1.0
33407
+ )
33408
+  (0.1ms) UPDATE "regions" SET "region_id" = NULL, "lftp" = 1, "lftq" = 5, "rgtq" = 4, "lft" = 0.2, "rgt" = 0.25 WHERE "regions"."id" = 2
33409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33410
+  (0.1ms) rollback transaction
33411
+  (0.0ms) begin transaction
33412
+  (0.0ms) SAVEPOINT active_record_1
33413
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33414
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33415
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33416
+  (0.0ms) SAVEPOINT active_record_1
33417
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33418
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33419
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33421
+  (0.0ms) SAVEPOINT active_record_1
33422
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33423
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33424
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6], ["lftp", 3], ["lftq", 5], ["name", "Antarctica"], ["region_id", 1], ["rgt", 0.6666666666666666], ["rgtp", 2], ["rgtq", 3]]
33425
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33426
+  (0.0ms) SAVEPOINT active_record_1
33427
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33428
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33429
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.75], ["lftp", 3], ["lftq", 4], ["name", "Australia"], ["region_id", 2], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33430
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33431
+  (0.0ms) SAVEPOINT active_record_1
33432
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 2]]
33433
+ Region Load (0.2ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 ORDER BY lftq DESC LIMIT 1
33434
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.7142857142857143], ["lftp", 5], ["lftq", 7], ["name", "New Zealand"], ["region_id", 2], ["rgt", 0.75], ["rgtp", 3], ["rgtq", 4]]
33435
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33436
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" ORDER BY rgt DESC, lftp ASC
33437
+  (0.1ms) rollback transaction
33438
+  (0.0ms) begin transaction
33439
+  (0.0ms) SAVEPOINT active_record_1
33440
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33441
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33443
+  (0.0ms) SAVEPOINT active_record_1
33444
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33445
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33446
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33447
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33448
+  (0.0ms) SAVEPOINT active_record_1
33449
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33450
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33452
+  (0.0ms) SAVEPOINT active_record_1
33453
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33454
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
33455
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33456
+ SQL (0.1ms) UPDATE "regions" SET "lftp" = 0, "lftq" = 0, "rgtp" = 0, "rgtq" = 0, "lft" = 0, "rgt" = 0 WHERE ("regions".lftq > 0)
33457
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" IS NULL AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
33458
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
33459
+  (0.0ms) SAVEPOINT active_record_1
33460
+  (0.1ms) UPDATE "regions" SET "lftp" = 1, "lftq" = 2, "rgtp" = 1, "rgtq" = 1, "lft" = 0.5, "rgt" = 1.0 WHERE "regions"."id" = 1
33461
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33462
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
33463
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = 1 AND ("regions".lftq > 0) LIMIT 1
33464
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33465
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
33466
+  (0.0ms) SAVEPOINT active_record_1
33467
+  (0.1ms) UPDATE "regions" SET "lftp" = 2, "lftq" = 3, "rgtp" = 1, "rgtq" = 1, "lft" = 0.6666666666666666, "rgt" = 1.0 WHERE "regions"."id" = 2
33468
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33469
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 2 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
33470
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
33471
+  (0.0ms) SAVEPOINT active_record_1
33472
+  (0.1ms) UPDATE "regions" SET "lftp" = 1, "lftq" = 3, "rgtp" = 1, "rgtq" = 2, "lft" = 0.3333333333333333, "rgt" = 0.5 WHERE "regions"."id" = 3
33473
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33474
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 3 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
33475
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL AND ("regions".lftq > 0) ORDER BY lftq DESC LIMIT 1
33476
+  (0.0ms) SAVEPOINT active_record_1
33477
+  (0.1ms) UPDATE "regions" SET "lftp" = 1, "lftq" = 4, "rgtp" = 1, "rgtq" = 3, "lft" = 0.25, "rgt" = 0.3333333333333333 WHERE "regions"."id" = 4
33478
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33479
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 4 AND ("regions"."id" >= 0) ORDER BY "regions"."id" ASC LIMIT 1000
33480
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" ORDER BY rgt DESC, lftp ASC
33481
+  (0.1ms) rollback transaction
33482
+  (0.0ms) begin transaction
33483
+  (0.0ms) SAVEPOINT active_record_1
33484
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33485
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33487
+  (0.0ms) SAVEPOINT active_record_1
33488
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33489
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33490
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33491
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33492
+  (0.0ms) SAVEPOINT active_record_1
33493
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33494
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33495
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33496
+  (0.0ms) SAVEPOINT active_record_1
33497
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33498
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
33499
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33500
+  (0.0ms) SAVEPOINT active_record_1
33501
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 4]]
33502
+  (0.1ms) UPDATE "regions" SET "name" = 'USA' WHERE "regions"."id" = 4
33503
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33504
+  (0.1ms) rollback transaction
33505
+  (0.0ms) begin transaction
33506
+  (0.0ms) SAVEPOINT active_record_1
33507
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33508
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Earth"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33509
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33510
+  (0.0ms) SAVEPOINT active_record_1
33511
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33512
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33513
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Oceania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33514
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33515
+  (0.0ms) SAVEPOINT active_record_1
33516
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 't' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33517
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", true], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Krypton"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33518
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33519
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND (0 = 1 OR lftq = 2 AND lftp = 1 OR lftq = 1 AND lftp = 0)
33520
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 't' AND ( 1 < "regions".lftp AND
33521
+ "regions".lft BETWEEN 0.5 AND 1.0
33522
+ )
33523
+  (0.1ms) rollback transaction
33524
+  (0.0ms) begin transaction
33525
+  (0.0ms) SAVEPOINT active_record_1
33526
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33527
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "Europe"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33528
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33529
+  (0.0ms) SAVEPOINT active_record_1
33530
+ Region Load (0.0ms) SELECT "regions".* FROM "regions" WHERE "regions"."id" = ? LIMIT 1 [["id", 1]]
33531
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."region_id" = 1 ORDER BY lftq DESC LIMIT 1
33532
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.6666666666666666], ["lftp", 2], ["lftq", 3], ["name", "Romania"], ["region_id", 1], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33533
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33534
+  (0.0ms) SAVEPOINT active_record_1
33535
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33536
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "Asia"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33537
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33538
+  (0.0ms) SAVEPOINT active_record_1
33539
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33540
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "America"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
33541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33542
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" ORDER BY rgt DESC, lftp ASC
33543
+  (0.1ms) rollback transaction
33544
+  (0.0ms) begin transaction
33545
+  (0.0ms) SAVEPOINT active_record_1
33546
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33547
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.5], ["lftp", 1], ["lftq", 2], ["name", "1"], ["region_id", nil], ["rgt", 1.0], ["rgtp", 1], ["rgtq", 1]]
33548
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33549
+  (0.1ms) SAVEPOINT active_record_1
33550
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33551
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.3333333333333333], ["lftp", 1], ["lftq", 3], ["name", "2"], ["region_id", nil], ["rgt", 0.5], ["rgtp", 1], ["rgtq", 2]]
33552
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33553
+  (0.0ms) SAVEPOINT active_record_1
33554
+ Region Load (0.1ms) SELECT "regions".* FROM "regions" WHERE "regions"."fiction" = 'f' AND "regions"."region_id" IS NULL ORDER BY lftq DESC LIMIT 1
33555
+ SQL (0.1ms) INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["fiction", false], ["lft", 0.25], ["lftp", 1], ["lftq", 4], ["name", "3"], ["region_id", nil], ["rgt", 0.3333333333333333], ["rgtp", 1], ["rgtq", 3]]
33556
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33557
+  (0.1ms) rollback transaction