Project Details : Feature Request Project Enhancements

Hi, as I posted earlier, my project ‘GSoC 2015 Feature Request Enhancements‘ got selected with phpMyAdmin in Google Summer of Code, 2015. This are some details about the project : Project Details The project aims to provide some added functionality to the users in the above mentioned areas. The project involves implementing these RFEs over the summer:

  1. RFE #657: Alter privileges while renaming database/ table/ field
  • Current behaviour: No such option. We just create a copy of database but don’t change the privileges as such
  • Expected behaviour: Provide a checkbox (value = current status) to provide the user an option to copy the privileges
  • Implementation Procedure:
    1. Introduce a simple checkbox in the Operations tab in Rename database form
    2. Go on through the database, all tables and all columns specific privileges stored in mysql.db, mysql.tables_priv, mysql.columns_priv and update the rows with the old name to their new database name if the above mentioned check box was checked
    3. Print out a notice regarding its successful/ unsuccessful change of privileges
    4. Link to Screenshot

  2. RFE #1485: Add drop partition in partition maintenance

  • Current Behaviour: Suppose the table has partitions like p0, p1, …, p10. The Partition maintainence provides an option to drop the partitioning of the table itself but does not provide an option to drop a partition ‘p0’ and/or ‘p1’ etc.
  • Expected behaviour: This will add an option(radio button) of ‘Drop’ in the continuation to radio buttons of Analyze, Check etc. Options. Thus the workflow will be select whatever partition you want to drop, select drop radio button and click Go.
  • Implementation Procedure:
    1. Add a element (‘DROP’ => __(‘Drop’), ) to the choices array in PMA_getHtmlForPartitionMaintenance in operations.lib.php.
    2. Thus the PMA_getQueryAndResultForPartition method in operations.lib.php will automatically run the query ‘ALTER TABLE DROP PARTITION `p0`’ when drop radio button is selected from the Partition maintenance form
    3. Link to Screenshot

3. RFE #342One file per table export

  • Current Behaviour: Currently, we provide an option to check what tables we want to export from a database. But we add all the tables (structure and/or data) in a single file as export output.
  • Expected Behaviour: This will provide a compressed (may be .zip or .tar.gz) file with all the different files for each selected table. Thus, separate files will be created for all tables and all the created files exported through a single compressed file.
  • Implementation Procedure:
    1. Add a method to add HTML for a checkbox to decide whether all separate files to be exported
    2. One possible way is to make all the files separately on the server (may be in temp folder), add all these to a ZIP file (maybe through addFile function in zip.lib.php) and echo the headers and the zip file string to get a zip containing all separate export files.

4. RFE #946Change collation without changing data

  • Expected Behaviour: First of all, we should notify the user that this might corrupt the data. Also, the main thing is to protect against this in the backend.
  • Current Behaviour: Currently, when the collation of a column with already filled data is changed and then re-changed back to original collation might result in corruption of data.
  • Implementation Procedure:
    1. First of all let the user know in tbl_structure.php when he tries to change the column collation, that the column contains non-empty data in more than one rows and collation changes might result into corruption of data
    2. When the user changes from original column collation, run the query “ALTER TABLE $currentTable MODIFY $selectedColumn BLOB” and then reconvert to it to the changed collation “ALTER TABLE $currentTable MODIFY $selectedColumn CHAR(50) CHARSET $newCollation”
    3. The function will be designed as such that it would be fitting to use in the below RFE as well

  5. RFE #726Batch changing collation of each column in a table

  • Current Behaviour: As pointed out in the ticket, we currently don’t provide such an option of batch changing collation and so to change it for all the columns, user would require to change it manually selecting it for every column
  • Expected Behaviour: Along with the current functionality, this feature will provide an added option to change it across all the columns in the table.
  • Implementation Procedure:
      1. Add a checkbox, next to “Index” in the options row of “With Selected : “ on tbl_structure.php
      2. When this checkbox is selected and run, this will take the user to a Modal (maybe), which will have all the collations listed and the user can select the collation he wants all the selected columns to change to.
      3. If these columns have already filled data in some rows, the approach of the above RFE will be used and the function designed will be looped through for all the selected columns
      4. Link to screenshot

  6. RFE #1594More plain English configuration options for icon link destinations

  • Current Behaviour: Currently we have script names like ‘tbl_structure.php, ‘tbl_sql.php’ etc. as options to select. Such script names should not be used as options rather they should be mapped to more plain English strings like ‘Search’, ‘Structure’ etc.
  • Expected Behaviour: The names of configuration options provided for icon links destination would be more plain English strings as menioned above. These changes will be mainly done in $cfg['NavigationTreeDefaultTabTable'], $cfg['DefaultTabServer'] = 'index.php', $cfg['DefaultTabDatabase'] = 'db_structure.php', $cfg['DefaultTabTable'] = 'sql.php'.
  • Implementation Procedure:
      1. We can include the values like ‘structure’ , ‘search’ etc. in the possible values for this configuration option (as mentioned on the ticket)
      2. The switch-case statement(s) in Node_table.class.php constructor would have to be modified to accommodate these changes. Also, to map the corresponding files(like tbl_sql.php, tbl_structure.php etc.) required for generating the ‘$links’ array, we can just use a simple associative array which would be returned by a function inside the class (like used in the function getTitleForTarget in Util.class.php).
      3. The changes in the possible values would reflect in prefs_forms.php in ‘Settings’ tab.
      4. Other 2 configuration options would also be implemented in a similar way.

  7. RFE #1060: Designer Settings should be a part of settings data

  • Current Behaviour: Currently, the settings that are set in Database designer i.e. db_designer.php are not stored as a part of settings data
  • Expected Behaviour: These settings should be stored as part of settings data that is already stored. This would make it more user-friendly as also will increase uniformity across all PMA features
  • Implementation Procedure:
      1. The Settings for the designer can be stored in a HTML5 session storage
      2. Also, if the settings like ‘Snap to Grid’ is on in the session storage, and the user returns to the Designer later, the setting remains on but does not show on the toolbar as green. This can be checked and changed while printing the class in db_designer.lib.php.

