activerecord 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activerecord might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ *2.1.2 (October 23rd, 2008)*
2
+
3
+ * Added SQL escaping for :limit and :offset in MySQL [Jonathan Wiess]
4
+
5
+ * Multiparameter attributes skip time zone conversion for time-only columns #1030 [Geoff Buesing]
6
+
7
+
1
8
  *2.1.1 (September 4th, 2008)*
2
9
 
3
10
  * Set config.active_record.timestamped_migrations = false to have migrations with numeric prefix instead of UTC timestamp. #446. [Andrew Stone, Nik Wakelin]
data/Rakefile CHANGED
@@ -172,7 +172,7 @@ spec = Gem::Specification.new do |s|
172
172
  s.files = s.files + Dir.glob( "#{dir}/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
173
173
  end
174
174
 
175
- s.add_dependency('activesupport', '= 2.1.1' + PKG_BUILD)
175
+ s.add_dependency('activesupport', '= 2.1.2' + PKG_BUILD)
176
176
 
177
177
  s.files.delete FIXTURES_ROOT + "/fixture_database.sqlite"
178
178
  s.files.delete FIXTURES_ROOT + "/fixture_database_2.sqlite"
@@ -95,8 +95,8 @@ module ActiveRecord
95
95
  records.each {|record| record.send(reflection.name).loaded}
96
96
  options = reflection.options
97
97
 
98
- conditions = "t0.#{reflection.primary_key_name} IN (?)"
99
- conditions << append_conditions(options, preload_options)
98
+ conditions = "t0.#{reflection.primary_key_name} #{in_or_equals_for_ids(ids)}"
99
+ conditions << append_conditions(reflection, preload_options)
100
100
 
101
101
  associated_records = reflection.klass.find(:all, :conditions => [conditions, ids],
102
102
  :include => options[:include],
@@ -222,8 +222,6 @@ module ActiveRecord
222
222
 
223
223
  table_name = klass.quoted_table_name
224
224
  primary_key = klass.primary_key
225
- conditions = "#{table_name}.#{connection.quote_column_name(primary_key)} IN (?)"
226
- conditions << append_conditions(options, preload_options)
227
225
  column_type = klass.columns.detect{|c| c.name == primary_key}.type
228
226
  ids = id_map.keys.uniq.map do |id|
229
227
  if column_type == :integer
@@ -234,6 +232,8 @@ module ActiveRecord
234
232
  id
235
233
  end
236
234
  end
235
+ conditions = "#{table_name}.#{connection.quote_column_name(primary_key)} #{in_or_equals_for_ids(ids)}"
236
+ conditions << append_conditions(reflection, preload_options)
237
237
  associated_records = klass.find(:all, :conditions => [conditions, ids],
238
238
  :include => options[:include],
239
239
  :select => options[:select],
@@ -248,13 +248,13 @@ module ActiveRecord
248
248
  table_name = reflection.klass.quoted_table_name
249
249
 
250
250
  if interface = reflection.options[:as]
251
- conditions = "#{reflection.klass.quoted_table_name}.#{connection.quote_column_name "#{interface}_id"} IN (?) and #{reflection.klass.quoted_table_name}.#{connection.quote_column_name "#{interface}_type"} = '#{self.base_class.sti_name}'"
251
+ conditions = "#{reflection.klass.quoted_table_name}.#{connection.quote_column_name "#{interface}_id"} #{in_or_equals_for_ids(ids)} and #{reflection.klass.quoted_table_name}.#{connection.quote_column_name "#{interface}_type"} = '#{self.base_class.sti_name}'"
252
252
  else
253
253
  foreign_key = reflection.primary_key_name
254
- conditions = "#{reflection.klass.quoted_table_name}.#{foreign_key} IN (?)"
254
+ conditions = "#{reflection.klass.quoted_table_name}.#{foreign_key} #{in_or_equals_for_ids(ids)}"
255
255
  end
256
256
 
257
- conditions << append_conditions(options, preload_options)
257
+ conditions << append_conditions(reflection, preload_options)
258
258
 
259
259
  reflection.klass.find(:all,
260
260
  :select => (preload_options[:select] || options[:select] || "#{table_name}.*"),
@@ -270,13 +270,16 @@ module ActiveRecord
270
270
  instance_eval("%@#{sql.gsub('@', '\@')}@")
271
271
  end
272
272
 
273
- def append_conditions(options, preload_options)
273
+ def append_conditions(reflection, preload_options)
274
274
  sql = ""
275
- sql << " AND (#{interpolate_sql_for_preload(sanitize_sql(options[:conditions]))})" if options[:conditions]
275
+ sql << " AND (#{interpolate_sql_for_preload(reflection.sanitized_conditions)})" if reflection.sanitized_conditions
276
276
  sql << " AND (#{sanitize_sql preload_options[:conditions]})" if preload_options[:conditions]
277
277
  sql
278
278
  end
279
279
 
280
+ def in_or_equals_for_ids(ids)
281
+ ids.size > 1 ? "IN (?)" : "= ?"
282
+ end
280
283
  end
281
284
  end
282
285
  end
@@ -919,7 +919,7 @@ module ActiveRecord
919
919
  # Create the callbacks to update counter cache
920
920
  if options[:counter_cache]
921
921
  cache_column = options[:counter_cache] == true ?
922
- "#{self.to_s.underscore.pluralize}_count" :
922
+ "#{self.to_s.demodulize.underscore.pluralize}_count" :
923
923
  options[:counter_cache]
924
924
 
925
925
  method_name = "belongs_to_counter_cache_after_create_for_#{reflection.name}".to_sym
@@ -1581,12 +1581,12 @@ module ActiveRecord
1581
1581
 
1582
1582
  def create_extension_modules(association_id, block_extension, extensions)
1583
1583
  if block_extension
1584
- extension_module_name = "#{self.to_s}#{association_id.to_s.camelize}AssociationExtension"
1584
+ extension_module_name = "#{self.to_s.demodulize}#{association_id.to_s.camelize}AssociationExtension"
1585
1585
 
1586
1586
  silence_warnings do
1587
- Object.const_set(extension_module_name, Module.new(&block_extension))
1587
+ self.parent.const_set(extension_module_name, Module.new(&block_extension))
1588
1588
  end
1589
- Array(extensions).push(extension_module_name.constantize)
1589
+ Array(extensions).push("#{self.parent}::#{extension_module_name}".constantize)
1590
1590
  else
1591
1591
  Array(extensions)
1592
1592
  end
@@ -2085,7 +2085,7 @@ module ActiveRecord #:nodoc:
2085
2085
  end
2086
2086
 
2087
2087
  def quote_bound_value(value) #:nodoc:
2088
- if value.respond_to?(:map) && !value.is_a?(String)
2088
+ if value.respond_to?(:map) && !value.is_a?(String) && !value.is_a?(ActiveSupport::Multibyte::Chars)
2089
2089
  if value.respond_to?(:empty?) && value.empty?
2090
2090
  connection.quote(nil)
2091
2091
  else
@@ -2632,7 +2632,7 @@ module ActiveRecord #:nodoc:
2632
2632
  end
2633
2633
 
2634
2634
  def instantiate_time_object(name, values)
2635
- if self.class.time_zone_aware_attributes && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym)
2635
+ if self.class.send(:create_time_zone_conversion_attribute?, name, column_for_attribute(name))
2636
2636
  Time.zone.local(*values)
2637
2637
  else
2638
2638
  Time.time_with_datetime_fallback(@@default_timezone, *values)
@@ -217,7 +217,7 @@ module ActiveRecord
217
217
 
218
218
  sql << " ORDER BY #{options[:order]} " if options[:order]
219
219
  add_limit!(sql, options, scope)
220
- sql << ') AS #{aggregate_alias}_subquery' if use_workaround
220
+ sql << ") #{aggregate_alias}_subquery" if use_workaround
221
221
  sql
222
222
  end
223
223
 
@@ -278,11 +278,15 @@ module ActiveRecord
278
278
  operation = operation.to_s.downcase
279
279
  case operation
280
280
  when 'count' then value.to_i
281
- when 'sum' then value =~ /\./ ? value.to_f : value.to_i
282
- when 'avg' then value && value.to_f
283
- else column ? column.type_cast(value) : value
281
+ when 'sum' then type_cast_using_column(value || '0', column)
282
+ when 'avg' then value && value.to_d
283
+ else type_cast_using_column(value, column)
284
284
  end
285
285
  end
286
+
287
+ def type_cast_using_column(value, column)
288
+ column ? column.type_cast(value) : value
289
+ end
286
290
  end
287
291
  end
288
292
  end
@@ -112,6 +112,10 @@ module ActiveRecord
112
112
  name == other_aggregation.name && other_aggregation.options && active_record == other_aggregation.active_record
113
113
  end
114
114
 
115
+ def sanitized_conditions #:nodoc:
116
+ @sanitized_conditions ||= klass.send(:sanitize_sql, options[:conditions]) if options[:conditions]
117
+ end
118
+
115
119
  private
116
120
  def derive_class_name
117
121
  name.to_s.camelize
@@ -428,7 +428,7 @@ module ActiveRecord
428
428
 
429
429
  db_cols = begin
430
430
  column_names
431
- rescue ActiveRecord::StatementInvalid
431
+ rescue Exception # To ignore both statement and connection errors
432
432
  []
433
433
  end
434
434
  names = attr_names.reject { |name| db_cols.include?(name.to_s) }
@@ -590,7 +590,7 @@ module ActiveRecord
590
590
  # Configuration options:
591
591
  # * <tt>:message</tt> - Specifies a custom error message (default is: "has already been taken").
592
592
  # * <tt>:scope</tt> - One or more columns by which to limit the scope of the uniqueness constraint.
593
- # * <tt>:case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns (+false+ by default).
593
+ # * <tt>:case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns (+true+ by default).
594
594
  # * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
595
595
  # * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
596
596
  # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
@@ -631,7 +631,7 @@ module ActiveRecord
631
631
  # sqlite has case sensitive SELECT query, while MySQL/Postgresql don't.
632
632
  # Hence, this is needed only for sqlite.
633
633
  condition_sql = "LOWER(#{record.class.quoted_table_name}.#{attr_name}) #{attribute_condition(value)}"
634
- condition_params = [value.chars.downcase]
634
+ condition_params = [value.chars.downcase.to_s]
635
635
  end
636
636
 
637
637
  if scope = configuration[:scope]
@@ -2,7 +2,7 @@ module ActiveRecord
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -116,6 +116,13 @@ class EagerAssociationTest < ActiveRecord::TestCase
116
116
  assert_equal 2, posts.first.comments.size
117
117
  end
118
118
 
119
+ def test_loading_from_an_association_that_has_a_hash_of_conditions
120
+ assert_nothing_raised do
121
+ Author.find(:all, :include => :hello_posts_with_hash_conditions)
122
+ end
123
+ assert !Author.find(authors(:david).id, :include => :hello_posts_with_hash_conditions).hello_posts.empty?
124
+ end
125
+
119
126
  def test_loading_with_no_associations
120
127
  assert_nil Post.find(posts(:authorless).id, :include => :author).author
121
128
  end
@@ -3,6 +3,7 @@ require 'models/post'
3
3
  require 'models/comment'
4
4
  require 'models/project'
5
5
  require 'models/developer'
6
+ require 'models/company_in_module'
6
7
 
7
8
  class AssociationsExtensionsTest < ActiveRecord::TestCase
8
9
  fixtures :projects, :developers, :developers_projects, :comments, :posts
@@ -44,4 +45,18 @@ class AssociationsExtensionsTest < ActiveRecord::TestCase
44
45
  david = Marshal.load(Marshal.dump(david))
45
46
  assert_equal projects(:action_controller), david.projects_extended_by_name.find_most_recent
46
47
  end
48
+
49
+
50
+ def test_extension_name
51
+ extension = Proc.new {}
52
+ name = :association_name
53
+
54
+ assert_equal 'DeveloperAssociationNameAssociationExtension', Developer.send(:create_extension_modules, name, extension, []).first.name
55
+ assert_equal 'MyApplication::Business::DeveloperAssociationNameAssociationExtension',
56
+ MyApplication::Business::Developer.send(:create_extension_modules, name, extension, []).first.name
57
+ assert_equal 'MyApplication::Business::DeveloperAssociationNameAssociationExtension', MyApplication::Business::Developer.send(:create_extension_modules, name, extension, []).first.name
58
+ assert_equal 'MyApplication::Business::DeveloperAssociationNameAssociationExtension', MyApplication::Business::Developer.send(:create_extension_modules, name, extension, []).first.name
59
+ end
60
+
61
+
47
62
  end
@@ -1065,6 +1065,24 @@ class BasicsTest < ActiveRecord::TestCase
1065
1065
  Time.zone = nil
1066
1066
  Topic.skip_time_zone_conversion_for_attributes = []
1067
1067
  end
1068
+
1069
+ def test_multiparameter_attributes_on_time_only_column_with_time_zone_aware_attributes_does_not_do_time_zone_conversion
1070
+ ActiveRecord::Base.time_zone_aware_attributes = true
1071
+ ActiveRecord::Base.default_timezone = :utc
1072
+ Time.zone = ActiveSupport::TimeZone[-28800]
1073
+ attributes = {
1074
+ "bonus_time(1i)" => "2000", "bonus_time(2i)" => "1", "bonus_time(3i)" => "1",
1075
+ "bonus_time(4i)" => "16", "bonus_time(5i)" => "24"
1076
+ }
1077
+ topic = Topic.find(1)
1078
+ topic.attributes = attributes
1079
+ assert_equal Time.utc(2000, 1, 1, 16, 24, 0), topic.bonus_time
1080
+ assert topic.bonus_time.utc?
1081
+ ensure
1082
+ ActiveRecord::Base.time_zone_aware_attributes = false
1083
+ ActiveRecord::Base.default_timezone = :local
1084
+ Time.zone = nil
1085
+ end
1068
1086
 
1069
1087
  def test_multiparameter_attributes_on_time_with_empty_seconds
1070
1088
  attributes = {
@@ -18,8 +18,8 @@ class CalculationsTest < ActiveRecord::TestCase
18
18
 
19
19
  def test_should_average_field
20
20
  value = Account.average(:credit_limit)
21
- assert_kind_of Float, value
22
- assert_in_delta 53.0, value, 0.001
21
+ assert_kind_of BigDecimal, value
22
+ assert_equal BigDecimal.new('53.0'), value
23
23
  end
24
24
 
25
25
  def test_should_return_nil_as_average
@@ -273,7 +273,7 @@ class CalculationsTest < ActiveRecord::TestCase
273
273
  end
274
274
 
275
275
  def test_should_sum_expression
276
- assert_equal 636, Account.sum("2 * credit_limit")
276
+ assert_equal '636', Account.sum("2 * credit_limit")
277
277
  end
278
278
 
279
279
  def test_count_with_from_option
@@ -387,6 +387,14 @@ class FinderTest < ActiveRecord::TestCase
387
387
  assert_equal ActiveRecord::Base.connection.quote(''), bind('?', '')
388
388
  end
389
389
 
390
+ def test_bind_string_with_nl
391
+ assert_equal ActiveRecord::Base.connection.quote("a\nb"), bind('?', "a\nb")
392
+ end
393
+
394
+ def test_bind_mb_string_with_nl
395
+ assert_equal ActiveRecord::Base.connection.quote("a\nb"), bind('?', "a\nb".chars)
396
+ end
397
+
390
398
  def test_bind_record
391
399
  o = Struct.new(:quoted_id).new(1)
392
400
  assert_equal '1', bind('?', o)
@@ -193,7 +193,7 @@ class InheritanceTest < ActiveRecord::TestCase
193
193
 
194
194
  def test_eager_load_belongs_to_primary_key_quoting
195
195
  con = Account.connection
196
- assert_sql(/\(#{con.quote_table_name('companies')}.#{con.quote_column_name('id')} IN \(1\)\)/) do
196
+ assert_sql(/\(#{con.quote_table_name('companies')}.#{con.quote_column_name('id')} = 1\)/) do
197
197
  Account.find(1, :include => :firm)
198
198
  end
199
199
  end
@@ -364,6 +364,13 @@ class ValidationsTest < ActiveRecord::TestCase
364
364
  assert t2.save, "Should now save t2 as unique"
365
365
  end
366
366
 
367
+ def test_validates_uniquness_with_newline_chars
368
+ Topic.validates_uniqueness_of(:title, :case_sensitive => false)
369
+
370
+ t = Topic.new("title" => "new\nline")
371
+ assert t.save, "Should save t as unique"
372
+ end
373
+
367
374
  def test_validate_uniqueness_with_scope
368
375
  Reply.validates_uniqueness_of(:content, :scope => "parent_id")
369
376
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -9,7 +9,7 @@ autorequire: active_record
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-04 00:00:00 +02:00
12
+ date: 2008-10-23 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.1.1
23
+ version: 2.1.2
24
24
  version:
25
25
  description: Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM. It ties database tables and classes together for business objects, like Customer or Subscription, that can find, save, and destroy themselves without resorting to manual SQL.
26
26
  email: david@loudthinking.com
@@ -193,7 +193,6 @@ files:
193
193
  - test/connections/native_sqlite3/in_memory_connection.rb
194
194
  - test/connections/native_sybase
195
195
  - test/connections/native_sybase/connection.rb
196
- - test/debug.log
197
196
  - test/fixtures
198
197
  - test/fixtures/accounts.yml
199
198
  - test/fixtures/all
@@ -223,8 +222,6 @@ files:
223
222
  - test/fixtures/developers_projects.yml
224
223
  - test/fixtures/edges.yml
225
224
  - test/fixtures/entrants.yml
226
- - test/fixtures/fixture_database.sqlite3
227
- - test/fixtures/fixture_database_2.sqlite3
228
225
  - test/fixtures/fk_test_has_fk.yml
229
226
  - test/fixtures/fk_test_has_pk.yml
230
227
  - test/fixtures/funny_jokes.yml
@@ -391,7 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
391
388
  requirements: []
392
389
 
393
390
  rubyforge_project: activerecord
394
- rubygems_version: 1.2.0
391
+ rubygems_version: 1.3.0
395
392
  signing_key:
396
393
  specification_version: 2
397
394
  summary: Implements the ActiveRecord pattern for ORM.
@@ -1,358 +0,0 @@
1
- # Logfile created on Wed Apr 30 00:19:12 -0500 2008 by /
2
- Unable to load post, underlying cause no such file to load -- post.rb
3
-
4
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
5
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
6
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
7
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
8
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
9
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
10
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
11
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
12
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
13
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
14
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
15
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
16
- cases/named_scope_test.rb:9
17
- Unable to load author, underlying cause no such file to load -- author.rb
18
-
19
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
20
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
21
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
22
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
23
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
24
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
25
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
26
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
27
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
28
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
29
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
30
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
31
- cases/named_scope_test.rb:9
32
- Unable to load topic, underlying cause no such file to load -- topic.rb
33
-
34
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
35
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
36
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
37
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
38
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
39
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
40
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
41
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
42
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
43
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
44
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
45
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
46
- cases/named_scope_test.rb:9
47
- Topic Load (0.001909) SELECT * FROM "topics" 
48
- Topic Load (0.001633) SELECT * FROM "topics" 
49
- Topic Load (0.001143) SELECT * FROM "topics" 
50
- Topic Load (0.001296) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
51
- Topic Load (0.000764) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
52
- Topic Load (0.000731) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
53
- Topic Load (0.001061) SELECT * FROM "topics" 
54
- Topic Load (0.000981) SELECT * FROM "topics" 
55
- Topic Load (0.000870) SELECT * FROM "topics" 
56
- Topic Load (0.000915) SELECT * FROM "topics" 
57
- Author Load (0.000274) SELECT * FROM "authors" WHERE ("authors"."id" = 1) 
58
- Post Load (0.000496) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
59
- Post Load (0.001247) SELECT * FROM "posts" WHERE ("posts".author_id = 1) 
60
- Post Load (0.001080) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
61
- Post Load (0.000536) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
62
- Post Load (0.000406) SELECT * FROM "posts" WHERE ("posts".author_id = 1) AND (body LIKE '%a%') 
63
- Author Load (0.000252) SELECT * FROM "authors" WHERE ("authors"."id" = 1) 
64
- Comment Load (0.000797) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
65
- Post Load (0.000699) SELECT * FROM "posts" WHERE ("posts".author_id = 1) 
66
- Comment Load (0.000772) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
67
- Comment Load (0.000879) SELECT "comments".* FROM "comments" INNER JOIN posts ON comments.post_id = posts.id WHERE (("posts".author_id = 1)) 
68
- Comment Load (0.000840) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
69
- Comment Load (0.000837) SELECT "comments".* FROM "comments" INNER JOIN posts ON comments.post_id = posts.id WHERE (("posts".author_id = 1)) AND (comments.body LIKE '%e%') 
70
- Topic Load (0.000850) SELECT * FROM "topics" 
71
- Topic Load (0.001908) SELECT * FROM "topics" 
72
- Topic Load (0.001432) SELECT * FROM "topics" 
73
- Topic Load (0.000777) SELECT * FROM "topics" 
74
- Topic Load (0.000772) SELECT * FROM "topics" 
75
- Topic Load (0.000318) SELECT * FROM "topics" LIMIT 1
76
- Topic Load (0.000765) SELECT * FROM "topics" 
77
- Topic Load (0.000772) SELECT * FROM "topics" 
78
- Topic Load (0.000772) SELECT * FROM "topics" 
79
- Topic Load (0.000361) SELECT * FROM "topics" WHERE ("topics"."id" = 3) 
80
- Topic Load (0.000511) SELECT * FROM "topics" WHERE (written_on < '2005-07-15 09:28:00') 
81
- Topic Load (0.000320) SELECT * FROM "topics" WHERE ("topics"."id" = 2) 
82
- Topic Load (0.000462) SELECT * FROM "topics" WHERE (written_on < '2004-07-15 09:28:00') 
83
- Topic Load (0.000516) SELECT * FROM "topics" WHERE (written_on < '2005-07-15 09:28:00') 
84
- Topic Load (0.000343) SELECT * FROM "topics" WHERE (written_on < '2004-07-15 09:28:00') 
85
- Topic Load (0.000821) SELECT * FROM "topics" 
86
- Topic Create (0.000381) INSERT INTO "topics" ("title", "author_name", "type", "approved", "bonus_time", "replies_count", "author_email_address", "written_on", "content", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, 'test@test.com', '2008-04-30 00:19:13', NULL, NULL, NULL)
87
- Topic Load (0.001058) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
88
- Topic Load (0.000950) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
89
- Topic Load (0.000643) SELECT * FROM "topics" WHERE (replies_count > 0) 
90
- Topic Load (0.000608) SELECT * FROM "topics" WHERE (replies_count > 0) 
91
- Topic Load (0.000552) SELECT * FROM "topics" WHERE ((replies_count > 0) AND ("topics"."approved" = 't')) 
92
- Topic Load (0.000920) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
93
- Topic Load (0.000812) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
94
- Topic Load (0.000806) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
95
- SQL (0.000204) SELECT count(*) AS count_all FROM "topics" WHERE ("topics"."approved" = 't') 
96
- SQL (0.000176) SELECT count(*) AS count_all FROM "topics" WHERE ("topics"."approved" = 't') 
97
- Unable to load post, underlying cause no such file to load -- post.rb
98
-
99
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
100
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
101
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
102
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
103
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
104
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
105
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
106
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
107
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
108
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
109
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
110
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
111
- cases/named_scope_test.rb:11
112
- Unable to load author, underlying cause no such file to load -- author.rb
113
-
114
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
115
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
116
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
117
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
118
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
119
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
120
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
121
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
122
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
123
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
124
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
125
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
126
- cases/named_scope_test.rb:11
127
- Unable to load topic, underlying cause no such file to load -- topic.rb
128
-
129
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
130
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
131
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
132
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
133
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
134
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
135
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
136
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
137
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
138
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
139
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
140
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
141
- cases/named_scope_test.rb:11
142
- Topic Load (0.001976) SELECT * FROM "topics" 
143
- Topic Load (0.001593) SELECT * FROM "topics" 
144
- Topic Load (0.001164) SELECT * FROM "topics" 
145
- Topic Load (0.000571) SELECT * FROM "topics" LIMIT 1
146
- Topic Load (0.000448) SELECT * FROM "topics" LIMIT 1
147
- SQL (0.000197) SELECT count(*) AS count_all FROM "topics" 
148
- SQL (0.000184) SELECT count(*) AS count_all FROM "topics" 
149
- SQL (0.000201) SELECT avg("topics".replies_count) AS avg_replies_count FROM "topics" 
150
- SQL (0.000199) SELECT avg("topics".replies_count) AS avg_replies_count FROM "topics" 
151
- Unable to load post, underlying cause no such file to load -- post.rb
152
-
153
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
154
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
155
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
156
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
157
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
158
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
159
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
160
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
161
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
162
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
163
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
164
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
165
- cases/named_scope_test.rb:12
166
- Unable to load author, underlying cause no such file to load -- author.rb
167
-
168
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
169
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
170
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
171
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
172
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
173
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
174
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
175
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
176
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
177
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
178
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
179
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
180
- cases/named_scope_test.rb:12
181
- Unable to load topic, underlying cause no such file to load -- topic.rb
182
-
183
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
184
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
185
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
186
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
187
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
188
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
189
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
190
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
191
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
192
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
193
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
194
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
195
- cases/named_scope_test.rb:12
196
- Topic Load (0.002000) SELECT * FROM "topics" 
197
- Topic Load (0.001548) SELECT * FROM "topics" 
198
- Topic Load (0.001159) SELECT * FROM "topics" 
199
- Topic Load (0.000799) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
200
- Topic Load (0.000629) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
201
- Topic Load (0.000636) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
202
- Topic Load (0.001059) SELECT * FROM "topics" 
203
- Topic Load (0.000874) SELECT * FROM "topics" 
204
- Topic Load (0.000807) SELECT * FROM "topics" 
205
- Topic Load (0.000331) SELECT * FROM "topics" LIMIT 1
206
- Topic Load (0.000317) SELECT * FROM "topics" LIMIT 1
207
- SQL (0.000145) SELECT count(*) AS count_all FROM "topics" 
208
- SQL (0.000313) SELECT count(*) AS count_all FROM "topics" 
209
- SQL (0.000342) SELECT avg("topics".replies_count) AS avg_replies_count FROM "topics" 
210
- SQL (0.000337) SELECT avg("topics".replies_count) AS avg_replies_count FROM "topics" 
211
- Topic Load (0.001830) SELECT * FROM "topics" 
212
- Author Load (0.000249) SELECT * FROM "authors" WHERE ("authors"."id" = 1) 
213
- Post Load (0.000518) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
214
- Post Load (0.000703) SELECT * FROM "posts" WHERE ("posts".author_id = 1) 
215
- Post Load (0.000496) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
216
- Post Load (0.000500) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
217
- Post Load (0.000391) SELECT * FROM "posts" WHERE ("posts".author_id = 1) AND (body LIKE '%a%') 
218
- Author Load (0.000250) SELECT * FROM "authors" WHERE ("authors"."id" = 1) 
219
- Comment Load (0.000786) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
220
- Post Load (0.000697) SELECT * FROM "posts" WHERE ("posts".author_id = 1) 
221
- Comment Load (0.000778) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
222
- Comment Load (0.000907) SELECT "comments".* FROM "comments" INNER JOIN posts ON comments.post_id = posts.id WHERE (("posts".author_id = 1)) 
223
- Comment Load (0.000854) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
224
- Comment Load (0.000825) SELECT "comments".* FROM "comments" INNER JOIN posts ON comments.post_id = posts.id WHERE (("posts".author_id = 1)) AND (comments.body LIKE '%e%') 
225
- Topic Load (0.000825) SELECT * FROM "topics" 
226
- Topic Load (0.000783) SELECT * FROM "topics" 
227
- Topic Load (0.000781) SELECT * FROM "topics" 
228
- Topic Load (0.000779) SELECT * FROM "topics" 
229
- Topic Load (0.000796) SELECT * FROM "topics" 
230
- Topic Load (0.000334) SELECT * FROM "topics" LIMIT 1
231
- Topic Load (0.000765) SELECT * FROM "topics" 
232
- Topic Load (0.000769) SELECT * FROM "topics" 
233
- Topic Load (0.000784) SELECT * FROM "topics" 
234
- Topic Load (0.000441) SELECT * FROM "topics" WHERE ("topics"."id" = 3) 
235
- Topic Load (0.000496) SELECT * FROM "topics" WHERE (written_on < '2005-07-15 09:28:00') 
236
- Topic Load (0.000318) SELECT * FROM "topics" WHERE ("topics"."id" = 2) 
237
- Topic Load (0.000326) SELECT * FROM "topics" WHERE (written_on < '2004-07-15 09:28:00') 
238
- Topic Load (0.001103) SELECT * FROM "topics" WHERE (written_on < '2005-07-15 09:28:00') 
239
- Topic Load (0.000733) SELECT * FROM "topics" WHERE (written_on < '2004-07-15 09:28:00') 
240
- Topic Load (0.000815) SELECT * FROM "topics" 
241
- Topic Create (0.000400) INSERT INTO "topics" ("title", "author_name", "type", "approved", "bonus_time", "replies_count", "author_email_address", "written_on", "content", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, 'test@test.com', '2008-04-30 00:24:07', NULL, NULL, NULL)
242
- Topic Load (0.000920) SELECT * FROM "topics" 
243
- Topic Load (0.001632) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
244
- Topic Load (0.001510) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
245
- Topic Load (0.000761) SELECT * FROM "topics" WHERE (replies_count > 0) 
246
- Topic Load (0.000738) SELECT * FROM "topics" WHERE (replies_count > 0) 
247
- Topic Load (0.000509) SELECT * FROM "topics" WHERE ((replies_count > 0) AND ("topics"."approved" = 't')) 
248
- Topic Load (0.001035) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
249
- Topic Load (0.000940) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
250
- Topic Load (0.000898) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
251
- SQL (0.000214) SELECT count(*) AS count_all FROM "topics" WHERE ("topics"."approved" = 't') 
252
- SQL (0.000200) SELECT count(*) AS count_all FROM "topics" WHERE ("topics"."approved" = 't') 
253
- Reply Load (0.000704) SELECT * FROM "topics" WHERE ( ("topics"."type" = 'Reply' OR "topics"."type" = 'SillyReply' ) ) 
254
- Reply Load (0.000613) SELECT * FROM "topics" WHERE ( ("topics"."type" = 'Reply' OR "topics"."type" = 'SillyReply' ) ) 
255
- Unable to load post, underlying cause no such file to load -- post.rb
256
-
257
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
258
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
259
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
260
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
261
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
262
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
263
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
264
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
265
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
266
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
267
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
268
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
269
- cases/named_scope_test.rb:9
270
- Unable to load author, underlying cause no such file to load -- author.rb
271
-
272
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
273
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
274
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
275
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
276
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
277
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
278
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
279
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
280
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
281
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
282
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
283
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
284
- cases/named_scope_test.rb:9
285
- Unable to load topic, underlying cause no such file to load -- topic.rb
286
-
287
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
288
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'
289
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
290
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
291
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
292
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
293
- ./cases/../../lib/../../activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
294
- ./cases/../../lib/active_record/fixtures.rb:854:in `try_to_load_dependency'
295
- ./cases/../../lib/active_record/fixtures.rb:869:in `require_fixture_classes'
296
- ./cases/../../lib/active_record/fixtures.rb:866:in `each'
297
- ./cases/../../lib/active_record/fixtures.rb:866:in `require_fixture_classes'
298
- ./cases/../../lib/active_record/fixtures.rb:849:in `fixtures'
299
- cases/named_scope_test.rb:9
300
- Topic Load (0.001968) SELECT * FROM "topics" 
301
- Topic Load (0.001587) SELECT * FROM "topics" 
302
- Topic Load (0.001227) SELECT * FROM "topics" 
303
- Topic Load (0.000737) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
304
- Topic Load (0.000648) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
305
- Topic Load (0.000668) SELECT * FROM "topics" WHERE (content LIKE '%Have%') 
306
- Topic Load (0.001049) SELECT * FROM "topics" 
307
- Topic Load (0.000886) SELECT * FROM "topics" 
308
- Topic Load (0.000795) SELECT * FROM "topics" 
309
- Topic Load (0.000600) SELECT * FROM "topics" LIMIT 1
310
- Topic Load (0.000330) SELECT * FROM "topics" LIMIT 1
311
- SQL (0.000160) SELECT count(*) AS count_all FROM "topics" 
312
- SQL (0.000155) SELECT count(*) AS count_all FROM "topics" 
313
- SQL (0.000175) SELECT avg("topics".replies_count) AS avg_replies_count FROM "topics" 
314
- SQL (0.000345) SELECT avg("topics".replies_count) AS avg_replies_count FROM "topics" 
315
- Topic Load (0.000858) SELECT * FROM "topics" 
316
- Author Load (0.000273) SELECT * FROM "authors" WHERE ("authors"."id" = 1) 
317
- Post Load (0.000498) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
318
- Post Load (0.000720) SELECT * FROM "posts" WHERE ("posts".author_id = 1) 
319
- Post Load (0.000482) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
320
- Post Load (0.000482) SELECT * FROM "posts" WHERE (body LIKE '%a%') 
321
- Post Load (0.000391) SELECT * FROM "posts" WHERE ("posts".author_id = 1) AND (body LIKE '%a%') 
322
- Author Load (0.000245) SELECT * FROM "authors" WHERE ("authors"."id" = 1) 
323
- Comment Load (0.000789) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
324
- Post Load (0.000692) SELECT * FROM "posts" WHERE ("posts".author_id = 1) 
325
- Comment Load (0.000767) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
326
- Comment Load (0.000879) SELECT "comments".* FROM "comments" INNER JOIN posts ON comments.post_id = posts.id WHERE (("posts".author_id = 1)) 
327
- Comment Load (0.000803) SELECT * FROM "comments" WHERE (comments.body LIKE '%e%') 
328
- Comment Load (0.000822) SELECT "comments".* FROM "comments" INNER JOIN posts ON comments.post_id = posts.id WHERE (("posts".author_id = 1)) AND (comments.body LIKE '%e%') 
329
- Topic Load (0.000823) SELECT * FROM "topics" 
330
- Topic Load (0.000792) SELECT * FROM "topics" 
331
- Topic Load (0.000794) SELECT * FROM "topics" 
332
- Topic Load (0.000813) SELECT * FROM "topics" 
333
- Topic Load (0.000769) SELECT * FROM "topics" 
334
- Topic Load (0.000316) SELECT * FROM "topics" LIMIT 1
335
- Topic Load (0.000777) SELECT * FROM "topics" 
336
- Topic Load (0.000800) SELECT * FROM "topics" 
337
- Topic Load (0.000795) SELECT * FROM "topics" 
338
- Topic Load (0.000391) SELECT * FROM "topics" WHERE ("topics"."id" = 3) 
339
- Topic Load (0.000499) SELECT * FROM "topics" WHERE (written_on < '2005-07-15 09:28:00') 
340
- Topic Load (0.000320) SELECT * FROM "topics" WHERE ("topics"."id" = 2) 
341
- Topic Load (0.000326) SELECT * FROM "topics" WHERE (written_on < '2004-07-15 09:28:00') 
342
- Topic Load (0.000491) SELECT * FROM "topics" WHERE (written_on < '2005-07-15 09:28:00') 
343
- Topic Load (0.000325) SELECT * FROM "topics" WHERE (written_on < '2004-07-15 09:28:00') 
344
- Topic Load (0.000821) SELECT * FROM "topics" 
345
- Topic Create (0.000383) INSERT INTO "topics" ("title", "author_name", "type", "approved", "bonus_time", "replies_count", "author_email_address", "written_on", "content", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, 'test@test.com', '2008-04-30 00:24:48', NULL, NULL, NULL)
346
- Topic Load (0.000944) SELECT * FROM "topics" 
347
- Topic Load (0.001618) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
348
- Topic Load (0.001445) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
349
- Topic Load (0.000720) SELECT * FROM "topics" WHERE (replies_count > 0) 
350
- Topic Load (0.000707) SELECT * FROM "topics" WHERE (replies_count > 0) 
351
- Topic Load (0.000494) SELECT * FROM "topics" WHERE ((replies_count > 0) AND ("topics"."approved" = 't')) 
352
- Topic Load (0.000863) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
353
- Topic Load (0.000855) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
354
- Topic Load (0.000867) SELECT * FROM "topics" WHERE ("topics"."approved" = 't') 
355
- SQL (0.000208) SELECT count(*) AS count_all FROM "topics" WHERE ("topics"."approved" = 't') 
356
- SQL (0.000195) SELECT count(*) AS count_all FROM "topics" WHERE ("topics"."approved" = 't') 
357
- Reply Load (0.000574) SELECT * FROM "topics" WHERE ( ("topics"."type" = 'Reply' OR "topics"."type" = 'SillyReply' ) ) 
358
- Reply Load (0.000504) SELECT * FROM "topics" WHERE ( ("topics"."type" = 'Reply' OR "topics"."type" = 'SillyReply' ) )