In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1154 [In-Portal CMS] Database refactoring always 2011-11-01 22:25 2012-07-25 05:32
alex  
alex  
normal  
closed  
fixed  
 
none 5.2.0-B1  
https://groups.google.com/d/topic/in-portal-dev/SjYoSlXVk3I/discussion
Improved of TableFound function
1
0001154: Optimization of TableFound function
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
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.
related to 0001153active  (Icebox) Minimizing In-Portal CORE 
patch table_found_1154.patch (1,186) 2011-11-02 12:44
http://tracker.in-portal.org/file_download.php?file_id=1289&type=bug
patch table_found_1154.2.patch (7,681) 2011-11-07 09:12
http://tracker.in-portal.org/file_download.php?file_id=1303&type=bug
Issue History
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 bug_revision_view_page.php?rev_id=904#r904
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

Notes
(0004122)
erik   
2011-11-02 12:45   
patch attached - needs testing
(0004132)
alex   
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.
(0004140)
erik   
2011-11-07 09:12   
table_found_1154.2.patch attached - needs testing
(0004184)
alex   
2011-11-30 08:33   
ok
(0004185)
alex   
2011-11-30 08:34   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0001154: Optimization of TableFound function
(0005042)
alex   
2012-07-25 05:32   
Since 5.2.0 version was released.