From 93bfdbe371ce2149f9108d41e08aef2b61c13f70 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 8 Sep 2015 22:04:19 +1000 Subject: [PATCH] Remove more references to Drizzle Signed-off-by: Madhura Jayaratne --- index.php | 2 -- libraries/DatabaseInterface.class.php | 4 +-- libraries/StorageEngine.class.php | 1 - libraries/Table.class.php | 1 - libraries/Tracker.class.php | 13 -------- libraries/Util.class.php | 2 +- libraries/config.default.php | 3 +- libraries/config/Validator.class.php | 32 +------------------ .../DatabaseStructureController.class.php | 28 +--------------- libraries/core.lib.php | 2 -- libraries/dbi/DBIMysqli.class.php | 6 ---- libraries/insert_edit.lib.php | 3 +- libraries/plugins/export/ExportSql.class.php | 2 -- 13 files changed, 6 insertions(+), 93 deletions(-) diff --git a/index.php b/index.php index b8669ecec8..3107f41c79 100644 --- a/index.php +++ b/index.php @@ -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. */ diff --git a/libraries/DatabaseInterface.class.php b/libraries/DatabaseInterface.class.php index e87087ba12..51c10d281e 100644 --- a/libraries/DatabaseInterface.class.php +++ b/libraries/DatabaseInterface.class.php @@ -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; diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php index 434938381b..3515e95ad7 100644 --- a/libraries/StorageEngine.class.php +++ b/libraries/StorageEngine.class.php @@ -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' diff --git a/libraries/Table.class.php b/libraries/Table.class.php index bd35c07704..8646ca006f 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -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") ); diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php index 85d5a1069b..dcf22be661 100644 --- a/libraries/Tracker.class.php +++ b/libraries/Tracker.class.php @@ -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. diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 90a0202f77..753d1ad050 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -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 */ diff --git a/libraries/config.default.php b/libraries/config.default.php index 29f82fd8df..cf9c433e38 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -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'] */ diff --git a/libraries/config/Validator.class.php b/libraries/config/Validator.class.php index a6453849f7..5259166195 100644 --- a/libraries/config/Validator.class.php +++ b/libraries/config/Validator.class.php @@ -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!'); diff --git a/libraries/controllers/DatabaseStructureController.class.php b/libraries/controllers/DatabaseStructureController.class.php index 457695b649..babac4318e 100644 --- a/libraries/controllers/DatabaseStructureController.class.php +++ b/libraries/controllers/DatabaseStructureController.class.php @@ -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; diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 3877548c34..f732a23bc3 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -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 */ diff --git a/libraries/dbi/DBIMysqli.class.php b/libraries/dbi/DBIMysqli.class.php index 43db94c043..e20b0d1328 100644 --- a/libraries/dbi/DBIMysqli.class.php +++ b/libraries/dbi/DBIMysqli.class.php @@ -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 diff --git a/libraries/insert_edit.lib.php b/libraries/insert_edit.lib.php index 14ef1ce3dc..1d6a4dd54e 100644 --- a/libraries/insert_edit.lib.php +++ b/libraries/insert_edit.lib.php @@ -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); } diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index fdb787b74c..afb0eff587 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -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']) ) {