[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_3, updated. RELEASE_3_3_3-37-gae8ddbf

Marc Delisle lem9 at users.sourceforge.net
Sun Jun 13 14:42:36 CEST 2010


The branch, QA_3_3 has been updated
       via  ae8ddbf15bed713ee041ac476c07e44cdd4f6179 (commit)
      from  1e2731dc960c526d978321202094cf66ce229ad4 (commit)


- Log -----------------------------------------------------------------
commit ae8ddbf15bed713ee041ac476c07e44cdd4f6179
Author: Marc Delisle <marc at infomarc.info>
Date:   Sun Jun 13 08:42:24 2010 -0400

    bug #2986422 [import] Results for query are not displayed

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    1 +
 import.php               |    9 +++++++++
 libraries/import.lib.php |    2 ++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ba6ffe2..1045fee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
 - patch #3013264 [doc] FAQ 1.40 uses a comma instead of a period,
   thanks to Isaac Bennetch - ibennetch
 - [engines] Fix getting InnoDB status.
+- bug #2986422 [import] Results for query are not displayed
 
 3.3.3.0 (2010-05-10)
 - patch #2982480 [navi] Do not group if there would be one table in group,
diff --git a/import.php b/import.php
index 77966e0..4d64872 100644
--- a/import.php
+++ b/import.php
@@ -446,6 +446,15 @@ if (isset($my_die)) {
     }
 }
 
+// we want to see the results of the last query that returned at least a row
+if (! empty($last_query_with_results)) {
+    // but we want to show intermediate results too
+    $disp_query = $sql_query;
+    $disp_message = $strSuccess;
+    $sql_query = $last_query_with_results;
+    $go_sql = true;
+}
+
 if ($go_sql) {
     require './sql.php';
 } else {
diff --git a/libraries/import.lib.php b/libraries/import.lib.php
index 202d91b..58f3fd1 100644
--- a/libraries/import.lib.php
+++ b/libraries/import.lib.php
@@ -84,6 +84,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
 {
     global $import_run_buffer, $go_sql, $complete_query, $display_query,
         $sql_query, $my_die, $error, $reload,
+        $last_query_with_results,
         $skip_queries, $executed_queries, $max_sql_len, $read_multiply,
         $cfg, $sql_query_disabled, $db, $run_query, $is_superuser;
     $read_multiply = 1;
@@ -143,6 +144,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
                             $a_aff_rows = (int)@PMA_DBI_affected_rows();
                             if ($a_num_rows > 0) {
                                 $msg .= $GLOBALS['strRows'] . ': ' . $a_num_rows;
+                                $last_query_with_results = $import_run_buffer['sql'];
                             } elseif ($a_aff_rows > 0) {
                                 $msg .= sprintf($GLOBALS['strRowsAffected'], $a_aff_rows);
                             } else {


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list