In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001154 [In-Portal CMS] Database refactoring always 2011-11-01 22:25 2012-07-25 05:32
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Platform
Status closed   OS
  OS Version
ETA none Fixed in Version 5.2.0-B1 Product Version
  Target Version 5.2.0 Product Build
Time EstimateNo estimate
Summary 0001154: Optimization of TableFound function
Description Class kDBConnection has TableFound function, that does "SHOW TABLES LIKE TableName" each time it is called with a new table name.

The way of improving it:

- get list of all tables on first function call and then do in_array on every repeated call
Steps To Reproduce
Additional Information I planned this optimization to perform specific actions only, when specific tables are found (for 0001153 task). Right now I think, that it's better to use kApplication::findModule method rather, then implementing this task.
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-dev/SjYoSlXVk3I/discussion
Change Log Message Improved of TableFound function
Estimate Points 1
Attached Files patch file icon table_found_1154.patch [^] (1,186 bytes) 2011-11-02 12:44 [Show Content]
patch file icon table_found_1154.2.patch [^] (7,681 bytes) 2011-11-07 09:12 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0001153active (Icebox) Minimizing In-Portal CORE 

-  Notes
User avatar (0004122)
erik (manager)
2011-11-02 12:45

patch attached - needs testing
User avatar (0004132)
alex (manager)
2011-11-03 06:41

kDBConnection::TableFound method used bunch of times and during installation/upgrade too, so you need to:

1. use "$force" parameter when TableFound method is called during installation
2. add "$force" parameter to kApplication::TableFound, that call kDBConnection::TableFound method
3. next time search for method usages, when changing it's declaration.
4. who knows what tables names could, you better use "qstr" to escape table name used in "SHOW TABLES LIKE" statement within TableFound function.
User avatar (0004140)
erik (manager)
2011-11-07 09:12

table_found_1154.2.patch attached - needs testing
User avatar (0004184)
alex (manager)
2011-11-30 08:33

ok
User avatar (0004185)
alex (manager)
2011-11-30 08:34

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001154: Optimization of TableFound function
User avatar (0005042)
alex (manager)
2012-07-25 05:32

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r14811
Timestamp: 2011-11-30 08:34:58
Author: alex
Details ] Diff ]
Fixes 0001154: Optimization of TableFound function
mod - /in-portal/branches/5.2.x/core/install/upgrades.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/db/db_connection.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/managers/cache_manager.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/session/session_storage.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/custom_data/custom_data_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/multilanguage_helper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:32 alex Note Added: 0005042
2012-07-25 05:32 alex Status resolved => closed
2011-11-30 08:34 alex Changeset attached 5.2.x r14811
2011-11-30 08:34 alex Note Added: 0004185
2011-11-30 08:34 alex Status reviewed and tested => resolved
2011-11-30 08:34 alex Fixed in Version => 5.2.0-B1
2011-11-30 08:34 alex Resolution open => fixed
2011-11-30 08:34 alex Assigned To !COMMUNITY => alex
2011-11-30 08:33 alex Note Added: 0004184
2011-11-30 08:33 alex Assigned To alex => !COMMUNITY
2011-11-30 08:33 alex Status needs testing => reviewed and tested
2011-11-07 09:12 erik Note Added: 0004140
2011-11-07 09:12 erik Assigned To erik => alex
2011-11-07 09:12 erik Status needs work => needs testing
2011-11-07 09:12 erik File Added: table_found_1154.2.patch
2011-11-03 06:41 alex Note Added: 0004132
2011-11-03 06:41 alex Assigned To alex => erik
2011-11-03 06:41 alex Status needs testing => needs work
2011-11-02 12:45 erik Note Added: 0004122
2011-11-02 12:45 erik Assigned To erik => alex
2011-11-02 12:45 erik Developer => erik
2011-11-02 12:45 erik Status needs work => needs testing
2011-11-02 12:44 erik File Added: table_found_1154.patch
2011-11-02 11:51 Dmitry Assigned To => erik
2011-11-02 11:51 Dmitry Status active => needs work
2011-11-02 03:53 alex Relationship added related to 0001153
2011-11-02 03:53 alex Reporter Dmitry => alex
2011-11-02 03:53 alex Additional Information Updated View Revisions
2011-11-01 22:25 Dmitry New Issue
2011-11-01 22:25 Dmitry Reference => https://groups.google.com/d/topic/in-portal-dev/SjYoSlXVk3I/discussion
2011-11-01 22:25 Dmitry Change Log Message => Improved of TableFound function
2011-11-01 22:25 Dmitry Estimate Points => 1



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker