Hi,
I got basic inline editing working for fields that are not transformed/relational/enum fields a while back, by posting the changes to tbl_replace.php. This is the same script that is called by tbl_change.php, the script that is used to edit a row in a table without the use of JS. After tbl_replace.php parses the request, it includes sql.php, which executes the SQL query that actually updates the table for me during the Ajax request. However, the message that is shown at the end of the Ajax request is '0 rows affected (Query took foo seconds)'.
Clearly, something is not right and the $num_rows variable is not being correctly populated by PMA_DBI_affected_rows(). I used the Netbeans debugger to dig around a little, and there is no query other than the update query being executed before the call to PMA_DBI_affected_rows(). What could cause this?
This behaviour can be seen in commit c0db21c to my repository.
Ninad Pundalik a écrit :
Hi,
I got basic inline editing working for fields that are not transformed/relational/enum fields a while back, by posting the changes to tbl_replace.php. This is the same script that is called by tbl_change.php, the script that is used to edit a row in a table without the use of JS. After tbl_replace.php parses the request, it includes sql.php, which executes the SQL query that actually updates the table for me during the Ajax request. However, the message that is shown at the end of the Ajax request is '0 rows affected (Query took foo seconds)'.
Clearly, something is not right and the $num_rows variable is not being correctly populated by PMA_DBI_affected_rows(). I used the Netbeans debugger to dig around a little, and there is no query other than the update query being executed before the call to PMA_DBI_affected_rows(). What could cause this?
I don't have the answer right now, I just want to clarify that this problematic error message also happens (in your tree) when you just insert a row.
Ninad Pundalik a écrit :
Clearly, something is not right and the $num_rows variable is not being correctly populated by PMA_DBI_affected_rows(). I used the Netbeans debugger to dig around a little, and there is no query other than the update query being executed before the call to PMA_DBI_affected_rows(). What could cause this?
This behaviour can be seen in commit c0db21c to my repository.
Problem happens with $cfg['Servers'][$i]['extension'] = 'mysql';
but does not happen (for me) with $cfg['Servers'][$i]['extension'] = 'mysqli';
Please confirm.
Marc Delisle a écrit :
Ninad Pundalik a écrit :
Clearly, something is not right and the $num_rows variable is not being correctly populated by PMA_DBI_affected_rows(). I used the Netbeans debugger to dig around a little, and there is no query other than the update query being executed before the call to PMA_DBI_affected_rows(). What could cause this?
This behaviour can be seen in commit c0db21c to my repository.
Problem happens with $cfg['Servers'][$i]['extension'] = 'mysql';
but does not happen (for me) with $cfg['Servers'][$i]['extension'] = 'mysqli';
Please confirm.
However all is fine on another server with the mysql extension. The difference is that this other server is not using the mysqlnd extension (it's running PHP 5.2.13).
My problematic server runs PHP 5.3.2 + mysqlnd. In fact, QA_3_3 also exhibits this problem on this server, so it's not a problem in master's or Ninad's tree.
Ninad, which PHP are you using?
Marc Delisle a écrit :
Marc Delisle a écrit :
Ninad Pundalik a écrit :
Clearly, something is not right and the $num_rows variable is not being correctly populated by PMA_DBI_affected_rows(). I used the Netbeans debugger to dig around a little, and there is no query other than the update query being executed before the call to PMA_DBI_affected_rows(). What could cause this?
This behaviour can be seen in commit c0db21c to my repository.
Problem happens with $cfg['Servers'][$i]['extension'] = 'mysql';
but does not happen (for me) with $cfg['Servers'][$i]['extension'] = 'mysqli';
Please confirm.
However all is fine on another server with the mysql extension. The difference is that this other server is not using the mysqlnd extension (it's running PHP 5.2.13).
My problematic server runs PHP 5.3.2 + mysqlnd. In fact, QA_3_3 also exhibits this problem on this server, so it's not a problem in master's or Ninad's tree.
Ninad, which PHP are you using?
Problem exists also when using PHP 5.3.3. I'll search about this.
On 23/07/2010, Marc Delisle marc@infomarc.info wrote:
Problem happens with $cfg['Servers'][$i]['extension'] = 'mysql';
but does not happen (for me) with $cfg['Servers'][$i]['extension'] = 'mysqli';
Please confirm.
Happens even after switching to the mysqli extension. :(
However all is fine on another server with the mysql extension. The difference is that this other server is not using the mysqlnd extension (it's running PHP 5.2.13).
My problematic server runs PHP 5.3.2 + mysqlnd. In fact, QA_3_3 also exhibits this problem on this server, so it's not a problem in master's or Ninad's tree.
Ninad, which PHP are you using?
PHP 5.3.2 + mysql extension. (It's the default .deb package that comes bundled in Ubuntu's LAMP installation task).
Problem exists also when using PHP 5.3.3. I'll search about this.
Ninad Pundalik a écrit :
On 23/07/2010, Marc Delisle marc@infomarc.info wrote:
Problem happens with $cfg['Servers'][$i]['extension'] = 'mysql';
but does not happen (for me) with $cfg['Servers'][$i]['extension'] = 'mysqli';
Please confirm.
Happens even after switching to the mysqli extension. :(
Are you 100% sure of this? Because here, I solidly cannot reproduce the problem while using mysqli, both when inserting rows and editing inline.
Do you have mysqlnd? (can be seen on phpMyAdmin's home page in "MySQL client")
If not, which MySQL server version and client library version?
On 24/07/2010, Marc Delisle marc@infomarc.info wrote:
Happens even after switching to the mysqli extension. :(
Are you 100% sure of this? Because here, I solidly cannot reproduce the problem while using mysqli, both when inserting rows and editing inline.
Ummm, just a minute. I forgot that we are talking about remote MySQL servers. I'll get access to another machine tomorrow, so I'll confirm then.
Do you have mysqlnd? (can be seen on phpMyAdmin's home page in "MySQL client")
If not, which MySQL server version and client library version?
On my local system: Server version: 5.1.41-3ubuntu12.3 MySQL client version: 5.1.41
On the remote system that I'll setup tomorrow, I'll be installing the latest version of XAMPP, so the server/client version will be the one available in it.
Ninad Pundalik a écrit :
On 24/07/2010, Marc Delisle marc@infomarc.info wrote:
Happens even after switching to the mysqli extension. :(
Are you 100% sure of this? Because here, I solidly cannot reproduce the problem while using mysqli, both when inserting rows and editing inline.
Ummm, just a minute. I forgot that we are talking about remote MySQL servers. I'll get access to another machine tomorrow, so I'll confirm then.
We are really talking about what's on the web server, not on the MySQL server.
Do you have mysqlnd? (can be seen on phpMyAdmin's home page in "MySQL client")
If not, which MySQL server version and client library version?
On my local system: Server version: 5.1.41-3ubuntu12.3 MySQL client version: 5.1.41
So you are not using mysqlnd. Based on my tests, I believed that we needed mysqlnd to be able to reproduce this problem (however the problem might be with the mysql extension itself).
On the remote system that I'll setup tomorrow, I'll be installing the latest version of XAMPP, so the server/client version will be the one available in it.