r74273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74272‎ | r74273 | r74274 >
Date:20:55, 4 October 2010
Author:hashar
Status:reverted (Comments)
Tags:
Comment:
Profiling table (optional) for SQLite
Modified paths:
  • /trunk/phase3/maintenance/sqlite/archives/patch-profiling.sql (added) (history)

Diff [purge]

Index: trunk/phase3/maintenance/sqlite/archives/patch-profiling.sql
@@ -0,0 +1,11 @@
 2+-- profiling table for SQLite
 3+-- This is optional
 4+
 5+CREATE TABLE /*$wgDBprefix*/profiling (
 6+ pf_count int NOT NULL default 0,
 7+ pf_time float NOT NULL default 0,
 8+ pf_memory float NOT NULL default 0,
 9+ pf_name varchar(255) NOT NULL default '',
 10+ pf_server varchar(30) NOT NULL default '',
 11+ PRIMARY KEY (pf_name, pf_server)
 12+);

Follow-up revisions

RevisionCommit summaryAuthorDate
r74429Revert r74273 per CR: this patch is not needed because our SQL conversion mag...maxsem16:20, 7 October 2010

Comments

#Comment by MaxSem (talk | contribs)   04:52, 5 October 2010

If this is a SQLite-specific patch, it should use SQLite-specific types. And where is the code that uses this table?

#Comment by Hashar (talk | contribs)   06:21, 5 October 2010

The profiling code is already in MediaWiki : http://www.mediawiki.org/wiki/Manual:How_to_debug#Profiling

Above code is a copy of trunk/phase3/maintenance/archives/patch-profiling.sql without MySQL specific terms (namely : ENGINE=HEAP and the UNIQUE keyword).

#Comment by MaxSem (talk | contribs)   07:19, 5 October 2010

SQLite types are different from the MySQL ones. There are conversion routines in DatabaseSqlite::sourceStream() that cater for basic language differences. So either we can consume the MySQL file and your addition is not needed (I'll check this when I come back from work), or your addition should be 100% SQLite-specific, with its native types (INTEGER instead of int, REXT instead of varchar and so on).

#Comment by Hashar (talk | contribs)   12:19, 5 October 2010

I was not aware of the automatic conversion. We might want to create a maintenance script to populate the profiling table.

#Comment by MaxSem (talk | contribs)   12:35, 5 October 2010

We have patchSql.php for that.

Status & tagging log