Commit 48f0b277 authored by unknown's avatar unknown

Solved bug 8691.

Funny sometimes how things work when in reality you would think it would crash pretty hard :)


sql/examples/ha_archive.cc:
  Solves bug #8691. This was reported in an internal build. Renamed ptr to bptr.
parent e8745761
...@@ -575,7 +575,7 @@ error: ...@@ -575,7 +575,7 @@ error:
int ha_archive::write_row(byte * buf) int ha_archive::write_row(byte * buf)
{ {
z_off_t written; z_off_t written;
uint *ptr, *end; uint *bptr, *end;
DBUG_ENTER("ha_archive::write_row"); DBUG_ENTER("ha_archive::write_row");
if (share->crashed) if (share->crashed)
...@@ -596,16 +596,16 @@ int ha_archive::write_row(byte * buf) ...@@ -596,16 +596,16 @@ int ha_archive::write_row(byte * buf)
We should probably mark the table as damagaged if the record is written We should probably mark the table as damagaged if the record is written
but the blob fails. but the blob fails.
*/ */
for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ; for (bptr= table->s->blob_field, end=bptr + table->s->blob_fields ;
ptr != end ; bptr != end ;
ptr++) bptr++)
{ {
char *ptr; char *ptr;
uint32 size= ((Field_blob*) table->field[*ptr])->get_length(); uint32 size= ((Field_blob*) table->field[*bptr])->get_length();
if (size) if (size)
{ {
((Field_blob*) table->field[*ptr])->get_ptr(&ptr); ((Field_blob*) table->field[*bptr])->get_ptr(&ptr);
written= gzwrite(share->archive_write, ptr, (unsigned)size); written= gzwrite(share->archive_write, ptr, (unsigned)size);
if (written != size) if (written != size)
goto error; goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment