summaryrefslogtreecommitdiff
path: root/sql/examples/ha_archive.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/examples/ha_archive.cc')
-rw-r--r--sql/examples/ha_archive.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index e0c9173f8da..ad17bd91d69 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -575,7 +575,7 @@ error:
int ha_archive::write_row(byte * buf)
{
z_off_t written;
- uint *bptr, *end;
+ uint *ptr, *end;
DBUG_ENTER("ha_archive::write_row");
if (share->crashed)
@@ -596,17 +596,17 @@ int ha_archive::write_row(byte * buf)
We should probably mark the table as damagaged if the record is written
but the blob fails.
*/
- for (bptr= table->s->blob_field, end=bptr + table->s->blob_fields ;
- bptr != end ;
- bptr++)
+ for (ptr= table->s->blob_field, end= ptr + table->s->blob_fields ;
+ ptr != end ;
+ ptr++)
{
- char *ptr;
- uint32 size= ((Field_blob*) table->field[*bptr])->get_length();
+ char *data_ptr;
+ uint32 size= ((Field_blob*) table->field[*ptr])->get_length();
if (size)
{
- ((Field_blob*) table->field[*bptr])->get_ptr(&ptr);
- written= gzwrite(share->archive_write, ptr, (unsigned)size);
+ ((Field_blob*) table->field[*ptr])->get_ptr(&data_ptr);
+ written= gzwrite(share->archive_write, data_ptr, (unsigned)size);
if (written != size)
goto error;
}
@@ -630,7 +630,6 @@ error:
int ha_archive::rnd_init(bool scan)
{
DBUG_ENTER("ha_archive::rnd_init");
- int read; // gzread() returns int, and we use this to check the header
if (share->crashed)
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);