Export BLOBs hex quoted.
This commit is contained in:
@@ -9,6 +9,7 @@ $Source$
|
||||
* libraries/sqlparser.data.php3: Added AUTO_INCREMET to reserved words.
|
||||
* tbl_properties_common.php3: Avoid displaying message twice in some cases
|
||||
(fixes bug #722378).
|
||||
* libraries/build_dump.lib.php3: Export BLOBs hex quoted.
|
||||
|
||||
2003-04-15 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* tbl_query_box.php3: Only display charset selection when a DB is
|
||||
|
@@ -259,6 +259,12 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
} else {
|
||||
$field_num[$j] = FALSE;
|
||||
}
|
||||
// blob
|
||||
if ($type == 'blob' || $type == 'mediumblob' || $type == 'largeblob' || $type == 'tinyblob') {
|
||||
$field_blob[$j] = TRUE;
|
||||
} else {
|
||||
$field_blob[$j] = FALSE;
|
||||
}
|
||||
} // end for
|
||||
|
||||
// Sets the scheme
|
||||
@@ -293,9 +299,11 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
// a number
|
||||
if ($field_num[$j]) {
|
||||
$values[] = $row[$j];
|
||||
}
|
||||
// a blob
|
||||
} else if ($field_blob[$j]) {
|
||||
$values[] = '0x' . bin2hex($row[$j]);
|
||||
// a string
|
||||
else {
|
||||
} else {
|
||||
$values[] = "'" . str_replace($search, $replace, PMA_sqlAddslashes($row[$j])) . "'";
|
||||
}
|
||||
} else {
|
||||
@@ -422,9 +430,11 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' || $type == 'int' ||
|
||||
$type == 'bigint' ||$type == 'timestamp') {
|
||||
$schema_insert .= $row[$j] . ', ';
|
||||
}
|
||||
// blob
|
||||
} else if ($type == 'blob' || $type == 'mediumblob' || $type == 'largeblob' || $type == 'tinyblob') {
|
||||
$schema_insert .= '0x' . bin2hex($row[$j]) . ', ';
|
||||
// a string
|
||||
else {
|
||||
} else {
|
||||
$dummy = '';
|
||||
$srcstr = $row[$j];
|
||||
for ($xx = 0; $xx < strlen($srcstr); $xx++) {
|
||||
|
Reference in New Issue
Block a user