diff --git a/libraries/config.default.php b/libraries/config.default.php index 8b1ce032e96a..7a87c9d080e2 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -69,6 +69,13 @@ */ $cfg['ServerLibraryDifference_DisableWarning'] = false; +/** + * Show warning about MySQL reserved words in column names + * + * @global boolean $cfg['ReservedWordWarning'] + */ +$cfg['ReservedWordWarning'] = false; + /** * Show warning about incomplete translations on certain threshold. * diff --git a/sql.php b/sql.php index 2b26cd441308..fc854220733a 100644 --- a/sql.php +++ b/sql.php @@ -1203,20 +1203,6 @@ echo '' . "\n"; } - - // Check column names for MySQL reserved words - $pma_table = new PMA_Table($table, $db); - $columns = $pma_table->getReservedColumnNames(); - if (! empty($columns)) { - foreach ($columns as $column) { - $msg = PMA_message::notice( - __('The column name \'%s\' is a MySQL reserved keyword.') - ); - $msg->addParam($column); - $msg->display(); - } - } - // Displays the results in a table if (empty($disp_mode)) { // see the "PMA_setDisplayMode()" function in diff --git a/tbl_structure.php b/tbl_structure.php index 6e9598abab80..41b977f76383 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -134,15 +134,17 @@ $url_params['back'] = 'tbl_structure.php'; // Check column names for MySQL reserved words -$pma_table = new PMA_Table($table, $db); -$columns = $pma_table->getReservedColumnNames(); -if (! empty($columns)) { - foreach ($columns as $column) { - $msg = PMA_message::notice( - __('The column name \'%s\' is a MySQL reserved keyword.') - ); - $msg->addParam($column); - $response->addHTML($msg); +if ($cfg['ReservedWordWarning'] === true) { + $pma_table = new PMA_Table($table, $db); + $columns = $pma_table->getReservedColumnNames(); + if (! empty($columns)) { + foreach ($columns as $column) { + $msg = PMA_message::notice( + __('The column name \'%s\' is a MySQL reserved keyword.') + ); + $msg->addParam($column); + $response->addHTML($msg); + } } }