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