Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin

This commit is contained in:
Thilanka Kaushalya 2011-06-04 23:14:58 +05:30
commit ba71acb32e
5 changed files with 20 additions and 6 deletions

View File

@ -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

View File

@ -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;
}
}

View File

@ -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 = __('<code>CREATE TABLE</code> 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');

View File

@ -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;
}

View File

@ -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