Do not walk chars for hex and numbers one by one, this boosts performance while inserting huge blobs (bug #1315232).

This commit is contained in:
Michal Čihař
2005-10-14 12:36:50 +00:00
parent 12670d72b9
commit 087751483b
2 changed files with 11 additions and 0 deletions

View File

@@ -460,8 +460,16 @@ if ($is_minimum_common == FALSE) {
$is_float_digit = FALSE;
$is_float_digit_exponent = FALSE;
// Nijel: Fast skip is especially needed for huge BLOB data:
if ($is_hex_digit) {
$count2++;
$pos = strspn($sql, '0123456789abcdefABCDEF', $count2);
if ($pos > $count2) $count2 = $pos;
unset($pos);
} elseif ($is_digit) {
$pos = strspn($sql, '0123456789', $count2);
if ($pos > $count2) $count2 = $pos;
unset($pos);
}
while (($count2 < $len) && PMA_STR_isSqlIdentifier(PMA_substr($sql, $count2, 1), ($is_sql_variable || $is_digit))) {