[Phpmyadmin-devel] Multi queries - CVS update

(Darn, I always get screwed by the new 'members-only' E-Mail adress catcher. So, again: I posted this earlier today:) Hi All! I modified the handling of multi-query submits today. (RFE #771282) The intention was, to optionally let a multi-query be executed, even though there could be errors in it. As this is normally not useful, I put a configuration directive ($cfg['IgnoreMultiSubmitErrors']) to it. It will be deactivated by default. The mysql_die() function will then print each failed query. The other feature is a more verbose output for each query ($cfg['VerboseMultiSubmit']). If this is set, the results (affected_rows / num_rows / failure) of EACH query will be appended as a MySQL comment into the SQL-Query output. I also changed how many lines/pieces per file/query are allowed until bandwidth saving gets activated and no results are shown. I put the configuration directly into read_dump.php3 because I think putting it into configuration is a bit too much. I checked it for all my basic queries and I hope the changes are non-intrusive. Can you please all test it? -- Bye, Garvin. -- Bye, Garvin.

Garvin Hicking wrote:
(Darn, I always get screwed by the new 'members-only' E-Mail adress catcher. So, again: I posted this earlier today:)
Hi All!
I modified the handling of multi-query submits today. (RFE #771282)
The intention was, to optionally let a multi-query be executed, even though there could be errors in it. As this is normally not useful, I put a configuration directive ($cfg['IgnoreMultiSubmitErrors']) to it. It will be deactivated by default. The mysql_die() function will then print each failed query.
The other feature is a more verbose output for each query ($cfg['VerboseMultiSubmit']). If this is set, the results (affected_rows / num_rows / failure) of EACH query will be appended as a MySQL comment into the SQL-Query output. I also changed how many lines/pieces per file/query are allowed until bandwidth saving gets activated and no results are shown. I put the configuration directly into read_dump.php3 because I think putting it into configuration is a bit too much.
I checked it for all my basic queries and I hope the changes are non-intrusive. Can you please all test it?
Garvin, I made some quick tests and it looks good. I tested multi-statements like some INSERTs and some DELETEs sent at once: I saw the neat comments about affected rows. However, one thing that does not work is two SELECTs like this: select * from persons; select * from towns; Did you try this? Maybe a parser issue. Marc

Hi Marc!
I made some quick tests and it looks good. I tested multi-statements like some INSERTs and some DELETEs sent at once: I saw the neat comments about affected rows.
Great. :)
However, one thing that does not work is two SELECTs like this:
select * from persons; select * from towns;
Did you try this? Maybe a parser issue.
Yes, I left that case out. There's a line in read_dump.php3 which overrides any multi-queries if the last one is a select and only shows the last query. As I did not know why and how it was implemented, I didn't touch it. I guess using multiple selects doesn't make that much sense for phpMyAdmin...? Regards, Garvin.

Garvin Hicking wrote:
Hi Marc!
I made some quick tests and it looks good. I tested multi-statements like some INSERTs and some DELETEs sent at once: I saw the neat comments about affected rows.
Great. :)
However, one thing that does not work is two SELECTs like this:
select * from persons; select * from towns;
Did you try this? Maybe a parser issue.
Yes, I left that case out. There's a line in read_dump.php3 which overrides any multi-queries if the last one is a select and only shows the last query. As I did not know why and how it was implemented, I didn't touch it. I guess using multiple selects doesn't make that much sense for phpMyAdmin...?
Regards, Garvin.
Indeed. Was just testing this for curiosity. Marc
participants (2)
-
Garvin Hicking
-
Marc Delisle