>Description:
client/mysql.cc:
static void
safe_put_field(const char *pos,ulong length)
{
if (!pos)
fputs("NULL",stdout);
else
{
if (opt_raw_data)
- fputs(pos,stdout);
+ fwrite (pos, 1, length, stdout);
else for (const char *end=pos+length ; pos != end ; pos++)
{
#ifdef USE_MB
int l;
if ((l = ismbchar(pos, end))) {
while (l--)
putchar(*pos++);
pos--;
continue;
}
#endif
if (!*pos)
fputs("\\0",stdout); // This makes everything hard
else if (*pos == '\t')
fputs("\\t",stdout); // This would destroy tab format
else if (*pos == '\n')
fputs("\\n",stdout); // This too
else if (*pos == '\\')
fputs("\\\\",stdout);
else
putchar(*pos);
}
}
}
>How-To-Repeat:
Dump using -r switch some amount of blob data
>Fix:
Replace fputs with fwrite call.
>Submitter-Id: bland
>Originator: Alexander Nedotsukov
>Organization:
Orchid Technology K.K.
>MySQL support: none
>Synopsis: core dump using -r switch
>Severity: non-critical
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-3.22.32 (Source distribution)
>Environment:
System: SunOS leo 5.6 Generic_105181-19 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
Some paths: /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gcc
/usr/ucb/cc
GCC: Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS=''
Configure command:
./configure --enable-assembler --with-pthread --enable-thread-safe-client -
-without-server --without-bench
Perl: This is perl, version 5.005_03 built for sun4-solaris
| Thread |
|---|
| • mysql.cc patch | Alexander Nedotsukov | 28 Aug |