The branch, master has been updated
via f9f987f544cb71e44126b362f456150640d91daf (commit)
via 7951b2bacc63d7dc408ead0cf2fcb126c001d17e (commit)
from 57f51bfda5205d2cd0813216634930863f4ac63d (commit)
- Log -----------------------------------------------------------------
commit f9f987f544cb71e44126b362f456150640d91daf
Merge: 57f51bfda5205d2cd0813216634930863f4ac63d 7951b2bacc63d7dc408ead0cf2fcb126c001d17e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Jul 31 14:54:34 2010 -0400
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
js/functions.js | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2acdf45..9671597 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -105,6 +105,7 @@ $Id$
- bug #3033063 [core] Navi gets wrong db name
- bug #3031705 [core] Fix generating condition for real numbers by comparing
them to string.
+- bug #3034026 [confirmation] TRUNCATE queries get no confirmation request
3.3.5.0 (2010-07-26)
- patch #2932113 [information_schema] Slow export when having lots of
diff --git a/js/functions.js b/js/functions.js
index b5995f0..162e80c 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -152,7 +152,7 @@ function confirmQuery(theForm1, sqlQuery1)
} // end if
} // end if
- // Confirms a "DROP/DELETE/ALTER" statement
+ // Confirms a "DROP/DELETE/ALTER/TRUNCATE" statement
//
// TODO: find a way (if possible) to use the parser-analyser
// for this kind of verification
@@ -162,22 +162,24 @@ function confirmQuery(theForm1, sqlQuery1)
var do_confirm_re_0 = new RegExp('^\\s*DROP\\s+(IF EXISTS\\s+)?(TABLE|DATABASE|PROCEDURE)\\s', 'i');
var do_confirm_re_1 = new RegExp('^\\s*ALTER\\s+TABLE\\s+((`[^`]+`)|([A-Za-z0-9_$]+))\\s+DROP\\s', 'i');
var do_confirm_re_2 = new RegExp('^\\s*DELETE\\s+FROM\\s', 'i');
+ var do_confirm_re_3 = new RegExp('^\\s*TRUNCATE\\s', 'i');
+
if (do_confirm_re_0.test(sqlQuery1.value)
|| do_confirm_re_1.test(sqlQuery1.value)
- || do_confirm_re_2.test(sqlQuery1.value)) {
+ || do_confirm_re_2.test(sqlQuery1.value)
+ || do_confirm_re_3.test(sqlQuery1.value)) {
var message = (sqlQuery1.value.length > 100)
? sqlQuery1.value.substr(0, 100) + '\n ...'
: sqlQuery1.value;
var is_confirmed = confirm(PMA_messages['strDoYouReally'] + ' :\n' + message);
- // drop/delete/alter statement is confirmed -> update the
+ // statement is confirmed -> update the
// "is_js_confirmed" form field so the confirm test won't be
// run on the server side and allows to submit the form
if (is_confirmed) {
theForm1.elements['is_js_confirmed'].value = 1;
return true;
}
- // "DROP/DELETE/ALTER" statement is rejected -> do not submit
- // the form
+ // statement is rejected -> do not submit the form
else {
window.focus();
sqlQuery1.focus();
hooks/post-receive
--
phpMyAdmin
The branch, QA_3_3 has been updated
via 7951b2bacc63d7dc408ead0cf2fcb126c001d17e (commit)
from 4317af25ef788f0aae1a498e1ce8b9d708f347ac (commit)
- Log -----------------------------------------------------------------
commit 7951b2bacc63d7dc408ead0cf2fcb126c001d17e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Jul 31 14:54:05 2010 -0400
bug #3034026 [confirmation] TRUNCATE queries get no confirmation request
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
js/functions.js | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 455c390..3482348 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #3033063 [core] Navi gets wrong db name
- bug #3031705 [core] Fix generating condition for real numbers by comparing
them to string.
+- bug #3034026 [confirmation] TRUNCATE queries get no confirmation request
3.3.5.0 (2010-07-26)
- patch #2932113 [information_schema] Slow export when having lots of
diff --git a/js/functions.js b/js/functions.js
index 8c924e0..93cee60 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -152,7 +152,7 @@ function confirmQuery(theForm1, sqlQuery1)
} // end if
} // end if
- // Confirms a "DROP/DELETE/ALTER" statement
+ // Confirms a "DROP/DELETE/ALTER/TRUNCATE" statement
//
// TODO: find a way (if possible) to use the parser-analyser
// for this kind of verification
@@ -162,22 +162,24 @@ function confirmQuery(theForm1, sqlQuery1)
var do_confirm_re_0 = new RegExp('^\\s*DROP\\s+(IF EXISTS\\s+)?(TABLE|DATABASE|PROCEDURE)\\s', 'i');
var do_confirm_re_1 = new RegExp('^\\s*ALTER\\s+TABLE\\s+((`[^`]+`)|([A-Za-z0-9_$]+))\\s+DROP\\s', 'i');
var do_confirm_re_2 = new RegExp('^\\s*DELETE\\s+FROM\\s', 'i');
+ var do_confirm_re_3 = new RegExp('^\\s*TRUNCATE\\s', 'i');
+
if (do_confirm_re_0.test(sqlQuery1.value)
|| do_confirm_re_1.test(sqlQuery1.value)
- || do_confirm_re_2.test(sqlQuery1.value)) {
+ || do_confirm_re_2.test(sqlQuery1.value)
+ || do_confirm_re_3.test(sqlQuery1.value)) {
var message = (sqlQuery1.value.length > 100)
? sqlQuery1.value.substr(0, 100) + '\n ...'
: sqlQuery1.value;
var is_confirmed = confirm(PMA_messages['strDoYouReally'] + ' :\n' + message);
- // drop/delete/alter statement is confirmed -> update the
+ // statement is confirmed -> update the
// "is_js_confirmed" form field so the confirm test won't be
// run on the server side and allows to submit the form
if (is_confirmed) {
theForm1.elements['is_js_confirmed'].value = 1;
return true;
}
- // "DROP/DELETE/ALTER" statement is rejected -> do not submit
- // the form
+ // statement is rejected -> do not submit the form
else {
window.focus();
sqlQuery1.focus();
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via 57f51bfda5205d2cd0813216634930863f4ac63d (commit)
from 00b600a642436a6edbd03cb262620d53e901610e (commit)
- Log -----------------------------------------------------------------
commit 57f51bfda5205d2cd0813216634930863f4ac63d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Jul 31 14:22:45 2010 -0400
clarify the doc
-----------------------------------------------------------------------
Summary of changes:
Documentation.html | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation.html b/Documentation.html
index bf9a05a..62dd51f 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -4319,8 +4319,8 @@ chmod o+rwx tmp
<ol>
<li>In <tt>config.inc.php</tt> your host should be defined with a FQDN (fully qualified domain name) instead of "localhost".</li>
- <li>Ensure that your target table is under the PBXT storage engine and has a LONGBLOB column and a primary key.</li>
- <li>When you insert or update a row in this table, put a checkmark on the "Upload to BLOB repository" optional choice; otherwise, the upload will be done directly in your column instead of the repository.</li>
+ <li>Ensure that your target table is under the PBXT storage engine and has a LONGBLOB column.</li>
+ <li>When you insert or update a row in this table, put a checkmark on the "Upload to BLOB repository" optional choice; otherwise, the upload will be done directly in your LONGBLOB column instead of the repository.</li>
<li>Finally when you browse your table, you'll see in your column a link to stream your data, for example "View image". A header containing the correct MIME-type will be sent to your browser; this MIME-type was stored at upload time but in case it's incorrect, it's possible to edit it by clicking on the displayed MIME-type.</li>
</ol>
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via 3e666e94de7dfcd092dd9fdbf838b88039bdb46c (commit)
from c1bf8133cd5c0d0da463f11e25b9c84eb4bede38 (commit)
- Log -----------------------------------------------------------------
commit 3e666e94de7dfcd092dd9fdbf838b88039bdb46c
Author: Marc Delisle <marc(a)infomarc.info>
Date: Thu Jul 29 10:23:45 2010 -0400
code and comments cleanup
-----------------------------------------------------------------------
Summary of changes:
libraries/blobstreaming.lib.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libraries/blobstreaming.lib.php b/libraries/blobstreaming.lib.php
index f0f74c8..adc0b14 100644
--- a/libraries/blobstreaming.lib.php
+++ b/libraries/blobstreaming.lib.php
@@ -141,13 +141,13 @@ function checkBLOBStreamingPlugins()
if (function_exists("pbms_connection_pool_size")) {
if ( isset($PMA_Config->settings['pbms_connection_pool_size'])) {
$pool_size = $PMA_Config->settings['pbms_connection_pool_size'];
- if ($pool_size == "")
+ if ($pool_size == "") {
$pool_size = 1;
- } else {
+ }
+ } else {
$pool_size = 1;
- }
-
- pbms_connection_pool_size($pool_size);
+ }
+ pbms_connection_pool_size($pool_size);
}
// get BS server port
@@ -180,7 +180,7 @@ function checkBLOBStreamingPlugins()
$PMA_Config->set('BLOBSTREAMING_SERVER', $serverCfg['host'] . ':' . $BS_PORT);
$PMA_Config->set('PHP_PBMS_EXISTS', FALSE);
$PMA_Config->set('FILEINFO_EXISTS', FALSE);
-
+
// check if PECL's fileinfo library exist
$finfo = NULL;
@@ -320,8 +320,8 @@ function PMA_BS_IsPBMSReference($bs_reference, $db_name)
// You do not really need a connection to the PBMS Daemon
// to check if a reference looks valid but unfortunalty the API
- // requires one at this point so until the API is updated
- // we need to oepen one here. If you use pool connections this
+ // requires one at this point so until the API is updated
+ // we need to epen one here. If you use pool connections this
// will not be a performance problem.
if (PMA_do_connect($db_name, FALSE) == FALSE) {
return FALSE;
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via c1bf8133cd5c0d0da463f11e25b9c84eb4bede38 (commit)
via 92a54bc0e2aadb3e123cfeb4f1f995e11b22df99 (commit)
via 279a8f8f21dfdd595e05fe8cc570caf723b18445 (commit)
from 09fd3ecc33d602c2ebdaea63b2f3df3ee8c979b1 (commit)
- Log -----------------------------------------------------------------
commit c1bf8133cd5c0d0da463f11e25b9c84eb4bede38
Author: Barry Leslie <barry_leslie(a)users.sourceforge.net>
Date: Wed Jul 28 12:24:41 2010 -0700
fixed pbms_connection_pool_size problem
commit 92a54bc0e2aadb3e123cfeb4f1f995e11b22df99
Author: Barry Leslie <barry_leslie(a)users.sourceforge.net>
Date: Fri Jul 23 09:07:31 2010 -0700
Check for pbms functions.
commit 279a8f8f21dfdd595e05fe8cc570caf723b18445
Author: Barry Leslie <barry_leslie(a)users.sourceforge.net>
Date: Fri Jul 23 08:06:24 2010 -0700
The use of PBMS is not dependent on a primary key
-----------------------------------------------------------------------
Summary of changes:
libraries/blobstreaming.lib.php | 70 +++++++++++++++++++++------------------
tbl_replace.php | 6 +---
2 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/libraries/blobstreaming.lib.php b/libraries/blobstreaming.lib.php
index 17a05e0..f0f74c8 100644
--- a/libraries/blobstreaming.lib.php
+++ b/libraries/blobstreaming.lib.php
@@ -121,6 +121,35 @@ function checkBLOBStreamingPlugins()
return FALSE;
} // end if (count($bs_variables) <= 0)
+ // Check that the required pbms functions exist:
+ if ((function_exists("pbms_connect") == FALSE) ||
+ (function_exists("pbms_error") == FALSE) ||
+ (function_exists("pbms_close") == FALSE) ||
+ (function_exists("pbms_is_blob_reference") == FALSE) ||
+ (function_exists("pbms_get_info") == FALSE) ||
+ (function_exists("pbms_get_metadata_value") == FALSE) ||
+ (function_exists("pbms_add_metadata") == FALSE) ||
+ (function_exists("pbms_read_stream") == FALSE)) {
+
+ // We should probably notify the user that they need to install
+ // the pbms client lib and PHP extension to make use of blob streaming.
+ $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE);
+ PMA_cacheSet('skip_blobstreaming', true, true);
+ return FALSE;
+ }
+
+ if (function_exists("pbms_connection_pool_size")) {
+ if ( isset($PMA_Config->settings['pbms_connection_pool_size'])) {
+ $pool_size = $PMA_Config->settings['pbms_connection_pool_size'];
+ if ($pool_size == "")
+ $pool_size = 1;
+ } else {
+ $pool_size = 1;
+ }
+
+ pbms_connection_pool_size($pool_size);
+ }
+
// get BS server port
$BS_PORT = $bs_variables['pbms_port'];
@@ -151,7 +180,7 @@ function checkBLOBStreamingPlugins()
$PMA_Config->set('BLOBSTREAMING_SERVER', $serverCfg['host'] . ':' . $BS_PORT);
$PMA_Config->set('PHP_PBMS_EXISTS', FALSE);
$PMA_Config->set('FILEINFO_EXISTS', FALSE);
-
+
// check if PECL's fileinfo library exist
$finfo = NULL;
@@ -290,7 +319,14 @@ function PMA_BS_IsPBMSReference($bs_reference, $db_name)
}
// You do not really need a connection to the PBMS Daemon
- // to check if a reference looks valid.
+ // to check if a reference looks valid but unfortunalty the API
+ // requires one at this point so until the API is updated
+ // we need to oepen one here. If you use pool connections this
+ // will not be a performance problem.
+ if (PMA_do_connect($db_name, FALSE) == FALSE) {
+ return FALSE;
+ }
+
$ok = pbms_is_blob_reference($bs_reference);
return $ok ;
}
@@ -494,34 +530,4 @@ function PMA_BS_getURL($reference)
return $bs_url;
}
-/**
- * returns the field name for a primary key of a given table in a given database
- *
- * @access public
- * @param string - database name
- * @param string - table name
- * @uses PMA_DBI_select_db()
- * @uses PMA_backquote()
- * @uses PMA_DBI_query()
- * @uses PMA_DBI_fetch_assoc()
- * @return string - field name for primary key
-*/
-function PMA_BS_GetPrimaryField($db_name, $tbl_name)
-{
- // select specified database
- PMA_DBI_select_db($db_name);
-
- // retrieve table fields
- $query = "SHOW FULL FIELDS FROM " . PMA_backquote($tbl_name);
- $result = PMA_DBI_query($query);
-
- // while there are records to parse
- while ($data = PMA_DBI_fetch_assoc($result)) {
- if ("PRI" == $data['Key']) {
- return $data['Field'];
- }
- }
- // return NULL on no primary key
- return NULL;
-}
?>
diff --git a/tbl_replace.php b/tbl_replace.php
index 92331b9..6d4fd83 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -210,10 +210,6 @@ foreach ($loop_array as $rowcount => $where_clause) {
? $_REQUEST['auto_increment']['multi_edit'][$rowcount]
: null;
- if ($blob_streaming_active) {
- $primary_field = PMA_BS_GetPrimaryField($GLOBALS['db'], $GLOBALS['table']);
- }
-
// Fetch the current values of a row to use in case we have a protected field
// @todo possibly move to ./libraries/tbl_replace_fields.inc.php
if ($is_insert && $using_key && isset($me_fields_type) && is_array($me_fields_type) && isset($where_clause)) {
@@ -226,7 +222,7 @@ foreach ($loop_array as $rowcount => $where_clause) {
require './libraries/tbl_replace_fields.inc.php';
// for blobstreaming
- if ($blob_streaming_active && (NULL != $primary_field || strlen($primary_field) > 0)) {
+ if ($blob_streaming_active) {
$remove_blob_repo = isset($_REQUEST['remove_blob_repo_' . $key]) ? $_REQUEST['remove_blob_repo_' . $key] : NULL;
$upload_blob_repo = isset($_REQUEST['upload_blob_repo_' . $key]) ? $_REQUEST['upload_blob_repo_' . $key] : NULL;
hooks/post-receive
--
phpMyAdmin