Freitag, 24. Juli 2009

Status report July 18th - 24th



Hi all,

KEY ACCOMPLISHMENTS LAST WEEK
=============================
- I added a separate filter functionality to the tracking report.
Now it is possible to list data definition, data manipulation
or both kinds of statements. Date ranges are supported.

- Secondly I added an user filter. PMA_Tracker tracks the
logged in username. The tracking report page supports
to list all tracked usernames (*), one username or a list
of usernames with ',' as delimiter.

- The export form uses the described filter settings.

- I added a new export option: "SQL dump as file download".
Users can directly download the statements.

- I did some work on the SQL dump page. It shows the SQL query
form now. The lines

CREATE database IF NOT EXISTS pma_temp_db;
USE pma_temp_db;

will automatically added to the dump. The user can copy the whole
dump to the clipboard or execute it by clicking on the submit button.
If he submits it he gets a "temporary" table and can do fine things
with it (use PMA export functionality for example).

- I decided to cut off `dbname` . prefixes from tracked statements.
I used a Perl regular expression for that. Only without these prefixes
the dump export to other databases is possible.

- I merged my Subversion branch with trunk/phpMyAdmin and
committed the changes. Not a big job, but good to see that it worked.

- German translation added.


KEY TASKS THAT STALLED
======================
I tried to use libraries/sqlparser.lib.php within my PMA_Tracker
but it produces a lot of notices.
In addition PMA_SQP_analyze() works only for SELECT queries.
Did not see an easy (time-efficient) way to enable it for my PMA_Tracker
so I reduced the queue priority for this job.


KEY CONCERNS
============
Tracking for whole databases is still open.


TASKS IN THE UPCOMING WEEK
==========================
- Create first prototype of tracking page for databases / set of tables.
- Add handlers for CREATE/DROP INDEX, CREATE/ALTER/DROP VIEW.
- Inform users about deactivated tracking versions (use an icon or
notice message).


Finally I want to call attention to

http://demo.phpmyadmin.net/gsoc-alex/

Its a copy of my svn branch (thanks to Michal).

Best regards and have a nice WE

Alexander

Freitag, 17. Juli 2009

Status report July 13th - 17th

Hi all,

here is my report:

KEY ACCOMPLISHMENTS LAST WEEK
=============================
- I got my own SVN branch phpmyadmin/branches/gsoc/alex/phpMyAdmin
(thanks to Marc for the permissions).

- SVN copy from trunk/phpMyAdmin was unexpected not easy for me, because I made the mistake to use http instead of https and so I got the error message "502 BAD GATEWAY". First I thought it was a problem with my subclipse plugin but then I found the hint about the protocol and then the copy process worked fine.

- Switched from Eclipse 3.2 to NetBeans IDE 6.7. PHP eclipse nerved
me because it was sometimes unstable and did not open some files. NetBeans seems to be more optimized for PHP development.

- Did some work on my code too :)
Here is a summary of my committed changes to SVN branch:

+ First tracking mechanism patch applied.
+ Problems causing PHP notices solved.
+ Some useless PMA_DBI_select_db() calls removed.
+ Bug: after renaming a table the list of tracking versions is broken (Fixed)
+ Using PMA_query_as_controluser where it is possible.
+ New tab "Tracking" for the table view added.
+ A little bit PMA_Tracker code refactoring.
+ SQL dump of pma_tracking to scripts/create_tables.sql added.
+ Localization introduced, using string vars in english-utf-8.inc.php for outputs.
+ Short php tags and short print instruction removed how it is recommended in PEAR coding standards.
(Thanks to Michal for the helpful hints).

KEY TASKS THAT STALLED
======================
Parsing for additional commands like ALTER VIEW etc.
First I want to read and tryout PMA SQL parse functions.
It makes more sense to optimize the parser of PMA_Tracker before
adding new types of SQL statements.

KEY CONCERNS
============
Tracking functionality for whole databases. At current status a user has to select every single table that he wants to track.

Is it possible to forward prepared SQL dump code to the export script of PMA ? When yes I could use it to deliver more export types than SQL dump and SQL execution.

TASKS IN THE UPCOMING WEEK
==========================
- Make me familiar with the PMA SQL parser library / functions.
- Try to use PMA SQL parser library.
- I think it would be a good idea to track the usernames too. I will add
this attribute to the tracker log and build a filter to the tracking report.

Best regards and have a nice WE

Alexander

Sonntag, 12. Juli 2009

First version finished



Hi all,

I finished my part for Googles mid term evaluation.
Please feel free to try out my code, you will find it here:

http://page.mi.fu-berlin.de/rutkowsk/tracking_mechanism.zip

KEY ACCOMPLISHMENTS LAST WEEKS
==============================
Finished following functionalities:
- Tables can be tracked by mechanism now
- System logs data definition and data manipulation statements:
INSERT, UDATE, DELETE, TRUNCATE, ALTER TABLE, RENAME TABLE
- Tracking can be activated for a subset of these commands
- Tables with active tracking are marked with an "eye" icon.
- Simple versioning system. User can create new tracking versions.
- Deactivation and Reactivation of tracking jobs is possible.
- Simple schema (structure) snapshot, uses SHOW FULL COLUMNS FROM and
SHOW INDEX FROM
- When user is selecting a tracked table, a notice will printed out
- Switching between tables within a database is possible
- Tracking report is available. Contains dates and statements.
- Simple export form added, it can be used for undo action.
(structure only|data only|both) -> (SQL dump|SQL execution)
- Date_from - Date_to range selection for exports added.

KEY CONCERNS
============
I want to teach the tracker more SQL statements:
ALTER VIEW, CREATE INDEX, DROP INDEX

Tracker should handle whole databases.

TASKS IN THE UPCOMING WEEK(S)
=============================
- Evaluate your feedback to my PMA_Tracker
- Localize english-only strings
- Add more export possibilities
- Snapshot comparison would be fine
- Prettify some layout elements

I hope you are happy about the new Tracker, please send me your
feedback. I need it for a successful progress.