Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jun 10, 2014
2 parents 331e7b9 + 44cc200 commit a4d35bc
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
- bug #4449 Mediawiki export does not produce table header row; also fix related PHP warnings
- bug #4442 New lines are added to query every time
- bug #4445 Fatal error on SQL Export of join query
- bug #4448 Dump binary columns in hexadecimal notation not working

4.2.3.0 (2014-06-08)
- bug #4423 Moving fields not working
Expand Down
2 changes: 1 addition & 1 deletion export.php
Expand Up @@ -123,7 +123,7 @@
'sql_type',
'sql_insert_syntax',
'sql_max_query_size',
'sql_hex_for_blob',
'sql_hex_for_binary',
'sql_utc_time',
'sql_drop_database',
'csv_separator',
Expand Down
4 changes: 2 additions & 2 deletions libraries/config.default.php
Expand Up @@ -1920,9 +1920,9 @@
/**
*
*
* @global boolean $cfg['Export']['sql_hex_for_blob']
* @global boolean $cfg['Export']['sql_hex_for_binary']
*/
$cfg['Export']['sql_hex_for_blob'] = true;
$cfg['Export']['sql_hex_for_binary'] = true;

/**
* insert/update/replace
Expand Down
2 changes: 1 addition & 1 deletion libraries/config/messages.inc.php
Expand Up @@ -173,7 +173,7 @@
$strConfigExport_sql_create_view_name = sprintf(__('Add %s'), 'CREATE VIEW');
$strConfigExport_sql_create_trigger_name
= sprintf(__('Add %s'), 'CREATE TRIGGER');
$strConfigExport_sql_hex_for_blob_name = __('Use hexadecimal for BLOB');
$strConfigExport_sql_hex_for_binary_name = __('Use hexadecimal for BINARY & BLOB');
$strConfigExport_sql_if_not_exists_name = sprintf(__('Add %s'), 'IF NOT EXISTS');
$strConfigExport_sql_ignore_name = __('Use ignore inserts');
$strConfigExport_sql_include_comments_name = __('Comments');
Expand Down
2 changes: 1 addition & 1 deletion libraries/config/setup.forms.php
Expand Up @@ -316,7 +316,7 @@
'sql_type',
'sql_insert_syntax',
'sql_max_query_size',
'sql_hex_for_blob',
'sql_hex_for_binary',
'sql_utc_time'));
$forms['Export']['CodeGen'] = array('Export' => array(
'codegen_format'));
Expand Down
2 changes: 1 addition & 1 deletion libraries/config/user_preferences.forms.php
Expand Up @@ -216,7 +216,7 @@
'Export/sql_type',
'Export/sql_insert_syntax',
'Export/sql_max_query_size',
'Export/sql_hex_for_blob',
'Export/sql_hex_for_binary',
'Export/sql_utc_time');
$forms['Export']['CodeGen'] = array(
'Export/codegen_format');
Expand Down
7 changes: 3 additions & 4 deletions libraries/plugins/export/ExportSql.class.php
Expand Up @@ -426,7 +426,7 @@ protected function setProperties()

// Dump binary columns in hexadecimal
$leaf = new BoolPropertyItem();
$leaf->setName("hex_for_blob");
$leaf->setName("hex_for_binary");
$leaf->setText(
__(
'Dump binary columns in hexadecimal notation'
Expand Down Expand Up @@ -1989,9 +1989,8 @@ public function exportData(
// timestamp is numeric on some MySQL 4.1, BLOBs are
// sometimes numeric
$values[] = $row[$j];
} elseif (stristr($field_flags[$j], 'BINARY')
&& $fields_meta[$j]->blob
&& isset($GLOBALS['sql_hex_for_blob'])
} elseif (stristr($field_flags[$j], 'BINARY') !== false
&& isset($GLOBALS['sql_hex_for_binary'])
) {
// a true BLOB
// - mysqldump only generates hex data when the --hex-blob
Expand Down
6 changes: 3 additions & 3 deletions test/classes/plugin/export/PMA_ExportSql_test.php
Expand Up @@ -1876,7 +1876,7 @@ public function testExportData()
$GLOBALS['sql_ignore'] = true;
$GLOBALS['sql_truncate'] = true;
$GLOBALS['sql_insert_syntax'] = 'both';
$GLOBALS['sql_hex_for_blob'] = true;
$GLOBALS['sql_hex_for_binary'] = true;

ob_start();
$this->object->exportData(
Expand All @@ -1903,7 +1903,7 @@ public function testExportData()
);

$this->assertContains(
"(NULL, test, 0x3130, b'110', " . '\'\0\n\r\Z\');',
'(NULL, test, 0x3130, 0x36, 0x000a0d1a);',
$result
);

Expand Down Expand Up @@ -1991,7 +1991,7 @@ public function testExportDataWithUpdate()
$GLOBALS['sql_ignore'] = true;
$GLOBALS['sql_truncate'] = true;
$GLOBALS['sql_insert_syntax'] = 'both';
$GLOBALS['sql_hex_for_blob'] = true;
$GLOBALS['sql_hex_for_binary'] = true;

ob_start();
$this->object->exportData(
Expand Down

0 comments on commit a4d35bc

Please sign in to comment.