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
On 19/06/12 10:59, Atul Pratap Singh wrote:
Hi Marc, While taking a look at the Db-search functionality I noticed a bug. Steps:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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
As far as I know this is due to the badly coded deleteResult() function in db_search.js file. If the rows can be deleted, they will be deleted. But in the case where there is an error, for example due to referential constrains, no error message is displayed.
Bye, Rouslan
On Tue, Jun 19, 2012 at 3:34 PM, Rouslan Placella rouslan@placella.comwrote:
On 19/06/12 10:59, Atul Pratap Singh wrote:
Hi Marc, While taking a look at the Db-search functionality I noticed a bug. Steps:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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
As far as I know this is due to the badly coded deleteResult() function in db_search.js file. If the rows can be deleted, they will be deleted.
I have checked after deleting, but the rows again show up when searching again.
But in the case where there is an error, for example due to referential constrains, no error message is displayed.
Bye, Rouslan
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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.
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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
Bye, Rouslan
On Tue, Jun 19, 2012 at 4:20 PM, Rouslan Placella rouslan@placella.comwrote:
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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
Open database sakila -> open search tab -> enter keyword "the" -> 'select all' tables -> click 'Go' In results -> click on 'delete' for any table -> check again if deleted.
Bye, Rouslan
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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.
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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 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
On Tue, Jun 19, 2012 at 4:47 PM, Rouslan Placella rouslan@placella.comwrote:
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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].
[0] https://github.com/zixtor/phpmyadmin/commit/4ccf9b29b217d4dadadc496d4427695f...
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
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Le 2012-06-19 08:57, Atul Pratap Singh a écrit :
On Tue, Jun 19, 2012 at 4:47 PM, Rouslan Placella rouslan@placella.comwrote:
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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/4ccf9b29b217d4dadadc496d4427695f...
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
On Tue, Jun 19, 2012 at 4:40 PM, Marc Delisle marc@infomarc.info 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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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)
Marc,
Deletion doesn't happen in a table with no foreign constraints also, like sakila.'country'. Also I didn't see any error message after the GET request.
sql.php is not even called in an Ajax way.
-- Marc Delisle http://infomarc.info
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On 19/06/12 12:22, Atul Pratap Singh wrote:
On Tue, Jun 19, 2012 at 4:40 PM, Marc Delislemarc@infomarc.info 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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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)
Marc,
Deletion doesn't happen in a table with no foreign constraints also, like sakila.'country'.
sakila.country is linked to sakila.city. Clearly you can't have cities that don't belong to a country.
Try searching for "11" in sakila.film_actor, there will be about 300 results, all of them can be deleted successfully.
Also I didn't see any error message after the GET request.
Look at the server response in your firebug console.
sql.php is not even called in an Ajax way.
On Tue, Jun 19, 2012 at 4:57 PM, Rouslan Placella rouslan@placella.comwrote:
On 19/06/12 12:22, Atul Pratap Singh wrote:
On Tue, Jun 19, 2012 at 4:40 PM, Marc Delislemarc@infomarc.info
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:
- Open db-search tab for a database.
- Make a search by entering a keyword and selecting all tables.
- 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)
Marc,
Deletion doesn't happen in a table with no foreign constraints also, like sakila.'country'.
sakila.country is linked to sakila.city. Clearly you can't have cities that don't belong to a country.
Try searching for "11" in sakila.film_actor, there will be about 300 results, all of them can be deleted successfully.
Thanks, I saw the error. So, the actual problem is the error message not being displayed.
Also I didn't see any error message after the GET request.
Look at the server response in your firebug console.
sql.php is not even called in an Ajax way.
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel