bug #1659176, memory error displaying a table with large BLOBs
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog
|
||||
$Id$
|
||||
$HeadURL$
|
||||
|
||||
2007-02-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/common.lib.php: bug #1659176, memory error displaying
|
||||
a table with large BLOBs
|
||||
|
||||
2007-02-26 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* scripts/upgrade_tables_mysql_4_1_2+.sql: bug #1668662,
|
||||
can create the new pma_designer_coords table
|
||||
|
@@ -2249,6 +2249,7 @@ if (typeof(window.parent) != 'undefined'
|
||||
$nonprimary_condition = '';
|
||||
|
||||
for ($i = 0; $i < $fields_cnt; ++$i) {
|
||||
$condition = '';
|
||||
$field_flags = PMA_DBI_field_flags($handle, $i);
|
||||
$meta = $fields_meta[$i];
|
||||
|
||||
@@ -2303,13 +2304,16 @@ if (typeof(window.parent) != 'undefined'
|
||||
// hexify only if this is a true not empty BLOB
|
||||
&& stristr($field_flags, 'BINARY')
|
||||
&& !empty($row[$i])) {
|
||||
// use a CAST if possible, to avoid problems
|
||||
// if the field contains wildcard characters % or _
|
||||
if (PMA_MYSQL_INT_VERSION < 40002) {
|
||||
$condition .= 'LIKE 0x' . bin2hex($row[$i]) . ' AND';
|
||||
} else {
|
||||
$condition .= '= CAST(0x' . bin2hex($row[$i])
|
||||
. ' AS BINARY) AND';
|
||||
// do not waste memory building a too big condition
|
||||
if (strlen($row[$i]) < 1000) {
|
||||
if (PMA_MYSQL_INT_VERSION < 40002) {
|
||||
$condition .= 'LIKE 0x' . bin2hex($row[$i]) . ' AND';
|
||||
} else {
|
||||
// use a CAST if possible, to avoid problems
|
||||
// if the field contains wildcard characters % or _
|
||||
$condition .= '= CAST(0x' . bin2hex($row[$i])
|
||||
. ' AS BINARY) AND';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$condition .= '= \''
|
||||
|
Reference in New Issue
Block a user