[Phpmyadmin-devel] Refactoring db_search.php

Marc Delisle marc at infomarc.info
Tue Jun 19 18:39:53 CEST 2012


Le 2012-06-19 08:57, Atul Pratap Singh a écrit :
> On Tue, Jun 19, 2012 at 4:47 PM, Rouslan Placella <rouslan at placella.com>wrote:
> 
>> On 19/06/12 12:10, Marc Delisle wrote:
>>> Le 2012-06-19 06:50, Rouslan Placella a écrit :
>>>> On 19/06/12 11:47, Marc Delisle wrote:
>>>>> Le 2012-06-19 05:59, Atul Pratap Singh a écrit :
>>>>>> Hi Marc,
>>>>>> While taking a look at the Db-search functionality I noticed a bug.
>>>>>> Steps:
>>>>>> 1. Open db-search tab for a database.
>>>>>> 2. Make a search by entering a keyword and selecting all tables.
>>>>>> 3. From the 'browse' and 'delete' links in search results, select
>> 'delete'
>>>>>> for any table.
>>>>>> 4. Notice that a DELETE query is sent to sql.php. But no actual
>> deletion
>>>>>> happens.
>>>>>>
>>>>>> Regards
>>>>>
>>>>> Hi Atul,
>>>>> with current upstream master or your current repository, I cannot
>>>>> reproduce this bug.
>>>>>
>>>>> Please show us a short, sample export to reproduce the bug.
>>>>>
>>>>
>>>> Try searching for "pen" in sakila.actor
>>>
>>> Indeed, on the results page, trying to delete the one match in table
>>> "address" gives this on the first GET to sql.php, as seen with Firebug:
>>>
>>> #1451 - Cannot delete or update a parent row: a foreign key constraint
>>> fails (`sakila`.`customer`, CONSTRAINT `fk_customer_address` FOREIGN KEY
>>> (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE)
>>>
>>> sql.php is not even called in an Ajax way.
>>
>> sql.php is being called via the evil .load()[0] method. None the less,
>> it should be possible to at least show the error
> 
> Fixed the SQL results display while deleting in [0].

Looks fine, thanks. Now pushed to upstream.

> 
> [0]
> https://github.com/zixtor/phpmyadmin/commit/4ccf9b29b217d4dadadc496d4427695f490be7ac
> 
>> without rewriting the
>> whole functionality as that will require quite a lot of changes on the
>> server side as far as I can see.
>>
>> Bye,
>> Rouslan
>>
>> [0]: http://api.jquery.com/load/



-- 
Marc Delisle
http://infomarc.info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120619/4a53f2a3/attachment.sig>


More information about the Developers mailing list