]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
tweaks for mysql
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 29 Sep 2006 20:28:43 +0000 (20:28 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 29 Sep 2006 20:28:43 +0000 (20:28 +0000)
test/perf/massload.py

index 2efb650aaa49be53ecea706ae34960924fe0ce09..480aebe718afacf182f7e4f5c6cb88844073fb5c 100644 (file)
@@ -35,7 +35,7 @@ class LoadTest(AssertMixin):
         clear_mappers()
         for x in range(1,NUM/500+1):
             l = []
-            for y in range(x*500-500, x*500):
+            for y in range(x*500-500 + 1, x*500 + 1):
                 l.append({'item_id':y, 'value':'this is item #%d' % y})
             items.insert().execute(*l)
             
@@ -48,7 +48,7 @@ class LoadTest(AssertMixin):
         for x in range (1,NUM/100):
             # this is not needed with cpython which clears non-circular refs immediately
             #gc.collect()
-            l = query.select(items.c.item_id.between(x*100 - 100, x*100 - 1))
+            l = query.select(items.c.item_id.between(x*100 - 100 + 1, x*100))
             assert len(l) == 100
             print "loaded ", len(l), " items "
             # modifying each object will insure that the objects get placed in the "dirty" list