Hey all,
I am Smita, 1st Year postgraduate student at IIIT, Hyderabad. I am looking forward to participate in GSOC 2014, and thought of contributing to PhpMyAdmin. I have set up the system and was going through the codebase and the buglist. I know its little early but As currently I have my winter vacation, its good time for me to understand the codebase the system.
I was able to reproduce the bug #3909[0] and I think I am able to find the reason for the same, the problem is, we are saving the order by preference in the pma db as tablname.column_name and when we query again on same db and the table, it append the saved order by preference tablname.column_name but when using alias it doesn't find tablname.column_name instead it needs either alias.column_name or just order by column_name. so for fixing it, either we can check if the query is using aliasing and if yes then while appending replace the table_name with alias_name in saved preference or while appending the order by just append the column_name from saved preference instead of appending tablname.column_name, I have used latter one to fix it and working fine on my local system. I'm not getting any test case where it may fail. Please suggest if it would be fine.
Also, while fixing this bug, i got another bug that is, if instead of ordering on a column using UI we make a query having order by caluse tablname.coloname or just column_name without backquoting. it doesn't retain the preference , actually it saves and delete next time as it doesn't matches with backquoted tablename.colum_name. I have also fixed this issue, by matching the saved preference with unquoted column names from the given table.