diff --git a/ChangeLog b/ChangeLog index f6cea742a2..86756d5c68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ 3.4.3.0 (not yet released) - bug #3311170 [sync] Missing helper icons in Synchronize +- patch #3304473 [setup] Redefine a lable that was wrong +- bug #3304544 [parser] master is not a reserved word 3.4.2.0 (not yet released) - bug #3301249 [interface] Iconic table operations does not remove inline edit label diff --git a/js/sql.js b/js/sql.js index e4f8323be2..31afe8417a 100644 --- a/js/sql.js +++ b/js/sql.js @@ -888,16 +888,20 @@ $(document).ready(function() { */ var is_null = $this_field.find('input:checkbox').is(':checked'); var value; + var addQuotes = true; if (is_null) { sql_query += ' `' + field_name + "`=NULL , "; need_to_post = true; } else { - if($this_field.is(":not(.relation, .enum, .set)")) { + if($this_field.is(":not(.relation, .enum, .set, .bit)")) { this_field_params[field_name] = $this_field.find('textarea').val(); if($this_field.is('.transformed')) { $.extend(transform_fields, this_field_params); } + } else if ($this_field.is('.bit')) { + this_field_params[field_name] = '0b' + $this_field.find('textarea').val(); + addQuotes = false; } else if ($this_field.is('.set')) { $test_element = $this_field.find('select'); this_field_params[field_name] = $test_element.map(function(){ @@ -924,7 +928,11 @@ $(document).ready(function() { new_clause += '`' + window.parent.table + '`.' + '`' + field_name + "` = '" + this_field_params[field_name].replace(/'/g,"''") + "'" + ' AND '; } if (this_field_params[field_name] != $this_field.data('original_data')) { - sql_query += ' `' + field_name + "`='" + this_field_params[field_name].replace(/'/g, "''") + "' , "; + if (addQuotes == true) { + sql_query += ' `' + field_name + "`='" + this_field_params[field_name].replace(/'/g, "''") + "', "; + } else { + sql_query += ' `' + field_name + "`=" + this_field_params[field_name].replace(/'/g, "''") + ", "; + } need_to_post = true; } } diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index e76b52e303..1b8cbf3f99 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -117,7 +117,7 @@ $strConfigExport_remember_file_template_name = __('Remember file name template') $strConfigExport_sql_auto_increment_name = __('Add AUTO_INCREMENT value'); $strConfigExport_sql_backquotes_name = __('Enclose table and column names with backquotes'); $strConfigExport_sql_compatibility_name = __('SQL compatibility mode'); -$strConfigExport_sql_create_table_statements_name = __('Syntax to use when inserting data'); +$strConfigExport_sql_create_table_statements_name = __('CREATE TABLE options:'); $strConfigExport_sql_dates_name = __('Creation/Update/Check dates'); $strConfigExport_sql_delayed_name = __('Use delayed inserts'); $strConfigExport_sql_disable_fk_name = __('Disable foreign key checks'); diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index c9e04f31db..08b3ea1257 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1033,6 +1033,11 @@ function PMA_addClass($class, $condition_field, $meta, $nowrap, $is_field_trunca $set_class = ' set'; } + $bit_class = ''; + if(strpos($meta->type, 'bit') !== false) { + $bit_class = ' bit'; + } + $mime_type_class = ''; if(isset($meta->mimetype)) { $mime_type_class = ' ' . preg_replace('/\//', '_', $meta->mimetype); @@ -1041,7 +1046,7 @@ function PMA_addClass($class, $condition_field, $meta, $nowrap, $is_field_trunca $result = $class . ($condition_field ? ' condition' : '') . $nowrap . ' ' . ($is_field_truncated ? ' truncated' : '') . ($transform_function != $default_function ? ' transformed' : '') - . $enum_class . $set_class . $mime_type_class; + . $enum_class . $set_class . $bit_class . $mime_type_class; return $result; } diff --git a/libraries/sqlparser.data.php b/libraries/sqlparser.data.php index e8a3115815..c7dacc675e 100644 --- a/libraries/sqlparser.data.php +++ b/libraries/sqlparser.data.php @@ -527,7 +527,6 @@ $PMA_SQPdata_reserved_word = array ( 'LOGS', 'LOW_PRIORITY', 'MARIA', // 5.1 ? - 'MASTER', 'MASTER_CONNECT_RETRY', 'MASTER_HOST', 'MASTER_LOG_FILE', @@ -685,7 +684,7 @@ $PMA_SQPdata_reserved_word = array ( * * @global integer MySQL reserved words count */ -$PMA_SQPdata_reserved_word_cnt = 288; +$PMA_SQPdata_reserved_word_cnt = 287; /** * words forbidden to be used as column or table name wihtout quotes