Remove more references to Drizzle

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
Madhura Jayaratne 2015-09-08 22:04:19 +10:00
parent 439fc3035c
commit 93bfdbe371
13 changed files with 6 additions and 93 deletions

View File

@ -591,8 +591,6 @@ if ($server > 0) {
* If someday there is a constant that we can check about mysqlnd,
* we can use it instead of strpos().
* If no default server is set, $GLOBALS['dbi'] is not defined yet.
* Drizzle can speak MySQL protocol, so don't warn about version mismatch for
* Drizzle servers.
* We also do not warn if MariaDB is detected, as it has its own version
* numbering.
*/

View File

@ -70,9 +70,7 @@ class PMA_DatabaseInterface
*/
public static function checkDbExtension($extension = 'mysql')
{
if ($extension == 'drizzle' && function_exists('drizzle_create')) {
return true;
} else if (function_exists($extension . '_connect')) {
if (function_exists($extension . '_connect')) {
return true;
}
return false;

View File

@ -138,7 +138,6 @@ class PMA_StorageEngine
foreach (PMA_StorageEngine::getStorageEngines() as $key => $details) {
// Don't show PERFORMANCE_SCHEMA engine (MySQL 5.5)
// Don't show MyISAM for Drizzle (allowed only for temporary tables)
if (! $offerUnavailableEngines
&& ($details['Support'] == 'NO'
|| $details['Support'] == 'DISABLED'

View File

@ -818,7 +818,6 @@ class PMA_Table
// Find server's SQL mode so the builder can generate correct
// queries.
// One of the options that alters the behaviour is `ANSI_QUOTES`.
// This is not availabile for Drizzle.
SqlParser\Context::setMode(
$GLOBALS['dbi']->fetchValue("SELECT @@sql_mode")
);

View File

@ -23,19 +23,6 @@ class PMA_Tracker
*/
static protected $enabled = false;
/**
* Flags copied from `tracking` column definition in `pma_tracking` table.
* Used for column type conversion in Drizzle.
*
* @var array
*/
static private $_tracking_set_flags = array(
'UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE',
'ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE',
'RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX',
'CREATE VIEW','ALTER VIEW','DROP VIEW'
);
/**
* Actually enables tracking. This needs to be done after all
* underlaying code is initialized.

View File

@ -4132,7 +4132,7 @@ class PMA_Util
/**
* Returns server type for current connection
*
* Known types are: Drizzle, MariaDB and MySQL (default)
* Known types are: MariaDB and MySQL (default)
*
* @return string
*/

View File

@ -549,7 +549,7 @@ $cfg['Servers'][$i]['AllowDeny']['order'] = '';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array();
/**
* Disable use of INFORMATION_SCHEMA. Is always 'false' for Drizzle.
* Disable use of INFORMATION_SCHEMA.
*
* @see https://sourceforge.net/p/phpmyadmin/bugs/2606/
* @see http://bugs.mysql.com/19588
@ -730,7 +730,6 @@ $cfg['MemoryLimit'] = '-1';
/**
* mark used tables, make possible to show locked tables (since MySQL 3.23.30)
* Is ignored for Drizzle.
*
* @global boolean $cfg['SkipLockedTables']
*/

View File

@ -241,37 +241,7 @@ class PMA_Validator
$extension = 'mysql';
}
// dead code (drizzle extension)
if ($extension == 'drizzle') {
while (1) {
$drizzle = @drizzle_create();
if (! $drizzle) {
$error = __('Could not initialize Drizzle connection library!');
break;
}
$conn = $socket
? @drizzle_con_add_uds($socket, $user, $pass, null, 0)
: @drizzle_con_add_tcp(
$drizzle, $host, $port, $user, $pass, null, 0
);
if (! $conn) {
$error = __('Could not connect to the database server!');
drizzle_free($drizzle);
break;
}
// connection object is set up but we have to send some query
// to actually connect
$res = @drizzle_query($conn, 'SELECT 1');
if (! $res) {
$error = __('Could not connect to the database server!');
} else {
drizzle_result_free($res);
}
drizzle_con_free($conn);
drizzle_free($drizzle);
break;
}
} else if ($extension == 'mysql') {
if ($extension == 'mysql') {
$conn = @mysql_connect($host . $port . $socket, $user, $pass);
if (! $conn) {
$error = __('Could not connect to the database server!');

View File

@ -554,27 +554,6 @@ class DatabaseStructureController extends DatabaseController
$approx_rows = !$table_is_view
&& $current_table['ENGINE'] == 'InnoDB'
&& !$current_table['COUNTED'];
// Drizzle views use FunctionEngine, and the only place where
// they are available are I_S and D_D schemas, where we do exact
// counting
if ($table_is_view
&& $current_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']
&& $current_table['ENGINE'] != 'FunctionEngine'
) {
$approx_rows = true;
$show_superscript = PMA_Util::showHint(
PMA_sanitize(
sprintf(
__(
'This view has at least this number of '
. 'rows. Please refer to %sdocumentation%s.'
),
'[doc@cfg_MaxExactCountViews]', '[/doc]'
)
)
);
}
}
$this->response->addHTML(
@ -925,7 +904,6 @@ class DatabaseStructureController extends DatabaseController
= $this->getValuesForInnodbTable(
$current_table, $sum_size
);
//$display_rows = ' - ';
break;
// Mysql 5.0.x (and lower) uses MRG_MyISAM
// and MySQL 5.1.x (and higher) uses MRG_MYISAM
@ -944,9 +922,6 @@ class DatabaseStructureController extends DatabaseController
// or on some servers it's reported as "SYSTEM VIEW"
case null :
case 'SYSTEM VIEW' :
case 'FunctionEngine' :
// possibly a view, do nothing
break;
default :
// Unknown table type.
if ($this->_is_show_stats) {
@ -1043,8 +1018,7 @@ class DatabaseStructureController extends DatabaseController
$current_table['COUNTED'] = false;
}
// Drizzle doesn't provide data and index length, check for null
if ($this->_is_show_stats && $current_table['Data_length'] !== null) {
if ($this->_is_show_stats) {
$tblsize = $current_table['Data_length']
+ $current_table['Index_length'];
$sum_size += $tblsize;

View File

@ -843,8 +843,6 @@ function PMA_isAllowedDomain($url)
'docs.phpmyadmin.net',
/* mysql.com domains */
'dev.mysql.com','bugs.mysql.com',
/* drizzle.org domains */
'www.drizzle.org',
/* mariadb domains */
'mariadb.org',
/* php.net domains */

View File

@ -40,11 +40,6 @@ if (! defined('MYSQLI_TYPE_BIT')) {
define('MYSQLI_TYPE_BIT', 16);
}
// for Drizzle
if (! defined('MYSQLI_TYPE_VARCHAR')) {
define('MYSQLI_TYPE_VARCHAR', 15);
}
/**
* Names of field flags.
*/
@ -501,7 +496,6 @@ class PMA_DBI_Mysqli implements PMA_DBI_Extension
$typeAr[MYSQLI_TYPE_BLOB] = 'blob';
$typeAr[MYSQLI_TYPE_VAR_STRING] = 'string';
$typeAr[MYSQLI_TYPE_STRING] = 'string';
$typeAr[MYSQLI_TYPE_VARCHAR] = 'string'; // for Drizzle
// MySQL returns MYSQLI_TYPE_STRING for CHAR
// and MYSQLI_TYPE_CHAR === MYSQLI_TYPE_TINY
// so this would override TINYINT and mark all TINYINT as string

View File

@ -2949,6 +2949,5 @@ function PMA_userHasColumnPrivileges($table_column, $insert_mode)
{
$privileges = $table_column['Privileges'];
return ($insert_mode && strstr($privileges, 'insert') !== false)
|| (! $insert_mode && strstr($privileges, 'update') !== false)
|| is_null($privileges); // Drizzle
|| (! $insert_mode && strstr($privileges, 'update') !== false);
}

View File

@ -1346,8 +1346,6 @@ class ExportSql extends ExportPlugin
// Here we optionally add the AUTO_INCREMENT next value,
// but starting with MySQL 5.0.24, the clause is already included
// in SHOW CREATE TABLE so we'll remove it below
// It's required for Drizzle because SHOW CREATE TABLE uses
// the value from table's creation time
if (isset($GLOBALS['sql_auto_increment'])
&& ! empty($tmpres['Auto_increment'])
) {