You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-28 07:41:55 +03:00
Remove Drizzle from database level functions
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
require_once 'libraries/mysql_charsets.inc.php';
|
||||
if (! PMA_DRIZZLE) {
|
||||
include_once 'libraries/replication.inc.php';
|
||||
}
|
||||
|
||||
require_once 'libraries/replication.inc.php';
|
||||
|
||||
require 'libraries/build_html_for_db.lib.php';
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,7 +105,7 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
}
|
||||
unset($sqlConstratints);
|
||||
|
||||
if (! PMA_DRIZZLE && PMA_MYSQL_INT_VERSION >= 50100) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 50100) {
|
||||
// here DELIMITER is not used because it's not part of the
|
||||
// language; each statement is sent one by one
|
||||
|
||||
@@ -261,7 +261,7 @@ if (!$is_information_schema) {
|
||||
// Don't allow to easily drop mysql database, RFE #1327514.
|
||||
if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase'])
|
||||
&& ! $db_is_system_schema
|
||||
&& (PMA_DRIZZLE || $GLOBALS['db'] != 'mysql')
|
||||
&& $GLOBALS['db'] != 'mysql'
|
||||
) {
|
||||
$response->addHTML(PMA_getHtmlForDropDatabaseLink($GLOBALS['db']));
|
||||
}
|
||||
|
||||
@@ -226,11 +226,8 @@ class PMA_DbSearch
|
||||
|| /*overload*/mb_strlen($this->_criteriaColumnName) == 0
|
||||
|| $column['Field'] == $this->_criteriaColumnName
|
||||
) {
|
||||
// Drizzle has no CONVERT and all text columns are UTF-8
|
||||
$column = ((PMA_DRIZZLE)
|
||||
? PMA_Util::backquote($column['Field'])
|
||||
: 'CONVERT(' . PMA_Util::backquote($column['Field'])
|
||||
. ' USING utf8)');
|
||||
$column = 'CONVERT(' . PMA_Util::backquote($column['Field'])
|
||||
. ' USING utf8)';
|
||||
$likeClausesPerColumn[] = $column . ' ' . $like_or_regex . ' '
|
||||
. "'"
|
||||
. $automatic_wildcard . $search_word . $automatic_wildcard
|
||||
|
||||
@@ -312,10 +312,6 @@ function PMA_RTN_handleRequestCreateOrEdit($errors, $db)
|
||||
*/
|
||||
function PMA_RTN_backupPrivileges()
|
||||
{
|
||||
if (defined('PMA_DRIZZLE') && PMA_DRIZZLE) {
|
||||
return array();
|
||||
}
|
||||
|
||||
if (!(isset($GLOBALS['proc_priv']) && $GLOBALS['proc_priv']
|
||||
&& isset($GLOBALS['flush_priv'])
|
||||
&& $GLOBALS['flush_priv'])
|
||||
@@ -390,28 +386,26 @@ function PMA_RTN_createRoutine(
|
||||
// Default value
|
||||
$resultAdjust = false;
|
||||
|
||||
if (!defined('PMA_DRIZZLE') || !PMA_DRIZZLE) {
|
||||
if (isset($GLOBALS['proc_priv']) && $GLOBALS['proc_priv']
|
||||
&& isset($GLOBALS['flush_priv'])
|
||||
&& $GLOBALS['flush_priv']
|
||||
) {
|
||||
// Insert all the previous privileges
|
||||
// but with the new name and the new type
|
||||
foreach ($privilegesBackup as $priv) {
|
||||
$adjustProcPrivilege = 'INSERT INTO '
|
||||
. PMA_Util::backquote('mysql') . '.'
|
||||
. PMA_Util::backquote('procs_priv')
|
||||
. ' VALUES("' . $priv[0] . '", "'
|
||||
. $priv[1] . '", "' . $priv[2] . '", "'
|
||||
. $_REQUEST['item_name'] . '", "'
|
||||
. $_REQUEST['item_type'] . '", "'
|
||||
. $priv[5] . '", "'
|
||||
. $priv[6] . '", "'
|
||||
. $priv[7] . '");';
|
||||
$resultAdjust = $GLOBALS['dbi']->query(
|
||||
$adjustProcPrivilege
|
||||
);
|
||||
}
|
||||
if (isset($GLOBALS['proc_priv']) && $GLOBALS['proc_priv']
|
||||
&& isset($GLOBALS['flush_priv'])
|
||||
&& $GLOBALS['flush_priv']
|
||||
) {
|
||||
// Insert all the previous privileges
|
||||
// but with the new name and the new type
|
||||
foreach ($privilegesBackup as $priv) {
|
||||
$adjustProcPrivilege = 'INSERT INTO '
|
||||
. PMA_Util::backquote('mysql') . '.'
|
||||
. PMA_Util::backquote('procs_priv')
|
||||
. ' VALUES("' . $priv[0] . '", "'
|
||||
. $priv[1] . '", "' . $priv[2] . '", "'
|
||||
. $_REQUEST['item_name'] . '", "'
|
||||
. $_REQUEST['item_type'] . '", "'
|
||||
. $priv[5] . '", "'
|
||||
. $priv[6] . '", "'
|
||||
. $priv[7] . '");';
|
||||
$resultAdjust = $GLOBALS['dbi']->query(
|
||||
$adjustProcPrivilege
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -998,21 +992,19 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
|
||||
$retval .= " <td>" . __('Adjust privileges');
|
||||
$retval .= PMA_Util::showDocu('faq', 'faq6-39');
|
||||
$retval .= "</td>";
|
||||
if (! defined('PMA_DRIZZLE') || ! PMA_DRIZZLE) {
|
||||
if (isset($GLOBALS['proc_priv']) && $GLOBALS['proc_priv']
|
||||
&& isset($GLOBALS['flush_priv']) && $GLOBALS['flush_priv']
|
||||
) {
|
||||
$retval .= " <td><input type='checkbox' "
|
||||
. "name='item_adjust_privileges' value='1' checked /></td>";
|
||||
} else {
|
||||
$retval .= " <td><input type='checkbox' "
|
||||
. "name='item_adjust_privileges' value='1' title='" . __(
|
||||
"You do not have sufficient privileges to perform this "
|
||||
. "operation; Please refer to the documentation for more "
|
||||
. "details"
|
||||
)
|
||||
. "' disabled/></td>";
|
||||
}
|
||||
if (isset($GLOBALS['proc_priv']) && $GLOBALS['proc_priv']
|
||||
&& isset($GLOBALS['flush_priv']) && $GLOBALS['flush_priv']
|
||||
) {
|
||||
$retval .= " <td><input type='checkbox' "
|
||||
. "name='item_adjust_privileges' value='1' checked /></td>";
|
||||
} else {
|
||||
$retval .= " <td><input type='checkbox' "
|
||||
. "name='item_adjust_privileges' value='1' title='" . __(
|
||||
"You do not have sufficient privileges to perform this "
|
||||
. "operation; Please refer to the documentation for more "
|
||||
. "details"
|
||||
)
|
||||
. "' disabled/></td>";
|
||||
}
|
||||
$retval .= "</tr>";
|
||||
}
|
||||
|
||||
@@ -18,11 +18,9 @@
|
||||
<optgroup label="<?php echo __('Table maintenance'); ?>">
|
||||
<option value="analyze_tbl" ><?php echo __('Analyze table'); ?></option>
|
||||
<option value="check_tbl" ><?php echo __('Check table'); ?></option>
|
||||
<?php if (!PMA_DRIZZLE): ?>
|
||||
<option value="checksum_tbl" ><?php echo __('Checksum table'); ?></option>
|
||||
<option value="optimize_tbl" ><?php echo __('Optimize table'); ?></option>
|
||||
<option value="repair_tbl" ><?php echo __('Repair table'); ?></option>
|
||||
<?php endif; ?>
|
||||
<option value="checksum_tbl" ><?php echo __('Checksum table'); ?></option>
|
||||
<option value="optimize_tbl" ><?php echo __('Optimize table'); ?></option>
|
||||
<option value="repair_tbl" ><?php echo __('Repair table'); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php echo __('Prefix'); ?>">
|
||||
<option value="add_prefix_tbl" ><?php echo __('Add prefix to table'); ?></option>
|
||||
|
||||
Reference in New Issue
Block a user