From 7affbc505b0367e9034dbc8c368e38f73349fe8d Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 11 Oct 2007 05:19:56 +0000 Subject: [PATCH] Why is it there ???? bzr revid: ced-8e946c402962a6253c9f199537b7d1fa97ee1663 --- bin/sql_db.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/bin/sql_db.py b/bin/sql_db.py index 21f66a28d2d..91457922b31 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -57,38 +57,6 @@ class fake_cursor: self.con = con self.dbname = dbname - def execute(self,*args): - #if not fake_cursor.nbr % 1: - # print 'sql: ',fake_cursor.nbr, args - res = re.match('^select.* from ([a-zA-Z_]+) .*$', args[0], re.I) - if res: - fake_cursor._tables.setdefault(res.group(1), 0) - fake_cursor._tables[res.group(1)] += 1 - - #else: - # if len(args)>1: - # print 'sql: ',fake_cursor.nbr, args[0], args[1] - # else: - # print 'sql: ',fake_cursor.nbr, args[0] - - if not fake_cursor.nbr % 500: - ct = [] - for t,c in fake_cursor._tables.items(): - ct.append([c,t]) - ct.sort() - ct.reverse() - print 'After %d queries' % (fake_cursor.nbr,) - for line in ct[:50]: - print ' %s: %d' % (line[1], line[0]) - - #if len(args)>1: - # print 'sql: ',fake_cursor.nbr, args[0], args[1] - #else: - # print 'sql: ',fake_cursor.nbr, args[0] - - fake_cursor.nbr += 1 - return self.obj.execute(*args) - def execute(self, sql, params=None): if not params: params=()