8. RFE #1396: Support MySQL 5.6 SHA secure password

  • Current Behaviour: Currently we have PASSWORD() and OLD_PASSWORD() method for password hashing that are supported by the PHP mysqlnd library. But with MySQL 5.6, we have another method available i.e. sha256 password authentication plugin.
  • Expected Behaviour: This RFE requests the new sha256 support to be added to PMA.
  • Implementation Procedure: Though I am not very clear about the implementation of this RFE at present, I will with the mentor’s and community’s help will come up with a proper strategy.

9. RFE #1359: Better Navigation in Grid editor

  • Current Behaviour: Currently, we support Ctrl + Arrows navigation in tbl_change.php
  • Expected Behaviour: In addition to the original functionality, we should provide such a navigation in the JS grid editor so that it becomes easy to navigate while editing the cells.
  • Implementation Procedure:
      1. Adds methods to handle the Ctrl + Arrow Keys in makegrid.js
      2. It will provide a way to change the ‘isCellEditActive’ flag through Ctrl+arrow keys accordingly.

10. RFE #701: Print View CSS

  • Current Behaviour: Currently we provide a feature to ‘Print View’ and ‘Print View (with Full texts)’ but that prints only the result of final ‘SELECT’ sql query.
  • Expected Behaviour: Sometimes the queries like that mentioned in the ticket description would require not only the final ‘Select’ query to be printed but also the operations before that. This would add a feature to print the specific stylesheet so that the final output as it is printed (i.e. both the effects of operations as well as the select query)
  • Implementation Procedure:
      1. Add a new feature button ‘Print Output’ to the DisplayResults.class.php method _getResultOperations
      2. Add the handlers and function calls similar to db_printview.php, tbl_printview.php etc.
      3. The major difference is that the created methods will not again run the query but take the outputted results HTML as an input and print them so that the problem mentioned is removed

11. RFE #1163: SET NAMES option on using custom collation/ charset

  • Current Behaviour: Currently we have an option to set the server connection collation on the main (index) page. Now, if this variable is set PMA runs query : “SET CHARACTER SET ‘$default_charset’ ” and “SET connection_collation = ‘$newValue’ ”
  • Expected Behaviour: In addition to the current available options, the feature expects added functionality of user being able to run “SET NAMES ‘$charset’ [COLLATION ‘$collation’]“ so that it might be able to change the character set that the MySQL will expect further messages from this client.
  • Implementation Procedure:
    1. Add a select box to the main page below the Collation connection one.
    2. Add an appropriate method to handle the request in Database interface class similar to what is currently done in postConnect()

Deliverables: The complete implementation patches for all the above RFEs implemented and tests for some components if required. Proper documentation will be provided and merged with existing documentation.

Timeline:

Week #

Duration Work expected
1 25thMay – 31st May RFE #1485: Add a Drop Partition option
2 1nd June – 7th June RFE #657: Alter privileges while renaming databases, tables, fields etc.
3 8th June – 14th June RFE #701: Print View CSS
4 15th June – 21st June RFE #946: Changing column collation without changing data
5 22nd June – 28th June RFE #726: Batch changing column collations

MID TERM EVALUATIONS

6 29thJune– 5th July RFE #1359: Better Navigation in Grid Editor
7 6th July– 12th July RFE #1163: SET NAMES on using custom collation/ charset
8 13th July – 19th July RFE #1060: Designer Settings should be a part of settings data
9 20th July– 26th July RFE #342: One file per Table export
10 27thJuly – 2nd August RFE #1594More plain English configuration options for icon link destinations
11 3rd  August – 9th August RFE #1396: Support MySQL 5.6 SHA secure password

 

Advertisements

About Deven Bansod

I am a final year undergraduate student pursuing B.E.(Hons.) Computer Science Engg. + M.Sc.(Hons.) Economics(Dual Degree) at BITS Pilani, Pilani (India). I am interested in and have been contributing to development of PHP-based Open Source organisations. More recently, I have been contributing to phpMyAdmin, a web interface to MySQL, written in PHP.

Posted on April 28, 2015, in GSoC 2015 and tagged , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: